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

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

public class GracefulDisconnectResponseImpl
extends org.apache.directory.api.ldap.model.message.ExtendedResponseImpl
implements GracefulDisconnectResponse

An unsolicited notification, extended response, intended for notifying clients of up coming disconnection due to intended service windows. Unlike the org.apache.directory.api.ldap.model.message.extended.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

Field Summary
 
Fields inherited from class org.apache.directory.api.ldap.model.message.ExtendedResponseImpl
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.GracefulDisconnectResponse
EXTENSION_OID
 
Fields inherited from interface org.apache.directory.api.ldap.model.message.ExtendedResponse
TYPE
 
Constructor Summary
GracefulDisconnectResponseImpl()
          Instantiates a new graceful disconnect.
GracefulDisconnectResponseImpl(int timeOffline, int delay)
          Instantiates a new graceful disconnect.
 
Method Summary
 int getDelay()
          Gets the delay before disconnection, in seconds.
 org.apache.directory.api.ldap.model.message.Referral getReplicatedContexts()
          Gets the replicated contexts.
 String getResponseName()
          Gets the OID uniquely identifying this extended response (a.k.a.
 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 setTimeOffline(int timeOffline)
          Sets the time offline after disconnection, in minutes.
 
Methods inherited from class org.apache.directory.api.ldap.model.message.ExtendedResponseImpl
equals, 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.ResultResponse
getLdapResult
 
Methods inherited from interface org.apache.directory.api.ldap.model.message.Message
addAllControls, addControl, get, getControl, getControls, getMessageId, getType, hasControl, put, removeControl, setMessageId
 

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 minutes
delay - the delay before disconnect, in seconds
Method Detail

getResponseName

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

Specified by:
getResponseName in interface org.apache.directory.api.ldap.model.message.ExtendedResponse
Overrides:
getResponseName in class org.apache.directory.api.ldap.model.message.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).

Specified by:
setResponseName in interface org.apache.directory.api.ldap.model.message.ExtendedResponse
Overrides:
setResponseName in class org.apache.directory.api.ldap.model.message.ExtendedResponseImpl
Parameters:
oid - the OID of the extended response type.

getDelay

public int getDelay()
Description copied from interface: GracefulDisconnectResponse
Gets the delay before disconnection, in seconds.

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

setDelay

public void setDelay(int delay)
Description copied from interface: GracefulDisconnectResponse
Sets the delay befor disconnection, in seconds.

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

getTimeOffline

public int getTimeOffline()
Description copied from interface: GracefulDisconnectResponse
Gets the offline time after disconnection, in minutes.

Specified by:
getTimeOffline in interface GracefulDisconnectResponse
Returns:
the offline time after disconnection

setTimeOffline

public void setTimeOffline(int timeOffline)
Description copied from interface: GracefulDisconnectResponse
Sets the time offline after disconnection, in minutes.

Specified by:
setTimeOffline in interface GracefulDisconnectResponse
Parameters:
timeOffline - the new time offline after disconnection

getReplicatedContexts

public org.apache.directory.api.ldap.model.message.Referral getReplicatedContexts()
Description copied from interface: GracefulDisconnectResponse
Gets the replicated contexts.

Specified by:
getReplicatedContexts in interface GracefulDisconnectResponse
Returns:
the replicated contexts


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