|
Holger's Java API |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.antelmann.net.NetConnectionServer.DefaultDispatcher
public static class NetConnectionServer.DefaultDispatcher
The DefaultDispatcher provides a default ConnectionDispatcher that is used when the NetConnectionServer constructor in the enclosing class is called with a NetConnectionHandler
| Constructor Summary | |
|---|---|
NetConnectionServer.DefaultDispatcher(NetConnectionHandler handler,
Handshake handshake)
|
|
NetConnectionServer.DefaultDispatcher(NetConnectionHandler handler,
Handshake handshake,
Logger logger)
|
|
| Method Summary | |
|---|---|
NetConnection |
createConnection(Socket socket)
simply returns SocketConnection.createServerConnection(socket, handshake) |
MessageDelegator |
createDispatcher(NetConnection con,
NetConnectionHandler handler)
responsible for creating the delegator based on the created connection and the associated handler |
NetConnectionHandler |
createHandler(NetConnection con)
uses the same handler (given in the constructor) for all connections |
Handshake |
getHandshake()
returns the Handshake given in the constructor |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public NetConnectionServer.DefaultDispatcher(NetConnectionHandler handler,
Handshake handshake)
public NetConnectionServer.DefaultDispatcher(NetConnectionHandler handler,
Handshake handshake,
Logger logger)
| Method Detail |
|---|
public NetConnection createConnection(Socket socket)
throws IOException
createConnection in interface ConnectionDispatcherIOExceptionSocketConnection.createServerConnection(Socket, Handshake)public NetConnectionHandler createHandler(NetConnection con)
createHandler in interface ConnectionDispatcherMessageDelegatorpublic Handshake getHandshake()
getHandshake in interface ConnectionDispatcher
public MessageDelegator createDispatcher(NetConnection con,
NetConnectionHandler handler)
ConnectionDispatcher
createDispatcher in interface ConnectionDispatcher
|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||