org.apache.directory.api.ldap.extras.extended
Class GracefulShutdownRequestImpl

java.lang.Object
  extended by org.apache.directory.api.ldap.model.message.AbstractMessage
      extended by org.apache.directory.api.ldap.model.message.AbstractRequest
          extended by org.apache.directory.api.ldap.model.message.AbstractExtendedRequest<GracefulShutdownResponse>
              extended by org.apache.directory.api.ldap.extras.extended.GracefulShutdownRequestImpl
All Implemented Interfaces:
GracefulShutdownRequest, org.apache.directory.api.ldap.model.message.ExtendedRequest<GracefulShutdownResponse>, org.apache.directory.api.ldap.model.message.Message, org.apache.directory.api.ldap.model.message.Request, org.apache.directory.api.ldap.model.message.ResultResponseRequest<GracefulShutdownResponse>, org.apache.directory.api.ldap.model.message.SingleReplyRequest<GracefulShutdownResponse>

public class GracefulShutdownRequestImpl
extends org.apache.directory.api.ldap.model.message.AbstractExtendedRequest<GracefulShutdownResponse>
implements GracefulShutdownRequest

An extended operation requesting the server to shutdown it's LDAP service port while allowing established clients to complete or abandon operations already in progress. More information about this extended request is available here: LDAP Extensions for Graceful Shutdown.

Author:
Apache Directory Project

Field Summary
 
Fields inherited from class org.apache.directory.api.ldap.model.message.AbstractMessage
controls
 
Fields inherited from interface org.apache.directory.api.ldap.extras.extended.GracefulShutdownRequest
EXTENSION_OID, NOW, UNDETERMINED
 
Fields inherited from interface org.apache.directory.api.ldap.model.message.ExtendedRequest
RESP_TYPE, TYPE
 
Constructor Summary
GracefulShutdownRequestImpl()
          Instantiates a new graceful shutdown request.
GracefulShutdownRequestImpl(int messageId)
          Instantiates a new graceful shutdown request.
GracefulShutdownRequestImpl(int messageId, int timeOffline, int delay)
          Instantiates a new graceful shutdown request.
 
Method Summary
 int getDelay()
          Gets the delay before disconnection, in seconds.
 GracefulShutdownResponse getResultResponse()
           
 int getTimeOffline()
          Gets the offline time after disconnection, in minutes.
 void setDelay(int delay)
          Sets the delay befor disconnection, in seconds.
 void setTimeOffline(int timeOffline)
          Sets the time offline after disconnection, in minutes.
 
Methods inherited from class org.apache.directory.api.ldap.model.message.AbstractExtendedRequest
addAllControls, addControl, equals, getRequestName, getResponseType, hashCode, removeControl, setMessageId, setRequestName, toString
 
Methods inherited from class org.apache.directory.api.ldap.model.message.AbstractRequest
hasResponse
 
Methods inherited from class org.apache.directory.api.ldap.model.message.AbstractMessage
get, getControl, getControls, getMessageId, getType, hasControl, put, 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.ExtendedRequest
addAllControls, addControl, getRequestName, removeControl, setMessageId, setRequestName
 
Methods inherited from interface org.apache.directory.api.ldap.model.message.SingleReplyRequest
getResponseType
 
Methods inherited from interface org.apache.directory.api.ldap.model.message.Request
hasResponse
 
Methods inherited from interface org.apache.directory.api.ldap.model.message.Message
get, getControl, getControls, getMessageId, getType, hasControl, put
 

Constructor Detail

GracefulShutdownRequestImpl

public GracefulShutdownRequestImpl(int messageId)
Instantiates a new graceful shutdown request.

Parameters:
messageId - the message id

GracefulShutdownRequestImpl

public GracefulShutdownRequestImpl()
Instantiates a new graceful shutdown request.

Parameters:
messageId - the message id

GracefulShutdownRequestImpl

public GracefulShutdownRequestImpl(int messageId,
                                   int timeOffline,
                                   int delay)
Instantiates a new graceful shutdown request.

Parameters:
messageId - the message id
timeOffline - the offline time after disconnection, in minutes
delay - the delay before disconnection, in seconds
Method Detail

getDelay

public int getDelay()
Gets the delay before disconnection, in seconds.

Specified by:
getDelay in interface GracefulShutdownRequest
Returns:
the delay before disconnection

setDelay

public void setDelay(int delay)
Sets the delay befor disconnection, in seconds.

Specified by:
setDelay in interface GracefulShutdownRequest
Parameters:
delay - the new delay before disconnection

getTimeOffline

public int getTimeOffline()
Gets the offline time after disconnection, in minutes.

Specified by:
getTimeOffline in interface GracefulShutdownRequest
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 GracefulShutdownRequest
Parameters:
timeOffline - the new time offline after disconnection

getResultResponse

public GracefulShutdownResponse getResultResponse()
Specified by:
getResultResponse in interface org.apache.directory.api.ldap.model.message.ResultResponseRequest<GracefulShutdownResponse>
Overrides:
getResultResponse in class org.apache.directory.api.ldap.model.message.AbstractExtendedRequest<GracefulShutdownResponse>


Copyright © 2003-2013 The Apache Software Foundation. All Rights Reserved.