Class 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 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 to
        dsInfo - 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.
      • 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:
        getMonitorInstanceName in class MonitorProvider<MonitorProviderCfg>
        Returns:
        The name of this monitor provider.
      • getMonitorData

        public MonitorData getMonitorData()
        Description copied from class: MonitorProvider
        Retrieves a set of attributes containing monitor data that should be returned to the client if the corresponding monitor entry is requested.
        Specified by:
        getMonitorData in class MonitorProvider<MonitorProviderCfg>
        Returns:
        A set of attributes containing monitor data that should be returned to the client if the corresponding monitor entry is requested.