org.apache.directory.api.ldap.codec.controls.cascade
Class CascadeDecorator

java.lang.Object
  extended by org.apache.directory.api.asn1.AbstractAsn1Object
      extended by org.apache.directory.api.ldap.codec.api.ControlDecorator<Cascade>
          extended by org.apache.directory.api.ldap.codec.controls.cascade.CascadeDecorator
All Implemented Interfaces:
Asn1Object, CodecControl<Cascade>, Decorator<Cascade>, Control, Cascade

public class CascadeDecorator
extends ControlDecorator<Cascade>
implements CodecControl<Cascade>, Cascade

The Cascade control decorator.

Author:
Apache Directory Project

Field Summary
 
Fields inherited from class org.apache.directory.api.ldap.codec.api.ControlDecorator
value, valueLength
 
Fields inherited from interface org.apache.directory.api.ldap.model.message.controls.Cascade
OID
 
Constructor Summary
CascadeDecorator(LdapApiService codec, Cascade control)
          Default constructor
 
Method Summary
 int computeLength()
          Returns the default control length.
 Asn1Object decode(byte[] controlBytes)
          Decodes raw ASN.1 encoded bytes into an Asn1Object for the control.
 ByteBuffer encode(ByteBuffer buffer)
          Encode the object to a PDU.
 
Methods inherited from class org.apache.directory.api.ldap.codec.api.ControlDecorator
equals, getCodecService, getDecorated, getOid, getValue, hashCode, hasValue, isCritical, setCritical, setDecorated, setValue, toString
 
Methods inherited from class org.apache.directory.api.asn1.AbstractAsn1Object
addLength, getCurrentLength, getExpectedLength, getParent, getTlvId, setCurrentLength, setExpectedLength, setParent
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.apache.directory.api.ldap.codec.api.CodecControl
getValue, hasValue, setValue
 
Methods inherited from interface org.apache.directory.api.ldap.codec.api.Decorator
getCodecService, getDecorated
 
Methods inherited from interface org.apache.directory.api.ldap.model.message.Control
getOid, isCritical, setCritical
 

Constructor Detail

CascadeDecorator

public CascadeDecorator(LdapApiService codec,
                        Cascade control)
Default constructor

Method Detail

computeLength

public int computeLength()
Returns the default control length.

Specified by:
computeLength in interface Asn1Object
Specified by:
computeLength in interface Decorator<Cascade>
Overrides:
computeLength in class ControlDecorator<Cascade>
Returns:
The object's computed length

decode

public Asn1Object decode(byte[] controlBytes)
                  throws DecoderException
Description copied from interface: CodecControl
Decodes raw ASN.1 encoded bytes into an Asn1Object for the control.

Specified by:
decode in interface CodecControl<Cascade>
Parameters:
controlBytes - the encoded control bytes
Returns:
the decoded Asn1Object for the control
Throws:
DecoderException - if anything goes wrong

encode

public ByteBuffer encode(ByteBuffer buffer)
                  throws EncoderException
Description copied from class: AbstractAsn1Object
Encode the object to a PDU.

Specified by:
encode in interface Asn1Object
Specified by:
encode in interface Decorator<Cascade>
Overrides:
encode in class AbstractAsn1Object
Parameters:
buffer - The buffer where to put the PDU
Returns:
The encoded PDU.
Throws:
EncoderException - if the buffer can't be encoded


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