org.apache.directory.shared.ldap.codec.extended.operations.cancel
Class Cancel

java.lang.Object
  extended by org.apache.directory.shared.asn1.AbstractAsn1Object
      extended by org.apache.directory.shared.ldap.codec.extended.operations.cancel.Cancel
All Implemented Interfaces:
Asn1Object

public class Cancel
extends AbstractAsn1Object

An extended operation to proceed a Cancel operation, as described in RFC 3909

   cancelRequestValue ::= SEQUENCE {
       cancelID        MessageID
                       -- MessageID is as defined in [RFC2251]
   }
 

Version:
$Rev: 687720 $, $Date: 2008-08-21 14:05:50 +0200 (Thu, 21 Aug 2008) $,
Author:
Apache Directory Project

Field Summary
 
Fields inherited from class org.apache.directory.shared.asn1.AbstractAsn1Object
parent
 
Constructor Summary
Cancel()
          Default constructor.
Cancel(int cancelId)
          Create a Cancel object, with a messageId
 
Method Summary
 int computeLength()
          Compute the Cancel length 0x30 L1 | +--> 0x02 0x0(1-4) [0..2^31-1]
 java.nio.ByteBuffer encode()
          Encodes the cancel extended operation.
 int getCancelId()
          Get the message Id of the request to cancel
 void setCancelId(int cancelId)
          Set the cancelId
 java.lang.String toString()
          Return a string representation of the cancel
 
Methods inherited from class org.apache.directory.shared.asn1.AbstractAsn1Object
addLength, encode, getCurrentLength, getExpectedLength, getParent, getTlvId, setCurrentLength, setExpectedLength, setParent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Cancel

public Cancel(int cancelId)
Create a Cancel object, with a messageId

Parameters:
cancelId - The Id of the request to cancel

Cancel

public Cancel()
Default constructor.

Method Detail

getCancelId

public int getCancelId()
Get the message Id of the request to cancel

Returns:
The id of the request to cancel

setCancelId

public void setCancelId(int cancelId)
Set the cancelId

Parameters:
cancelId - The Id of the request to cancel

computeLength

public int computeLength()
Compute the Cancel length 0x30 L1 | +--> 0x02 0x0(1-4) [0..2^31-1]

Specified by:
computeLength in interface Asn1Object
Specified by:
computeLength in class AbstractAsn1Object
Returns:
The object's computed length

encode

public java.nio.ByteBuffer encode()
                           throws EncoderException
Encodes the cancel extended operation.

Returns:
A ByteBuffer that contains the encoded PDU
Throws:
EncoderException - If anything goes wrong.

toString

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

Overrides:
toString in class java.lang.Object


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