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,ExtendedResponse,Message,Response,ResultResponse
public class GracefulDisconnectResponseImpl extends AbstractExtendedResponse implements GracefulDisconnectResponse
An unsolicited notification, extended response, intended for notifying clients of up coming disconnection due to intended service windows. Unlike theNoticeOfDisconnectthis 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 org.apache.directory.api.ldap.extras.extended.gracefulDisconnect.GracefulDisconnectResponse
EXTENSION_OID
-
-
Constructor Summary
Constructors Constructor Description GracefulDisconnectResponseImpl()Instantiates a new graceful disconnect.GracefulDisconnectResponseImpl(int timeOffline, int delay)Instantiates a new graceful disconnect.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddReplicatedContexts(String replicatedContext)Add a new URL of a replicated serverintgetDelay()Gets the delay before disconnection, in seconds.ReferralgetReplicatedContexts()Gets the replicated contexts.intgetTimeOffline()Gets the offline time after disconnection, in minutes.voidsetDelay(int delay)Sets the delay before disconnection, in seconds.voidsetResponseName(String oid)Sets the OID uniquely identifying this extended response (a.k.a.voidsetTimeOffline(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 java.lang.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 Detail
-
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 minutesdelay- the delay before disconnect, in seconds
-
-
Method Detail
-
setResponseName
public void setResponseName(String oid)
Sets the OID uniquely identifying this extended response (a.k.a. its name).- Specified by:
setResponseNamein interfaceExtendedResponse- Overrides:
setResponseNamein classAbstractExtendedResponse- Parameters:
oid- the OID of the extended response type.
-
getDelay
public int getDelay()
Gets the delay before disconnection, in seconds.- Specified by:
getDelayin interfaceGracefulDisconnectResponse- Returns:
- the delay before disconnection
-
setDelay
public void setDelay(int delay)
Sets the delay before disconnection, in seconds.- Specified by:
setDelayin interfaceGracefulDisconnectResponse- Parameters:
delay- the new delay before disconnection
-
getTimeOffline
public int getTimeOffline()
Gets the offline time after disconnection, in minutes.- Specified by:
getTimeOfflinein interfaceGracefulDisconnectResponse- Returns:
- the offline time after disconnection
-
setTimeOffline
public void setTimeOffline(int timeOffline)
Sets the time offline after disconnection, in minutes.- Specified by:
setTimeOfflinein interfaceGracefulDisconnectResponse- Parameters:
timeOffline- the new time offline after disconnection
-
getReplicatedContexts
public Referral getReplicatedContexts()
Gets the replicated contexts.- Specified by:
getReplicatedContextsin interfaceGracefulDisconnectResponse- Returns:
- the replicated contexts
-
addReplicatedContexts
public void addReplicatedContexts(String replicatedContext)
Add a new URL of a replicated server- Specified by:
addReplicatedContextsin interfaceGracefulDisconnectResponse- Parameters:
replicatedContext- The replicated server to add.
-
-