public final class MinaServer
extends org.macroing.cit.server.Server
Server
implementation that uses Apache MINA.Modifier and Type | Method and Description |
---|---|
java.util.Optional<org.apache.mina.common.IoAcceptor> |
getIoAcceptor()
Returns the optional
IoAcceptor used by this MinaServer instance. |
org.apache.mina.common.IoAcceptorConfig |
getIoAcceptorConfig()
Returns the
IoAcceptorConfig used by this MinaServer instance. |
static MinaServer |
newInstance()
Returns a new
MinaServer instance. |
protected void |
onStart()
Overridden to handle starting of this
MinaServer instance. |
protected void |
onStop()
Overridden to handle stopping of this
MinaServer instance. |
java.lang.String |
toString()
Returns a
String representation of this MinaServer instance. |
addSessionObserver, getServerConfiguration, getSessionObservers, removeSessionObserver
public org.apache.mina.common.IoAcceptorConfig getIoAcceptorConfig()
IoAcceptorConfig
used by this MinaServer
instance.IoAcceptorConfig
used by this MinaServer
instancepublic java.util.Optional<org.apache.mina.common.IoAcceptor> getIoAcceptor()
IoAcceptor
used by this MinaServer
instance.
The IoAcceptor
is optional in that it only exists while this MinaServer
is running.
IoAcceptor
used by this MinaServer
instancepublic java.lang.String toString()
String
representation of this MinaServer
instance.toString
in class java.lang.Object
String
representation of this MinaServer
instanceprotected void onStart()
MinaServer
instance.
If an I/O error occurs, an UncheckedIOException
will be thrown.
onStart
in class org.macroing.cit.messaging.Messaging
java.io.UncheckedIOException
- thrown if, and only if, an I/O error occursprotected void onStop()
MinaServer
instance.onStop
in class org.macroing.cit.messaging.Messaging
public static MinaServer newInstance()
MinaServer
instance.MinaServer
instance