Package org.ldaptive.control
Class GenericControl
java.lang.Object
org.ldaptive.control.AbstractControl
org.ldaptive.control.GenericControl
- All Implemented Interfaces:
Control,RequestControl,ResponseControl
LDAP control defined as:
Control ::= SEQUENCE {
controlType LDAPOID,
criticality BOOLEAN DEFAULT FALSE,
controlValue OCTET STRING OPTIONAL }
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final inthash code seed.private byte[]control value.Fields inherited from class org.ldaptive.control.AbstractControl
logger -
Constructor Summary
ConstructorsConstructorDescriptionGenericControl(String oid, boolean critical, byte[] encoded) Creates a new generic control.GenericControl(String oid, boolean critical, DERBuffer encoded) Creates a new generic control.GenericControl(String oid, byte[] encoded) Creates a new generic control.GenericControl(String oid, DERBuffer encoded) Creates a new generic control. -
Method Summary
Modifier and TypeMethodDescriptionvoidInitializes this response control with the supplied BER encoded data.byte[]encode()Provides the BER encoding of this control.booleaninthashCode()Returns the hash code for this object.booleanhasValue()Returns whether the control has a value associated with it.toString()Methods inherited from class org.ldaptive.control.AbstractControl
getCriticality, getOIDMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.ldaptive.control.Control
getCriticality, getOID
-
Field Details
-
HASH_CODE_SEED
private static final int HASH_CODE_SEEDhash code seed.- See Also:
-
value
private byte[] valuecontrol value.
-
-
Constructor Details
-
GenericControl
Creates a new generic control.- Parameters:
oid- control OIDencoded- control value
-
GenericControl
Creates a new generic control.- Parameters:
oid- control OIDencoded- control value
-
GenericControl
Creates a new generic control.- Parameters:
oid- control OIDcritical- whether this control is criticalencoded- control value
-
GenericControl
Creates a new generic control.- Parameters:
oid- control OIDcritical- whether this control is criticalencoded- control value
-
-
Method Details
-
hasValue
public boolean hasValue()Description copied from interface:RequestControlReturns whether the control has a value associated with it.- Specified by:
hasValuein interfaceRequestControl- Returns:
- whether the control has a value
-
equals
- Overrides:
equalsin classAbstractControl
-
hashCode
public int hashCode()Description copied from class:AbstractControlReturns the hash code for this object.- Specified by:
hashCodein classAbstractControl- Returns:
- hash code
-
toString
- Overrides:
toStringin classAbstractControl
-
encode
public byte[] encode()Description copied from interface:RequestControlProvides the BER encoding of this control.- Specified by:
encodein interfaceRequestControl- Returns:
- BER encoded request control
-
decode
Description copied from interface:ResponseControlInitializes this response control with the supplied BER encoded data.- Specified by:
decodein interfaceResponseControl- Parameters:
encoded- BER encoded response control
-