|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectfabric.common.AbstractConnectionHandler<java.lang.Object,SessionAttributes,MessageHandlerThread>
fabric.worker.remote.ConnectionHandler
public class ConnectionHandler
Manages a connection with a remote worker. The connection is used to receive requests from and to send responses to the node.
XXX Assumes connections never get dropped.
Constructor Summary | |
---|---|
ConnectionHandler(RemoteCallManager rcm)
|
Method Summary | |
---|---|
protected java.lang.Object |
getNodeByName(java.lang.String name)
|
protected java.lang.String |
getThreadName(java.net.SocketAddress remote,
SessionAttributes session)
Returns the name for the message-handler thread that will be handling the given connection. |
protected void |
logAuthenticationFailure()
Logs an authentication failure of the remote host. |
protected void |
logSession(java.net.SocketAddress remote,
SessionAttributes session)
Logs a successful connection. |
protected SessionAttributes |
newAuthenticatedSession(java.lang.Object node,
java.lang.String remoteNodeName,
java.lang.String remoteNodePrincipalName,
NodePrincipal remoteNodePrincipal)
|
protected SessionAttributes |
newUnauthenticatedSession(java.lang.Object node,
java.lang.String remoteNodeName)
|
Methods inherited from class fabric.common.AbstractConnectionHandler |
---|
handle, shutdown |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ConnectionHandler(RemoteCallManager rcm)
Method Detail |
---|
protected java.lang.Object getNodeByName(java.lang.String name)
getNodeByName
in class AbstractConnectionHandler<java.lang.Object,SessionAttributes,MessageHandlerThread>
protected java.lang.String getThreadName(java.net.SocketAddress remote, SessionAttributes session)
AbstractConnectionHandler
getThreadName
in class AbstractConnectionHandler<java.lang.Object,SessionAttributes,MessageHandlerThread>
protected void logAuthenticationFailure()
AbstractConnectionHandler
logAuthenticationFailure
in class AbstractConnectionHandler<java.lang.Object,SessionAttributes,MessageHandlerThread>
protected void logSession(java.net.SocketAddress remote, SessionAttributes session)
AbstractConnectionHandler
logSession
in class AbstractConnectionHandler<java.lang.Object,SessionAttributes,MessageHandlerThread>
protected SessionAttributes newAuthenticatedSession(java.lang.Object node, java.lang.String remoteNodeName, java.lang.String remoteNodePrincipalName, NodePrincipal remoteNodePrincipal)
newAuthenticatedSession
in class AbstractConnectionHandler<java.lang.Object,SessionAttributes,MessageHandlerThread>
node
- the local node with which the session was established.remoteNodeName
- the name of the remote node.remoteNodePrincipalName
- the String representation of the remote node's principal.remoteNodePrincipal
- the NodePrincipal corresponding to the remote node.
protected SessionAttributes newUnauthenticatedSession(java.lang.Object node, java.lang.String remoteNodeName)
newUnauthenticatedSession
in class AbstractConnectionHandler<java.lang.Object,SessionAttributes,MessageHandlerThread>
node
- the local node with which the session was established.remoteNodeName
- the name of the remote node.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |