org.apache.directory.server.ldap.replication.provider
Class SyncReplSearchListener

java.lang.Object
  extended by org.apache.directory.server.ldap.replication.provider.SyncReplSearchListener
All Implemented Interfaces:
org.apache.directory.api.ldap.model.message.AbandonListener, org.apache.directory.server.core.api.event.DirectoryListener

public class SyncReplSearchListener
extends Object
implements org.apache.directory.server.core.api.event.DirectoryListener, org.apache.directory.api.ldap.model.message.AbandonListener

A listener associated with the replication system. It does send the modifications to the consumer, if it's connected, or store the data into a queue for a later transmission. Note: we always log the entry irrespective of the client's connection status for guaranteed delivery

Author:
Apache Directory Project

Method Summary
 void entryAdded(org.apache.directory.server.core.api.interceptor.context.AddOperationContext addContext)
          Process a ADD operation.
 void entryDeleted(org.apache.directory.server.core.api.interceptor.context.DeleteOperationContext deleteContext)
          Process a Delete operation.
 void entryModified(org.apache.directory.server.core.api.interceptor.context.ModifyOperationContext modifyContext)
          Process a Modify operation.
 void entryMoved(org.apache.directory.server.core.api.interceptor.context.MoveOperationContext moveContext)
          Process a Move operation.
 void entryMovedAndRenamed(org.apache.directory.server.core.api.interceptor.context.MoveAndRenameOperationContext moveAndRenameContext)
          Process a MoveAndRename operation.
 void entryRenamed(org.apache.directory.server.core.api.interceptor.context.RenameOperationContext renameContext)
          Process a Rename operation.
 boolean isPushInRealTime()
           
 boolean isSynchronous()
           
 void requestAbandoned(org.apache.directory.api.ldap.model.message.AbandonableRequest searchRequest)
          Abandon a SearchRequest
 void setPushInRealTime(boolean pushInRealTime)
          Set the pushInRealTime parameter
 void setSearchRequest(org.apache.directory.api.ldap.model.message.SearchRequest searchRequest)
          Stores the SearchRequest, and associate a AbandonListener to it
 void setSession(LdapSession session)
          Store the Ldap session to use
 String toString()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

setSession

public void setSession(LdapSession session)
Store the Ldap session to use

Parameters:
session - The Ldap Session to use

setSearchRequest

public void setSearchRequest(org.apache.directory.api.ldap.model.message.SearchRequest searchRequest)
Stores the SearchRequest, and associate a AbandonListener to it

Parameters:
searchRequest - The SearchRequest instance to store

isSynchronous

public boolean isSynchronous()
Specified by:
isSynchronous in interface org.apache.directory.server.core.api.event.DirectoryListener

requestAbandoned

public void requestAbandoned(org.apache.directory.api.ldap.model.message.AbandonableRequest searchRequest)
Abandon a SearchRequest

Specified by:
requestAbandoned in interface org.apache.directory.api.ldap.model.message.AbandonListener
Parameters:
searchRequest - The SearchRequest to abandon

entryAdded

public void entryAdded(org.apache.directory.server.core.api.interceptor.context.AddOperationContext addContext)
Process a ADD operation. The added entry is pushed to the consumer if it's connected, or stored in the consumer's queue if it's not.

Specified by:
entryAdded in interface org.apache.directory.server.core.api.event.DirectoryListener
Parameters:
addContext - The Addition operation context

entryDeleted

public void entryDeleted(org.apache.directory.server.core.api.interceptor.context.DeleteOperationContext deleteContext)
Process a Delete operation. A delete event is send to the consumer, or stored in its queue if the consumer is not connected.

Specified by:
entryDeleted in interface org.apache.directory.server.core.api.event.DirectoryListener
Parameters:
deleteContext - The delete operation context

entryModified

public void entryModified(org.apache.directory.server.core.api.interceptor.context.ModifyOperationContext modifyContext)
Process a Modify operation. A modify event is send to the consumer, or stored in its queue if the consumer is not connected.

Specified by:
entryModified in interface org.apache.directory.server.core.api.event.DirectoryListener
Parameters:
modifyContext - The modify operation context

entryMoved

public void entryMoved(org.apache.directory.server.core.api.interceptor.context.MoveOperationContext moveContext)
Process a Move operation. A MODDN event is send to the consumer, or stored in its queue if the consumer is not connected.

Specified by:
entryMoved in interface org.apache.directory.server.core.api.event.DirectoryListener
Parameters:
moveContext - The move operation context

entryMovedAndRenamed

public void entryMovedAndRenamed(org.apache.directory.server.core.api.interceptor.context.MoveAndRenameOperationContext moveAndRenameContext)
Process a MoveAndRename operation. A MODDN event is send to the consumer, or stored in its queue if the consumer is not connected.

Specified by:
entryMovedAndRenamed in interface org.apache.directory.server.core.api.event.DirectoryListener
Parameters:
moveAndRenameContext - The move and rename operation context

entryRenamed

public void entryRenamed(org.apache.directory.server.core.api.interceptor.context.RenameOperationContext renameContext)
Process a Rename operation. A MODDN event is send to the consumer, or stored in its queue if the consumer is not connected.

Specified by:
entryRenamed in interface org.apache.directory.server.core.api.event.DirectoryListener
Parameters:
renameContext - The rename operation context

isPushInRealTime

public boolean isPushInRealTime()
Returns:
true if the entries are sent to the consumer in real time

setPushInRealTime

public void setPushInRealTime(boolean pushInRealTime)
Set the pushInRealTime parameter

Parameters:
pushInRealTime - true if the entries must be push to the consumer directly

toString

public String toString()

Overrides:
toString in class Object


Copyright © 2003-2013 The Apache Software Foundation. All Rights Reserved.