public class JavaLocalGatewayServer extends AbstractServer
AbstractServer.ServerReply| Modifier and Type | Field and Description |
|---|---|
protected repicea.net.server.JavaLocalGatewayServer.REpiceaBackDoorCancellationThread |
backdoorThread |
protected boolean |
bypassShutdownForTesting |
protected boolean |
shutdownOnClosedConnection |
protected REpiceaCodeTranslator |
translator |
clientQueue, isCallerAJavaApplicationfinalTask, logger, queue, tasksDone| Modifier | Constructor and Description |
|---|---|
|
JavaLocalGatewayServer(ServerConfiguration servConf,
REpiceaCodeTranslator translator)
Constructor.
|
protected |
JavaLocalGatewayServer(ServerConfiguration servConf,
REpiceaCodeTranslator translator,
boolean shutdownOnClosedConnection)
Hidden constructor for test purpose
|
| Modifier and Type | Method and Description |
|---|---|
protected ClientThread |
createClientThread(AbstractServer server,
int id) |
protected SocketWrapper |
getWaitingClients()
This method waits until the head of the queue is non null and returns the socket.
|
protected void |
shutdown(int shutdownCode) |
addPropertyChangeListener, closeAndRestartTheseThreads, firePropertyChange, firstTasksToDo, getClientThreads, getConfiguration, listenToClients, propertyChange, removePropertyChangeListener, requestShutdown, startReceiverThreadaddTask, addTasks, cancelRunningTask, decideWhatToDoInCaseOfFailure, getSettingMemory, lockEngine, lockEngine, setSettingMemory, startApplication, unlockEngineprotected final REpiceaCodeTranslator translator
protected final boolean shutdownOnClosedConnection
protected final repicea.net.server.JavaLocalGatewayServer.REpiceaBackDoorCancellationThread backdoorThread
protected boolean bypassShutdownForTesting
public JavaLocalGatewayServer(ServerConfiguration servConf, REpiceaCodeTranslator translator) throws java.lang.Exception
servConf - a ServerConfiguration instancetranslator - an instance that implements the REpiceaCodeTranslator interfacejava.lang.Exceptionprotected JavaLocalGatewayServer(ServerConfiguration servConf, REpiceaCodeTranslator translator, boolean shutdownOnClosedConnection) throws java.lang.Exception
servConf - a ServerConfiguration instancetranslator - an instance that implements the REpiceaCodeTranslator interfaceshutdownOnClosedConnection - by default this parameter is set to true so that if the connection is lost, the server is shutdown.java.lang.Exceptionprotected SocketWrapper getWaitingClients() throws java.lang.InterruptedException
getWaitingClients in class AbstractServerjava.lang.InterruptedExceptionprotected ClientThread createClientThread(AbstractServer server, int id)
createClientThread in class AbstractServerprotected void shutdown(int shutdownCode)
shutdown in class AbstractGenericEngine