Class GracefulShutdownRequestDecorator
- java.lang.Object
-
- org.apache.directory.api.ldap.codec.api.MessageDecorator<M>
-
- org.apache.directory.api.ldap.codec.decorators.RequestDecorator<M>
-
- org.apache.directory.api.ldap.codec.decorators.ResultResponseRequestDecorator<M>
-
- org.apache.directory.api.ldap.codec.decorators.SingleReplyRequestDecorator<Q>
-
- org.apache.directory.api.ldap.codec.decorators.ExtendedRequestDecorator<GracefulShutdownRequest>
-
- org.apache.directory.api.ldap.extras.extended.ads_impl.gracefulShutdown.GracefulShutdownRequestDecorator
-
- All Implemented Interfaces:
Asn1Object
,Decorator<GracefulShutdownRequest>
,GracefulShutdownRequest
,AbandonableRequest
,ExtendedRequest
,Message
,Request
,ResultResponseRequest
,SingleReplyRequest
public class GracefulShutdownRequestDecorator extends ExtendedRequestDecorator<GracefulShutdownRequest> implements GracefulShutdownRequest
A Decorator for GracefulShutdownRequests.- Author:
- Apache Directory Project
-
-
Field Summary
-
Fields inherited from interface org.apache.directory.api.ldap.extras.extended.gracefulShutdown.GracefulShutdownRequest
EXTENSION_OID, NOW, UNDETERMINED
-
-
Constructor Summary
Constructors Constructor Description GracefulShutdownRequestDecorator(LdapApiService codec, GracefulShutdownRequest decoratedMessage)
Creates a new instance of GracefulShutdownRequestDecorator.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getDelay()
Gets the delay before disconnection, in seconds.byte[]
getRequestValue()
Gets the Extended request payloadint
getTimeOffline()
Gets the offline time after disconnection, in minutes.void
setDelay(int delay)
Sets the delay before disconnection, in seconds.void
setRequestValue(byte[] requestValue)
sets the Extended request payloadvoid
setTimeOffline(int timeOffline)
Sets the time offline after disconnection, in minutes.String
toString()
Return a string representation of the graceful shutdown-
Methods inherited from class org.apache.directory.api.ldap.codec.decorators.ExtendedRequestDecorator
addAllControls, addControl, computeLength, encode, getRequestName, removeControl, setMessageId, setRequestName
-
Methods inherited from class org.apache.directory.api.ldap.codec.decorators.SingleReplyRequestDecorator
abandon, addAbandonListener, getResponseType, isAbandoned
-
Methods inherited from class org.apache.directory.api.ldap.codec.decorators.ResultResponseRequestDecorator
getResultResponse, hasResponse
-
Methods inherited from class org.apache.directory.api.ldap.codec.api.MessageDecorator
get, getCodecService, getControl, getControls, getControlsLength, getCurrentControl, getDecorated, getDecorator, getMessageId, getMessageLength, getType, hasControl, put, setControlsLength, 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.ExtendedRequest
addAllControls, addControl, getRequestName, removeControl, setMessageId, setRequestName
-
Methods inherited from interface org.apache.directory.api.ldap.model.message.Message
get, getControl, getControls, getMessageId, getType, hasControl, put
-
Methods inherited from interface org.apache.directory.api.ldap.model.message.Request
hasResponse
-
Methods inherited from interface org.apache.directory.api.ldap.model.message.ResultResponseRequest
getResultResponse
-
Methods inherited from interface org.apache.directory.api.ldap.model.message.SingleReplyRequest
getResponseType
-
-
-
-
Constructor Detail
-
GracefulShutdownRequestDecorator
public GracefulShutdownRequestDecorator(LdapApiService codec, GracefulShutdownRequest decoratedMessage)
Creates a new instance of GracefulShutdownRequestDecorator.- Parameters:
codec
- The LDAP Service to usedecoratedMessage
- The GracefulShutdownRequest control to decorate
-
-
Method Detail
-
setRequestValue
public void setRequestValue(byte[] requestValue)
sets the Extended request payload- Overrides:
setRequestValue
in classExtendedRequestDecorator<GracefulShutdownRequest>
- Parameters:
requestValue
- The extended payload
-
getRequestValue
public byte[] getRequestValue()
Gets the Extended request payload- Overrides:
getRequestValue
in classExtendedRequestDecorator<GracefulShutdownRequest>
- Returns:
- The extended payload
-
getDelay
public int getDelay()
Gets the delay before disconnection, in seconds.- Specified by:
getDelay
in interfaceGracefulShutdownRequest
- Returns:
- the delay before disconnection
-
setDelay
public void setDelay(int delay)
Sets the delay before disconnection, in seconds.- Specified by:
setDelay
in interfaceGracefulShutdownRequest
- Parameters:
delay
- the new delay before disconnection
-
getTimeOffline
public int getTimeOffline()
Gets the offline time after disconnection, in minutes.- Specified by:
getTimeOffline
in interfaceGracefulShutdownRequest
- Returns:
- the offline time after disconnection
-
setTimeOffline
public void setTimeOffline(int timeOffline)
Sets the time offline after disconnection, in minutes.- Specified by:
setTimeOffline
in interfaceGracefulShutdownRequest
- Parameters:
timeOffline
- the new time offline after disconnection
-
toString
public String toString()
Return a string representation of the graceful shutdown- Overrides:
toString
in classMessageDecorator<GracefulShutdownRequest>
-
-