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, isCallerAJavaApplication
finalTask, 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, startReceiverThread
addTask, addTasks, cancelRunningTask, decideWhatToDoInCaseOfFailure, getSettingMemory, lockEngine, lockEngine, setSettingMemory, startApplication, unlockEngine
protected 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.Exception
protected 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.Exception
protected SocketWrapper getWaitingClients() throws java.lang.InterruptedException
getWaitingClients
in class AbstractServer
java.lang.InterruptedException
protected ClientThread createClientThread(AbstractServer server, int id)
createClientThread
in class AbstractServer
protected void shutdown(int shutdownCode)
shutdown
in class AbstractGenericEngine