org.apache.directory.mitosis.service.protocol.handler
Class ReplicationServerContextHandler

java.lang.Object
  extended by org.apache.directory.mitosis.service.protocol.handler.ReplicationServerContextHandler
All Implemented Interfaces:
ReplicationContextHandler

public class ReplicationServerContextHandler
extends java.lang.Object
implements ReplicationContextHandler

ReplicationContextHandler that implements server-side replication logic which retrieves any changes occurred in remote replicas. Please refer to ReplicationClientContextHandler for the detailed protocol flow and the description of the replication logic execution.

Version:
$Rev: 116 $, $Date: 2006-09-18 13:47:53Z $
Author:
The Apache Directory Project (dev@directory.apache.org)

Constructor Summary
ReplicationServerContextHandler()
           
 
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReplicationServerContextHandler

public ReplicationServerContextHandler()
Method Detail

contextBegin

public void contextBegin(ReplicationContext ctx)
                  throws java.lang.Exception
Description copied from interface: ReplicationContextHandler
Invoked when a connection is established between two replicas.

Specified by:
contextBegin in interface ReplicationContextHandler
Throws:
java.lang.Exception

contextEnd

public void contextEnd(ReplicationContext ctx)
                throws java.lang.Exception
Description copied from interface: ReplicationContextHandler
Invoked when a connection is closed between two replicas.

Specified by:
contextEnd in interface ReplicationContextHandler
Throws:
java.lang.Exception

messageReceived

public void messageReceived(ReplicationContext ctx,
                            java.lang.Object message)
                     throws java.lang.Exception
Description copied from interface: ReplicationContextHandler
Invoked when a message is received from a peer replica.

Specified by:
messageReceived in interface ReplicationContextHandler
Throws:
java.lang.Exception

messageSent

public void messageSent(ReplicationContext ctx,
                        java.lang.Object message)
                 throws java.lang.Exception
Description copied from interface: ReplicationContextHandler
Invoked when a message is received from a peer replica.

Specified by:
messageSent in interface ReplicationContextHandler
Throws:
java.lang.Exception

exceptionCaught

public void exceptionCaught(ReplicationContext ctx,
                            java.lang.Throwable cause)
                     throws java.lang.Exception
Description copied from interface: ReplicationContextHandler
Invoked when an exception is raised during the communication or executing replication logic.

Specified by:
exceptionCaught in interface ReplicationContextHandler
Throws:
java.lang.Exception

contextIdle

public void contextIdle(ReplicationContext ctx,
                        org.apache.mina.common.IdleStatus status)
                 throws java.lang.Exception
Description copied from interface: ReplicationContextHandler
Invoked when two replicas are not exchanging any data for certain amount of time.

Specified by:
contextIdle in interface ReplicationContextHandler
Throws:
java.lang.Exception


Copyright © 2003-2009 Apache Software Foundation. All Rights Reserved.