Top Inners Fields Constructors Methods
jogamp.common.util.locks

public Class SingletonInstanceServerSocket

extends SingletonInstance
Class Inheritance
Imports
java.io.IOException, java.net.InetAddress, .ServerSocket, .Socket, .UnknownHostException, com.jogamp.common.ExceptionUtils, com.jogamp.common.util.InterruptSource, .InterruptedRuntimeException, .SourcedInterruptedException, com.jogamp.common.util.locks.SingletonInstance

Nested and Inner Type Summary

Modifier and TypeClass and Description
public class

Field Summary

Modifier and TypeField and Description
private final String
private static int
private final SingletonInstanceServerSocket.Server
Inherited from com.jogamp.common.util.locks.SingletonInstance:
DEBUG

Constructor Summary

AccessConstructor and Description
public
SingletonInstanceServerSocket(final long poll_ms, final int portNumber)

Method Summary

Modifier and TypeMethod and Description
public final InetAddress
public final String
public final int
protected boolean
protected boolean
Inherited from com.jogamp.common.util.locks.SingletonInstance:
createFileLockcreateFileLockcreateServerSocketgetPollPeriodinfoPrefixinfoPrefixisLockedlocktoStringtryLockunlock

Field Detail

fullNameback to summary
private final String fullName
serverInstanceCountback to summary
private static int serverInstanceCount
singletonServerback to summary
private final SingletonInstanceServerSocket.Server singletonServer

Constructor Detail

SingletonInstanceServerSocketback to summary
public SingletonInstanceServerSocket(final long poll_ms, final int portNumber)

Method Detail

getLocalInetAddressback to summary
public final InetAddress getLocalInetAddress()
getNameback to summary
public final String getName()

Implements abstract com.jogamp.common.util.locks.SingletonInstance.getName.

Annotations
@Override
getPortNumberback to summary
public final int getPortNumber()
tryLockImplback to summary
protected boolean tryLockImpl()

Implements abstract com.jogamp.common.util.locks.SingletonInstance.tryLockImpl.

Annotations
@Override
unlockImplback to summary
protected boolean unlockImpl()

Implements abstract com.jogamp.common.util.locks.SingletonInstance.unlockImpl.

Annotations
@Override
jogamp.common.util.locks back to summary

public Class SingletonInstanceServerSocket.Server

extends Object
implements Runnable
Class Inheritance
  • java.lang.Object
  • jogamp.common.util.locks.SingletonInstanceServerSocket.Server
All Implemented Interfaces
java.lang.Runnable

Field Summary

Modifier and TypeField and Description
private volatile boolean
private final InetAddress
private final int
private ServerSocket
private Thread
private volatile boolean
private final Object

Constructor Summary

AccessConstructor and Description
public
Server(final InetAddress localInetAddress, final int portNumber)

Method Summary

Modifier and TypeMethod and Description
public final Socket
public final InetAddress
public final int
public final boolean
public final boolean
public final void
kill()

Brutally kill server thread and close socket regardless.

public void
run()

Implements java.lang.Runnable.run.

Runs this operation.
public final boolean
private final boolean
shutdown(final boolean wait)

public final boolean
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

aliveback to summary
private volatile boolean alive
localInetAddressback to summary
private final InetAddress localInetAddress
portNumberback to summary
private final int portNumber
serverSocketback to summary
private ServerSocket serverSocket
serverThreadback to summary
private Thread serverThread
shallQuitback to summary
private volatile boolean shallQuit
syncOnStartStopback to summary
private final Object syncOnStartStop

Constructor Detail

Serverback to summary
public Server(final InetAddress localInetAddress, final int portNumber)

Method Detail

connectback to summary
public final Socket connect()
getLocalInetAddressback to summary
public final InetAddress getLocalInetAddress()
getPortNumberback to summary
public final int getPortNumber()
isBoundback to summary
public final boolean isBound()
isRunningback to summary
public final boolean isRunning()
killback to summary
public final void kill()

Brutally kill server thread and close socket regardless. This is out last chance for JVM shutdown.

Annotations
@SuppressWarnings:deprecation
runback to summary
public void run()

Implements java.lang.Runnable.run.

Doc from java.lang.Runnable.run.

Runs this operation.

Annotations
@Override
shutdownback to summary
public final boolean shutdown()
shutdownback to summary
private final boolean shutdown(final boolean wait)
startback to summary
public final boolean start()