public class ServerCommunicationSystem
extends java.lang.Thread
Modifier and Type | Field and Description |
---|---|
long |
MESSAGE_WAIT_TIME |
protected MessageHandler |
messageHandler |
Constructor and Description |
---|
ServerCommunicationSystem(ServerViewController controller,
ServiceReplica replica)
Creates a new instance of ServerCommunicationSystem
|
Modifier and Type | Method and Description |
---|---|
CommunicationSystemServerSide |
getClientsConn() |
ServersCommunicationLayer |
getServersConn() |
void |
joinViewReceived() |
void |
run()
Thread method responsible for receiving messages sent by other servers.
|
void |
send(int[] targets,
SystemMessage sm)
Send a message to target processes.
|
void |
setAcceptor(Acceptor acceptor) |
void |
setRequestReceiver(RequestReceiver requestReceiver) |
void |
setTOMLayer(TOMLayer tomLayer) |
java.lang.String |
toString() |
void |
updateServersConnections() |
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, yield
public final long MESSAGE_WAIT_TIME
protected MessageHandler messageHandler
public ServerCommunicationSystem(ServerViewController controller, ServiceReplica replica) throws java.lang.Exception
java.lang.Exception
public void joinViewReceived()
public void updateServersConnections()
public void setAcceptor(Acceptor acceptor)
public void setTOMLayer(TOMLayer tomLayer)
public void setRequestReceiver(RequestReceiver requestReceiver)
public void run()
run
in interface java.lang.Runnable
run
in class java.lang.Thread
public void send(int[] targets, SystemMessage sm)
targets
- the target receivers of the messagesm
- the message to be sentpublic ServersCommunicationLayer getServersConn()
public CommunicationSystemServerSide getClientsConn()
public java.lang.String toString()
toString
in class java.lang.Thread