|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jboss.netty.channel.SimpleChannelHandler
org.jboss.netty.handler.timeout.IdleStateAwareChannelHandler
org.sdnplatform.sync.internal.rpc.AbstractRPCChannelHandler
org.sdnplatform.sync.internal.rpc.RPCChannelHandler
public class RPCChannelHandler
Channel handler for the RPC service
| Nested Class Summary | |
|---|---|
protected static class |
RPCChannelHandler.TVersionIterable
|
| Nested classes/interfaces inherited from class org.sdnplatform.sync.internal.rpc.AbstractRPCChannelHandler |
|---|
AbstractRPCChannelHandler.ChannelState |
| Nested classes/interfaces inherited from interface org.jboss.netty.channel.ChannelHandler |
|---|
org.jboss.netty.channel.ChannelHandler.Sharable |
| Field Summary | |
|---|---|
protected boolean |
isClientConnection
|
protected static org.slf4j.Logger |
logger
|
protected Node |
remoteNode
|
protected RPCService |
rpcService
|
protected SyncManager |
syncManager
|
| Fields inherited from class org.sdnplatform.sync.internal.rpc.AbstractRPCChannelHandler |
|---|
channelState, currentChallenge |
| Constructor Summary | |
|---|---|
RPCChannelHandler(SyncManager syncManager,
RPCService rpcService)
|
|
| Method Summary | |
|---|---|
void |
channelDisconnected(org.jboss.netty.channel.ChannelHandlerContext ctx,
org.jboss.netty.channel.ChannelStateEvent e)
|
void |
channelOpen(org.jboss.netty.channel.ChannelHandlerContext ctx,
org.jboss.netty.channel.ChannelStateEvent e)
|
protected AuthScheme |
getAuthScheme()
Get the type of authentication to use for this connection |
protected SyncMessage |
getError(int transactionId,
java.lang.Exception error,
MessageType type)
Generate an error message from the provided transaction ID and exception |
protected java.lang.Short |
getLocalNodeId()
Get the node ID for the local node if appropriate |
protected java.lang.String |
getLocalNodeIdString()
Get the node ID for the local node as a string for use output |
protected java.lang.Short |
getRemoteNodeId()
Get the node ID for the remote node if its connected |
protected java.lang.String |
getRemoteNodeIdString()
Get the node ID for the remote node if its connected as a string for use output |
protected byte[] |
getSharedSecret()
Get a shared secret to be used for authentication handshake. |
protected int |
getTransactionId()
Get a transaction ID suitable for sending an async message |
protected void |
handleClusterJoinRequest(ClusterJoinRequestMessage request,
org.jboss.netty.channel.Channel channel)
|
protected void |
handleCursorRequest(CursorRequestMessage request,
org.jboss.netty.channel.Channel channel)
|
protected void |
handleDeleteRequest(DeleteRequestMessage request,
org.jboss.netty.channel.Channel channel)
|
protected void |
handleError(ErrorMessage error,
org.jboss.netty.channel.Channel channel)
|
protected void |
handleFullSyncRequest(FullSyncRequestMessage request,
org.jboss.netty.channel.Channel channel)
|
protected void |
handleGetRequest(GetRequestMessage request,
org.jboss.netty.channel.Channel channel)
|
protected void |
handleHello(HelloMessage hello,
org.jboss.netty.channel.Channel channel)
|
protected void |
handlePutRequest(PutRequestMessage request,
org.jboss.netty.channel.Channel channel)
|
protected void |
handleRegisterRequest(RegisterRequestMessage request,
org.jboss.netty.channel.Channel channel)
|
protected void |
handleSyncOffer(SyncOfferMessage request,
org.jboss.netty.channel.Channel channel)
|
protected void |
handleSyncRequest(SyncRequestMessage request,
org.jboss.netty.channel.Channel channel)
|
protected void |
handleSyncValue(SyncValueMessage request,
org.jboss.netty.channel.Channel channel)
|
protected void |
handleSyncValueResponse(SyncValueResponseMessage message,
org.jboss.netty.channel.Channel channel)
|
void |
messageReceived(org.jboss.netty.channel.ChannelHandlerContext ctx,
org.jboss.netty.channel.MessageEvent e)
|
protected void |
startAntientropy()
|
protected void |
updateCounter(IDebugCounter counter,
int incr)
|
| Methods inherited from class org.sdnplatform.sync.internal.rpc.AbstractRPCChannelHandler |
|---|
channelConnected, channelIdle, error, exceptionCaught, handleClusterJoinResponse, handleCursorResponse, handleDeleteResponse, handleEchoRequest, handleGetResponse, handlePutResponse, handleRegisterResponse, handleSMAuthenticated, handleSyncMessage, handleUnknownMessage, handshake, handshakeChallengeResponse, unexpectedMessage |
| Methods inherited from class org.jboss.netty.handler.timeout.IdleStateAwareChannelHandler |
|---|
handleUpstream |
| Methods inherited from class org.jboss.netty.channel.SimpleChannelHandler |
|---|
bindRequested, channelBound, channelClosed, channelInterestChanged, channelUnbound, childChannelClosed, childChannelOpen, closeRequested, connectRequested, disconnectRequested, handleDownstream, setInterestOpsRequested, unbindRequested, writeComplete, writeRequested |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final org.slf4j.Logger logger
protected SyncManager syncManager
protected RPCService rpcService
protected Node remoteNode
protected boolean isClientConnection
| Constructor Detail |
|---|
public RPCChannelHandler(SyncManager syncManager,
RPCService rpcService)
| Method Detail |
|---|
public void channelOpen(org.jboss.netty.channel.ChannelHandlerContext ctx,
org.jboss.netty.channel.ChannelStateEvent e)
throws java.lang.Exception
channelOpen in class org.jboss.netty.channel.SimpleChannelHandlerjava.lang.Exception
public void channelDisconnected(org.jboss.netty.channel.ChannelHandlerContext ctx,
org.jboss.netty.channel.ChannelStateEvent e)
throws java.lang.Exception
channelDisconnected in class org.jboss.netty.channel.SimpleChannelHandlerjava.lang.Exception
public void messageReceived(org.jboss.netty.channel.ChannelHandlerContext ctx,
org.jboss.netty.channel.MessageEvent e)
throws java.lang.Exception
messageReceived in class AbstractRPCChannelHandlerjava.lang.Exception
protected void handleHello(HelloMessage hello,
org.jboss.netty.channel.Channel channel)
handleHello in class AbstractRPCChannelHandler
protected void handleGetRequest(GetRequestMessage request,
org.jboss.netty.channel.Channel channel)
handleGetRequest in class AbstractRPCChannelHandler
protected void handlePutRequest(PutRequestMessage request,
org.jboss.netty.channel.Channel channel)
handlePutRequest in class AbstractRPCChannelHandler
protected void handleDeleteRequest(DeleteRequestMessage request,
org.jboss.netty.channel.Channel channel)
handleDeleteRequest in class AbstractRPCChannelHandler
protected void handleSyncValue(SyncValueMessage request,
org.jboss.netty.channel.Channel channel)
handleSyncValue in class AbstractRPCChannelHandler
protected void handleSyncValueResponse(SyncValueResponseMessage message,
org.jboss.netty.channel.Channel channel)
handleSyncValueResponse in class AbstractRPCChannelHandler
protected void handleSyncOffer(SyncOfferMessage request,
org.jboss.netty.channel.Channel channel)
handleSyncOffer in class AbstractRPCChannelHandler
protected void handleSyncRequest(SyncRequestMessage request,
org.jboss.netty.channel.Channel channel)
handleSyncRequest in class AbstractRPCChannelHandler
protected void handleFullSyncRequest(FullSyncRequestMessage request,
org.jboss.netty.channel.Channel channel)
handleFullSyncRequest in class AbstractRPCChannelHandler
protected void handleCursorRequest(CursorRequestMessage request,
org.jboss.netty.channel.Channel channel)
handleCursorRequest in class AbstractRPCChannelHandler
protected void handleRegisterRequest(RegisterRequestMessage request,
org.jboss.netty.channel.Channel channel)
handleRegisterRequest in class AbstractRPCChannelHandler
protected void handleClusterJoinRequest(ClusterJoinRequestMessage request,
org.jboss.netty.channel.Channel channel)
handleClusterJoinRequest in class AbstractRPCChannelHandler
protected void handleError(ErrorMessage error,
org.jboss.netty.channel.Channel channel)
handleError in class AbstractRPCChannelHandlerprotected java.lang.Short getLocalNodeId()
AbstractRPCChannelHandler
getLocalNodeId in class AbstractRPCChannelHandlerprotected java.lang.Short getRemoteNodeId()
AbstractRPCChannelHandler
getRemoteNodeId in class AbstractRPCChannelHandlerprotected java.lang.String getLocalNodeIdString()
AbstractRPCChannelHandler
getLocalNodeIdString in class AbstractRPCChannelHandlerprotected java.lang.String getRemoteNodeIdString()
AbstractRPCChannelHandler
getRemoteNodeIdString in class AbstractRPCChannelHandlerprotected int getTransactionId()
AbstractRPCChannelHandler
getTransactionId in class AbstractRPCChannelHandlerprotected AuthScheme getAuthScheme()
AbstractRPCChannelHandler
getAuthScheme in class AbstractRPCChannelHandler
protected byte[] getSharedSecret()
throws AuthException
AbstractRPCChannelHandler
getSharedSecret in class AbstractRPCChannelHandlerAuthException
protected SyncMessage getError(int transactionId,
java.lang.Exception error,
MessageType type)
AbstractRPCChannelHandler
getError in class AbstractRPCChannelHandlertransactionId - the transaction Iderror - the exceptiontype - the type of the message that generated the error
SyncError message
protected void updateCounter(IDebugCounter counter,
int incr)
protected void startAntientropy()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||