Class LightweightServerHandler
- java.lang.Object
-
- org.opends.server.api.MonitorProvider<MonitorProviderCfg>
-
- org.opends.server.replication.server.LightweightServerHandler
-
public class LightweightServerHandler extends MonitorProvider<MonitorProviderCfg>
This class defines a server handler dedicated to the remote LDAP servers connected to a remote Replication Server. This class is necessary because we want to provide monitor entries for them and because the monitor API only allows one entry by MonitorProvider instance so that no other class can provide the monitor entry for these objects. One instance of this class is created for each instance of remote LDAP server connected to a remote Replication Server.
-
-
Constructor Summary
Constructors Constructor Description LightweightServerHandler(ReplicationServerHandler replServerHandler, DSInfo dsInfo)Creates a new LightweightServerHandler with the provided serverId, connected to the remote Replication Server represented by replServerHandler.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MonitorDatagetMonitorData()Retrieves a set of attributes containing monitor data that should be returned to the client if the corresponding monitor entry is requested.StringgetMonitorInstanceName()Retrieves the name of this monitor provider.intgetServerId()Get the serverID associated with this LDAP server / directory server.voidinitializeMonitorProvider(MonitorProviderCfg configuration)Initializes this monitor provider based on the information in the provided configuration entry.voidstartHandler()Start this server handler processing.voidstopHandler()Stop this server handler processing.DSInfotoDSInfo()Creates a DSInfo structure representing this remote DS.-
Methods inherited from class org.opends.server.api.MonitorProvider
finalizeMonitorProvider, getMonitorObjectClass, isConfigurationAcceptable, scheduleUpdate
-
-
-
-
Constructor Detail
-
LightweightServerHandler
public LightweightServerHandler(ReplicationServerHandler replServerHandler, DSInfo dsInfo)
Creates a new LightweightServerHandler with the provided serverId, connected to the remote Replication Server represented by replServerHandler.- Parameters:
replServerHandler- The server handler of the RS this remote DS is connected todsInfo- all the info for the represented DS
-
-
Method Detail
-
toDSInfo
public DSInfo toDSInfo()
Creates a DSInfo structure representing this remote DS.- Returns:
- The DSInfo structure representing this remote DS
-
getServerId
public int getServerId()
Get the serverID associated with this LDAP server / directory server.- Returns:
- The serverId.
-
startHandler
public void startHandler()
Start this server handler processing.
-
stopHandler
public void stopHandler()
Stop this server handler processing.
-
initializeMonitorProvider
public void initializeMonitorProvider(MonitorProviderCfg configuration) throws ConfigException, InitializationException
Initializes this monitor provider based on the information in the provided configuration entry.- Overrides:
initializeMonitorProviderin classMonitorProvider<MonitorProviderCfg>- Parameters:
configuration- The configuration to use to initialize this monitor provider.- Throws:
ConfigException- If an unrecoverable problem arises in the process of performing the initialization.InitializationException- If a problem occurs during initialization that is not related to the server configuration.
-
getMonitorInstanceName
public String getMonitorInstanceName()
Retrieves the name of this monitor provider. It should be unique among all monitor providers, including all instances of the same monitor provider.- Specified by:
getMonitorInstanceNamein classMonitorProvider<MonitorProviderCfg>- Returns:
- The name of this monitor provider.
-
getMonitorData
public MonitorData getMonitorData()
Description copied from class:MonitorProviderRetrieves a set of attributes containing monitor data that should be returned to the client if the corresponding monitor entry is requested.- Specified by:
getMonitorDatain classMonitorProvider<MonitorProviderCfg>- Returns:
- A set of attributes containing monitor data that should be returned to the client if the corresponding monitor entry is requested.
-
-