org.apache.directory.server.ldap.replication.consumer
Interface ReplicationConsumer

All Known Implementing Classes:
ReplicationConsumerImpl

public interface ReplicationConsumer

An interface for consumers of a service which receives the ldap entries as and when a event happens in the server. The data received might vary based on the internal configuration used by implementation.

Author:
Apache Directory Project

Field Summary
static boolean DIFFERED
          A flag we used when we want to connect after a waiting delay
static boolean NOW
          A flag we used when we want to connect without waiting
 
Method Summary
 boolean connect(boolean now)
          Connect the consumer, connection immediately or wait before reconnection
 ReplicationConsumerConfig getConfig()
           
 String getId()
           
 void init(org.apache.directory.server.core.api.DirectoryService dirService)
          Initializes the consumer
 void ping()
          Test the connection with the provider.
 void setConfig(ReplicationConsumerConfig config)
          Sets the configuration of the consumer
 ReplicationStatusEnum startSync()
          Starts the synchronization operation
 void stop()
          Stops the consumer
 

Field Detail

NOW

static final boolean NOW
A flag we used when we want to connect without waiting

See Also:
Constant Field Values

DIFFERED

static final boolean DIFFERED
A flag we used when we want to connect after a waiting delay

See Also:
Constant Field Values
Method Detail

setConfig

void setConfig(ReplicationConsumerConfig config)
Sets the configuration of the consumer

Parameters:
config - the configuration of the consumer

getConfig

ReplicationConsumerConfig getConfig()
Returns:
get the configuration of the consumer

init

void init(org.apache.directory.server.core.api.DirectoryService dirService)
          throws Exception
Initializes the consumer

Parameters:
dirService - the DirectoryService
Throws:
Exception - If the initialization failed

connect

boolean connect(boolean now)
Connect the consumer, connection immediately or wait before reconnection

Parameters:
now - A param that tells the consumer to connect immediately or not
Returns:
true if the consumer is connected, false otherwise

ping

void ping()
Test the connection with the provider. It does connect to the provider, and tries to bind on it using the consumer credentials.


stop

void stop()
Stops the consumer


getId

String getId()
Returns:
the identifier of the consumer instance

startSync

ReplicationStatusEnum startSync()
Starts the synchronization operation



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