Class GracefulDisconnectResponseDecorator
- java.lang.Object
-
- org.apache.directory.api.ldap.codec.api.MessageDecorator<M>
-
- org.apache.directory.api.ldap.codec.decorators.ResponseDecorator<R>
-
- org.apache.directory.api.ldap.codec.decorators.ExtendedResponseDecorator<GracefulDisconnectResponse>
-
- org.apache.directory.api.ldap.extras.extended.ads_impl.gracefulDisconnect.GracefulDisconnectResponseDecorator
-
- All Implemented Interfaces:
Asn1Object
,Decorator<GracefulDisconnectResponse>
,GracefulDisconnectResponse
,ExtendedResponse
,Message
,Response
,ResultResponse
public class GracefulDisconnectResponseDecorator extends ExtendedResponseDecorator<GracefulDisconnectResponse> implements GracefulDisconnectResponse
A Decorator for CancelResponses.- Author:
- Apache Directory Project
-
-
Field Summary
-
Fields inherited from interface org.apache.directory.api.ldap.extras.extended.gracefulDisconnect.GracefulDisconnectResponse
EXTENSION_OID
-
-
Constructor Summary
Constructors Constructor Description GracefulDisconnectResponseDecorator(LdapApiService codec, GracefulDisconnectResponse decoratedMessage)
Creates a new instance of CancelResponseDecorator.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addReplicatedContexts(String replicatedContext)
Add a new URL of a replicated serverint
getDelay()
Gets the delay before disconnection, in seconds.Referral
getReplicatedContexts()
Gets the replicated contexts.byte[]
getResponseValue()
Gets the response OID specific encoded response values.int
getTimeOffline()
Gets the offline time after disconnection, in minutes.void
setDelay(int delay)
Sets the delay before disconnection, in seconds.void
setResponseValue(byte[] responseValue)
Sets the response OID specific encoded response values.void
setTimeOffline(int timeOffline)
Sets the time offline after disconnection, in minutes.String
toString()
Return a string representation of the graceful disconnect-
Methods inherited from class org.apache.directory.api.ldap.codec.decorators.ExtendedResponseDecorator
computeLength, encode, getResponseName, setResponseName
-
Methods inherited from class org.apache.directory.api.ldap.codec.decorators.ResponseDecorator
getLdapResult, setLdapResult
-
Methods inherited from class org.apache.directory.api.ldap.codec.api.MessageDecorator
addAllControls, addControl, get, getCodecService, getControl, getControls, getControlsLength, getCurrentControl, getDecorated, getDecorator, getMessageId, getMessageLength, getType, hasControl, put, removeControl, setControlsLength, setMessageId, setMessageLength
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.directory.api.ldap.model.message.ExtendedResponse
getResponseName, setResponseName
-
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
-
GracefulDisconnectResponseDecorator
public GracefulDisconnectResponseDecorator(LdapApiService codec, GracefulDisconnectResponse decoratedMessage)
Creates a new instance of CancelResponseDecorator.- Parameters:
codec
- The LDAP service instancedecoratedMessage
- The decorated message
-
-
Method Detail
-
getResponseValue
public byte[] getResponseValue()
Gets the response OID specific encoded response values.- Overrides:
getResponseValue
in classExtendedResponseDecorator<GracefulDisconnectResponse>
- Returns:
- the response specific encoded response values.
-
setResponseValue
public void setResponseValue(byte[] responseValue)
Sets the response OID specific encoded response values.- Overrides:
setResponseValue
in classExtendedResponseDecorator<GracefulDisconnectResponse>
- Parameters:
responseValue
- the response specific encoded response values.
-
getDelay
public int getDelay()
Gets the delay before disconnection, in seconds.- Specified by:
getDelay
in interfaceGracefulDisconnectResponse
- Returns:
- the delay before disconnection
-
setDelay
public void setDelay(int delay)
Sets the delay before disconnection, in seconds.- Specified by:
setDelay
in interfaceGracefulDisconnectResponse
- Parameters:
delay
- the new delay before disconnection
-
getTimeOffline
public int getTimeOffline()
Gets the offline time after disconnection, in minutes.- Specified by:
getTimeOffline
in interfaceGracefulDisconnectResponse
- Returns:
- the offline time after disconnection
-
setTimeOffline
public void setTimeOffline(int timeOffline)
Sets the time offline after disconnection, in minutes.- Specified by:
setTimeOffline
in interfaceGracefulDisconnectResponse
- Parameters:
timeOffline
- the new time offline after disconnection
-
getReplicatedContexts
public Referral getReplicatedContexts()
Gets the replicated contexts.- Specified by:
getReplicatedContexts
in interfaceGracefulDisconnectResponse
- Returns:
- the replicated contexts
-
addReplicatedContexts
public void addReplicatedContexts(String replicatedContext)
Add a new URL of a replicated server- Specified by:
addReplicatedContexts
in interfaceGracefulDisconnectResponse
- Parameters:
replicatedContext
- The replicated server to add.
-
toString
public String toString()
Return a string representation of the graceful disconnect- Overrides:
toString
in classMessageDecorator<GracefulDisconnectResponse>
-
-