org.apache.directory.shared.ldap.codec.extended.operations
Class GracefulShutdown

java.lang.Object
  extended byorg.apache.directory.shared.asn1.Asn1Object
      extended byorg.apache.directory.shared.ldap.codec.extended.operations.GracefulAction
          extended byorg.apache.directory.shared.ldap.codec.extended.operations.GracefulShutdown

public class GracefulShutdown
extends GracefulAction

An extended operation to proceed a graceful shutdown

   GracefulShutdown ::= SEQUENCE
   {
       timeOffline     INTEGER (0..720) DEFAULT 0,
       delay       [0] INTEGER (0..86400) DEFAULT 0, 
   }
 

Version:
$Rev: 379008 $
Author:
Apache Directory Project

Field Summary
 
Fields inherited from class org.apache.directory.shared.ldap.codec.extended.operations.GracefulAction
delay, NOW, timeOffline, UNDETERMINED
 
Fields inherited from class org.apache.directory.shared.asn1.Asn1Object
parent
 
Constructor Summary
GracefulShutdown()
           
 
Method Summary
 int computeLength()
          Compute the GracefulShutdown length 0x30 L1 | +--> [0x02 0x0(1-4) [0..720] ] +--> [0x80 0x0(1-3) [0..86400] ] L1 will always be < 11.
 java.nio.ByteBuffer encode(java.nio.ByteBuffer buffer)
          Encodes the gracefulShutdown extended operation.
 java.lang.String toString()
          Return a string representation of the graceful shutdown
 
Methods inherited from class org.apache.directory.shared.ldap.codec.extended.operations.GracefulAction
getDelay, getTimeOffline, setDelay, setTimeOffline
 
Methods inherited from class org.apache.directory.shared.asn1.Asn1Object
addLength, getCurrentLength, getExpectedLength, getParent, setCurrentLength, setExpectedLength, setParent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GracefulShutdown

public GracefulShutdown()
Method Detail

computeLength

public int computeLength()
Compute the GracefulShutdown length 0x30 L1 | +--> [0x02 0x0(1-4) [0..720] ] +--> [0x80 0x0(1-3) [0..86400] ] L1 will always be < 11.


encode

public java.nio.ByteBuffer encode(java.nio.ByteBuffer buffer)
                           throws org.apache.directory.shared.asn1.codec.EncoderException
Encodes the gracefulShutdown extended operation.

Parameters:
buffer - The encoded sink
Returns:
A ByteBuffer that contains the encoded PDU
Throws:
org.apache.directory.shared.asn1.codec.EncoderException - If anything goes wrong.

toString

public java.lang.String toString()
Return a string representation of the graceful shutdown



Copyright © 2003-2006 . All Rights Reserved.