org.apache.directory.shared.ldap.codec.controls.cascade
Class CascadeDecorator
java.lang.Object
org.apache.directory.shared.asn1.AbstractAsn1Object
org.apache.directory.shared.ldap.codec.controls.ControlDecorator<Cascade>
org.apache.directory.shared.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
| Fields inherited from interface org.apache.directory.shared.ldap.model.message.controls.Cascade |
OID |
| Methods inherited from class org.apache.directory.shared.ldap.codec.controls.ControlDecorator |
equals, getCodecService, getDecorated, getOid, getValue, hashCode, hasValue, isCritical, setCritical, setDecorated, setValue, toString |
CascadeDecorator
public CascadeDecorator(LdapCodecService codec,
Cascade control)
- Default constructor
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 interface:
Decorator
- 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 PDU.
- Throws:
EncoderException - if the buffer can't be encoded
Copyright © 2003-2011 The Apache Software Foundation. All Rights Reserved.