|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ReplicationContextHandler
An interface that provides handler methods for events which occurs
when a two replicas communicate with each other. This interface is
very similar to MINA IoHandler
, but there's a difference
in that this interface provide a ReplicationContext
instead of
an IoHandler
. It's usually wrapped by
ReplicationProtocolHandler
to work with MINA.
Method Summary | |
---|---|
void |
contextBegin(ReplicationContext ctx)
Invoked when a connection is established between two replicas. |
void |
contextEnd(ReplicationContext ctx)
Invoked when a connection is closed between two replicas. |
void |
contextIdle(ReplicationContext ctx,
org.apache.mina.common.IdleStatus status)
Invoked when two replicas are not exchanging any data for certain amount of time. |
void |
exceptionCaught(ReplicationContext ctx,
java.lang.Throwable cause)
Invoked when an exception is raised during the communication or executing replication logic. |
void |
messageReceived(ReplicationContext ctx,
java.lang.Object message)
Invoked when a message is received from a peer replica. |
void |
messageSent(ReplicationContext ctx,
java.lang.Object message)
Invoked when a message is received from a peer replica. |
Method Detail |
---|
void contextBegin(ReplicationContext ctx) throws java.lang.Exception
java.lang.Exception
void contextEnd(ReplicationContext ctx) throws java.lang.Exception
java.lang.Exception
void messageReceived(ReplicationContext ctx, java.lang.Object message) throws java.lang.Exception
java.lang.Exception
void messageSent(ReplicationContext ctx, java.lang.Object message) throws java.lang.Exception
java.lang.Exception
void exceptionCaught(ReplicationContext ctx, java.lang.Throwable cause) throws java.lang.Exception
java.lang.Exception
void contextIdle(ReplicationContext ctx, org.apache.mina.common.IdleStatus status) throws java.lang.Exception
java.lang.Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |