Class GracefulDisconnectResponseImpl

java.lang.Object
org.apache.directory.api.ldap.model.message.AbstractMessage
org.apache.directory.api.ldap.model.message.AbstractResponse
org.apache.directory.api.ldap.model.message.AbstractResultResponse
org.apache.directory.api.ldap.model.message.AbstractExtendedResponse
org.apache.directory.api.ldap.extras.extended.gracefulDisconnect.GracefulDisconnectResponseImpl
All Implemented Interfaces:
GracefulDisconnectResponse, org.apache.directory.api.ldap.model.message.ExtendedResponse, org.apache.directory.api.ldap.model.message.Message, org.apache.directory.api.ldap.model.message.Response, org.apache.directory.api.ldap.model.message.ResultResponse

public class GracefulDisconnectResponseImpl extends org.apache.directory.api.ldap.model.message.AbstractExtendedResponse implements GracefulDisconnectResponse
An unsolicited notification, extended response, intended for notifying clients of up coming disconnection due to intended service windows. Unlike the NoticeOfDisconnect this response contains additional information about the amount of time the server will be offline and exactly when it intends to shutdown.
Author:
Apache Directory Project
  • Field Summary

    Fields inherited from class org.apache.directory.api.ldap.model.message.AbstractExtendedResponse

    responseName

    Fields inherited from class org.apache.directory.api.ldap.model.message.AbstractResultResponse

    ldapResult

    Fields inherited from class org.apache.directory.api.ldap.model.message.AbstractMessage

    controls

    Fields inherited from interface GracefulDisconnectResponse

    EXTENSION_OID
  • Constructor Summary

    Constructors
    Constructor
    Description
    Instantiates a new graceful disconnect.
    GracefulDisconnectResponseImpl(int timeOffline, int delay)
    Instantiates a new graceful disconnect.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addReplicatedContexts(String replicatedContext)
    Add a new URL of a replicated server
    int
    Gets the delay before disconnection, in seconds.
    org.apache.directory.api.ldap.model.message.Referral
    Gets the replicated contexts.
    int
    Gets the offline time after disconnection, in minutes.
    void
    setDelay(int delay)
    Sets the delay before disconnection, in seconds.
    void
    Sets the OID uniquely identifying this extended response (a.k.a. its name).
    void
    setTimeOffline(int timeOffline)
    Sets the time offline after disconnection, in minutes.

    Methods inherited from class org.apache.directory.api.ldap.model.message.AbstractExtendedResponse

    equals, getResponseName, hashCode, toString

    Methods inherited from class org.apache.directory.api.ldap.model.message.AbstractResultResponse

    getLdapResult

    Methods inherited from class org.apache.directory.api.ldap.model.message.AbstractMessage

    addAllControls, addControl, get, getControl, getControls, getMessageId, getType, hasControl, put, removeControl, setMessageId, toString

    Methods inherited from class Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.apache.directory.api.ldap.model.message.ExtendedResponse

    getResponseName

    Methods inherited from interface org.apache.directory.api.ldap.model.message.Message

    addAllControls, addControl, get, getControl, getControls, getMessageId, getType, hasControl, put, removeControl, setMessageId

    Methods inherited from interface org.apache.directory.api.ldap.model.message.ResultResponse

    getLdapResult
  • Constructor Details

    • GracefulDisconnectResponseImpl

      public GracefulDisconnectResponseImpl()
      Instantiates a new graceful disconnect.
    • GracefulDisconnectResponseImpl

      public GracefulDisconnectResponseImpl(int timeOffline, int delay)
      Instantiates a new graceful disconnect.
      Parameters:
      timeOffline - the offline time after disconnect, in minutes
      delay - the delay before disconnect, in seconds
  • Method Details

    • setResponseName

      public void setResponseName(String oid)
      Sets the OID uniquely identifying this extended response (a.k.a. its name).
      Specified by:
      setResponseName in interface org.apache.directory.api.ldap.model.message.ExtendedResponse
      Overrides:
      setResponseName in class org.apache.directory.api.ldap.model.message.AbstractExtendedResponse
      Parameters:
      oid - the OID of the extended response type.
    • getDelay

      public int getDelay()
      Gets the delay before disconnection, in seconds.
      Specified by:
      getDelay in interface GracefulDisconnectResponse
      Returns:
      the delay before disconnection
    • setDelay

      public void setDelay(int delay)
      Sets the delay before disconnection, in seconds.
      Specified by:
      setDelay in interface GracefulDisconnectResponse
      Parameters:
      delay - the new delay before disconnection
    • getTimeOffline

      public int getTimeOffline()
      Gets the offline time after disconnection, in minutes.
      Specified by:
      getTimeOffline in interface GracefulDisconnectResponse
      Returns:
      the offline time after disconnection
    • setTimeOffline

      public void setTimeOffline(int timeOffline)
      Sets the time offline after disconnection, in minutes.
      Specified by:
      setTimeOffline in interface GracefulDisconnectResponse
      Parameters:
      timeOffline - the new time offline after disconnection
    • getReplicatedContexts

      public org.apache.directory.api.ldap.model.message.Referral getReplicatedContexts()
      Gets the replicated contexts.
      Specified by:
      getReplicatedContexts in interface GracefulDisconnectResponse
      Returns:
      the replicated contexts
    • addReplicatedContexts

      public void addReplicatedContexts(String replicatedContext)
      Add a new URL of a replicated server
      Specified by:
      addReplicatedContexts in interface GracefulDisconnectResponse
      Parameters:
      replicatedContext - The replicated server to add.