E
- The control typepublic abstract class ControlDecorator<E extends Control> extends Object implements CodecControl<E>, Asn1Object
Constructor and Description |
---|
ControlDecorator(LdapApiService codec,
E decoratedControl)
Creates a ControlDecorator to codec enable it.
|
Modifier and Type | Method and Description |
---|---|
int |
computeLength()
Compute the object length, which is the sum of all inner length.
|
boolean |
equals(Object o) |
LdapApiService |
getCodecService()
Gets the codec service responsible for managing the encoding and
decoding of the decorated objects.
|
E |
getDecorated()
Gets the object being decorated by this IDecorator.
|
String |
getOid()
Get the control OID
|
byte[] |
getValue()
Get the control value
|
int |
hashCode() |
boolean |
hasValue()
Checks to see if a value is set for this
CodecControl . |
boolean |
isCritical()
Get the criticality
|
void |
setCritical(boolean criticality)
Set the criticality
|
void |
setDecorated(E decorated)
Set the control to be decorated.
|
void |
setValue(byte[] value)
Set the encoded control value
|
String |
toString()
Return a String representing a Control
|
decode
encode
public ControlDecorator(LdapApiService codec, E decoratedControl)
codec
- The Ldap service to usedecoratedControl
- The Control to decorate.public E getDecorated()
getDecorated
in interface Decorator<E extends Control>
public void setDecorated(E decorated)
decorated
- The decorated controlpublic LdapApiService getCodecService()
getCodecService
in interface Decorator<E extends Control>
public boolean hasValue()
CodecControl
.hasValue
in interface CodecControl<E extends Control>
public byte[] getValue()
getValue
in interface CodecControl<E extends Control>
public void setValue(byte[] value)
setValue
in interface CodecControl<E extends Control>
value
- The encoded control value to storepublic boolean isCritical()
isCritical
in interface Control
true
if the criticality flag is true.public void setCritical(boolean criticality)
setCritical
in interface Control
criticality
- The criticality valuepublic int computeLength()
computeLength
in interface Asn1Object
computeLength
in interface Decorator<E extends Control>
public int hashCode()
hashCode
in class Object
Object.hashCode()
public boolean equals(Object o)
equals
in class Object
Object.equals(Object)
Copyright © 2003–2018 The Apache Software Foundation. All rights reserved.