public abstract class Server
extends org.macroing.cit.messaging.Messaging
Server
is an abstract base class for defining a server.Modifier | Constructor and Description |
---|---|
protected |
Server()
Constructs a new
Server instance. |
Modifier and Type | Method and Description |
---|---|
void |
addSessionObserver(org.macroing.cit.network.SessionObserver sessionObserver)
Adds
sessionObserver , if absent. |
ServerConfiguration |
getServerConfiguration()
Returns a
ServerConfiguration . |
java.util.List<org.macroing.cit.network.SessionObserver> |
getSessionObservers()
Returns a
List containing all currently added SessionObserver s. |
void |
removeSessionObserver(org.macroing.cit.network.SessionObserver sessionObserver)
Removes
sessionObserver , if present. |
public java.util.List<org.macroing.cit.network.SessionObserver> getSessionObservers()
List
containing all currently added SessionObserver
s.
Modifying the returned List
should not affect this Server
instance.
This method may be overridden by sub-classes.
List
containing all currently added SessionObserver
spublic ServerConfiguration getServerConfiguration()
ServerConfiguration
.
This method should not return null
.
This method may be overridden by sub-classes.
ServerConfiguration
public void addSessionObserver(org.macroing.cit.network.SessionObserver sessionObserver)
sessionObserver
, if absent.
If sessionObserver
is null
, a NullPointerException
should be thrown.
This method may be overridden by sub-classes.
sessionObserver
- the SessionObserver
to addjava.lang.NullPointerException
- thrown if, and only if, sessionObserver
is null
public void removeSessionObserver(org.macroing.cit.network.SessionObserver sessionObserver)
sessionObserver
, if present.
If sessionObserver
is null
, a NullPointerException
should be thrown.
This method may be overridden by sub-classes.
sessionObserver
- the SessionObserver
to removejava.lang.NullPointerException
- thrown if, and only if, sessionObserver
is null