org.apache.directory.shared.ldap.extras.extended
Class GracefulDisconnect

java.lang.Object
  extended by org.apache.directory.shared.ldap.model.message.AbstractMessage
      extended by org.apache.directory.shared.ldap.model.message.AbstractResponse
          extended by org.apache.directory.shared.ldap.model.message.AbstractResultResponse
              extended by org.apache.directory.shared.ldap.model.message.ExtendedResponseImpl
                  extended by org.apache.directory.shared.ldap.extras.extended.GracefulDisconnect
All Implemented Interfaces:
Serializable, ExtendedResponse, Message, Response, ResultResponse

public class GracefulDisconnect
extends ExtendedResponseImpl

An unsolicited notification, extended response, intended for notifying clients of upcoming 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
See Also:
Serialized Form

Field Summary
static String EXTENSION_OID
          The OID for the graceful disconnect extended operation response.
 
Fields inherited from class org.apache.directory.shared.ldap.model.message.ExtendedResponseImpl
responseName, responseValue
 
Fields inherited from class org.apache.directory.shared.ldap.model.message.AbstractResultResponse
ldapResult
 
Fields inherited from class org.apache.directory.shared.ldap.model.message.AbstractMessage
controls
 
Fields inherited from interface org.apache.directory.shared.ldap.model.message.ExtendedResponse
TYPE
 
Constructor Summary
GracefulDisconnect(byte[] responseValue)
          Instantiates a new graceful disconnect.
GracefulDisconnect(int timeOffline, int delay)
          Instantiates a new graceful disconnect.
 
Method Summary
 int getDelay()
          Gets the delay before disconnection, in seconds.
 Referral getReplicatedContexts()
          Gets the replicated contexts.
 String getResponseName()
          Gets the OID uniquely identifying this extended response (a.k.a.
 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 befor disconnection, in seconds.
 void setResponseName(String oid)
          Sets the OID uniquely identifying this extended response (a.k.a.
 void setResponseValue(byte[] responseValue)
          Sets the reponse OID specific encoded response values.
 void setTimeOffline(int timeOffline)
          Sets the time offline after disconnection, in minutes.
 
Methods inherited from class org.apache.directory.shared.ldap.model.message.ExtendedResponseImpl
equals, getEncodedValue, getID, hashCode, toString
 
Methods inherited from class org.apache.directory.shared.ldap.model.message.AbstractResultResponse
getLdapResult
 
Methods inherited from class org.apache.directory.shared.ldap.model.message.AbstractMessage
addAllControls, addControl, get, getControl, getControls, getMessageId, getType, hasControl, put, removeControl, setMessageId
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.apache.directory.shared.ldap.model.message.ResultResponse
getLdapResult
 
Methods inherited from interface org.apache.directory.shared.ldap.model.message.Message
addAllControls, addControl, get, getControl, getControls, getMessageId, getType, hasControl, put, removeControl, setMessageId
 

Field Detail

EXTENSION_OID

public static final String EXTENSION_OID
The OID for the graceful disconnect extended operation response.

See Also:
Constant Field Values
Constructor Detail

GracefulDisconnect

public GracefulDisconnect(byte[] responseValue)
                   throws DecoderException
Instantiates a new graceful disconnect.

Parameters:
responseValue - the response value
Throws:
DecoderException - if the response value can't be decoded

GracefulDisconnect

public GracefulDisconnect(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 Detail

getResponseValue

public byte[] getResponseValue()
Gets the response OID specific encoded response values.

Overrides:
getResponseValue in class ExtendedResponseImpl
Returns:
the response specific encoded response values.

setResponseValue

public void setResponseValue(byte[] responseValue)
Sets the reponse OID specific encoded response values.

Overrides:
setResponseValue in class ExtendedResponseImpl
Parameters:
responseValue - the response specific encoded response values.

getResponseName

public String getResponseName()
Gets the OID uniquely identifying this extended response (a.k.a. its name).

Overrides:
getResponseName in class ExtendedResponseImpl
Returns:
the OID of the extended response type.

setResponseName

public void setResponseName(String oid)
Sets the OID uniquely identifying this extended response (a.k.a. its name).

Overrides:
setResponseName in class ExtendedResponseImpl
Parameters:
oid - the OID of the extended response type.

getDelay

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

Returns:
the delay before disconnection

setDelay

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

Parameters:
delay - the new delay before disconnection

getTimeOffline

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

Returns:
the offline time after disconnection

setTimeOffline

public void setTimeOffline(int timeOffline)
Sets the time offline after disconnection, in minutes.

Parameters:
timeOffline - the new time offline after disconnection

getReplicatedContexts

public Referral getReplicatedContexts()
Gets the replicated contexts.

Returns:
the replicated contexts


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