public class ExtendedRequestDecorator<Q extends ExtendedRequest> extends SingleReplyRequestDecorator<Q> implements ExtendedRequest
Modifier and Type | Field and Description |
---|---|
protected byte[] |
requestValue |
messageLength
Constructor and Description |
---|
ExtendedRequestDecorator(LdapApiService codec,
Q decoratedMessage)
Makes a ExtendedRequest a MessageDecorator.
|
Modifier and Type | Method and Description |
---|---|
ExtendedRequest |
addAllControls(Control[] controls)
Adds an array of controls to this Message.
|
ExtendedRequest |
addControl(Control control)
Adds a control to this Message.
|
int |
computeLength()
Compute the ExtendedRequest length
ExtendedRequest :
0x77 L1
|
+--> 0x80 L2 name
[+--> 0x81 L3 value]
L1 = Length(0x80) + Length(L2) + L2
[+ Length(0x81) + Length(L3) + L3]
Length(ExtendedRequest) = Length(0x77) + Length(L1) + L1
|
ByteBuffer |
encode(ByteBuffer buffer)
Encode the ExtendedRequest message to a PDU.
|
int |
getExtendedRequestLength() |
String |
getRequestName()
Gets the Object Identifier corresponding to the extended request type.
|
byte[] |
getRequestNameBytes()
Gets the requestName bytes.
|
byte[] |
getRequestValue() |
ExtendedRequest |
removeControl(Control control)
Deletes a control removing it from this Message.
|
void |
setExtendedRequestLength(int extendedRequestLength)
Stores the encoded length for the ExtendedRequest
|
ExtendedRequest |
setMessageId(int messageId)
Sets the Message ID for this request
|
ExtendedRequest |
setRequestName(String oid)
Sets the Object Identifier corresponding to the extended request type.
|
void |
setRequestNameBytes(byte[] requestNameBytes)
Sets the requestName bytes.
|
void |
setRequestValue(byte[] requestValue) |
abandon, addAbandonListener, getResponseType, isAbandoned
getResultResponse, hasResponse
get, getCodecService, getControl, getControls, getControlsLength, getCurrentControl, getDecorated, getDecorator, getMessageId, getMessageLength, getType, hasControl, put, setControlsLength, setMessageLength, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getResponseType
getResultResponse
hasResponse
get, getControl, getControls, getMessageId, getType, hasControl, put
protected byte[] requestValue
public ExtendedRequestDecorator(LdapApiService codec, Q decoratedMessage)
decoratedMessage
- the decorated ExtendedRequestpublic void setExtendedRequestLength(int extendedRequestLength)
extendedRequestLength
- The encoded lengthpublic int getExtendedRequestLength()
public byte[] getRequestNameBytes()
public void setRequestNameBytes(byte[] requestNameBytes)
requestNameBytes
- the OID bytes of the extended request type.public String getRequestName()
getRequestName
in interface ExtendedRequest
public ExtendedRequest setRequestName(String oid)
setRequestName
in interface ExtendedRequest
oid
- the dotted-decimal representation as a String of the OIDpublic byte[] getRequestValue()
public void setRequestValue(byte[] requestValue)
public ExtendedRequest setMessageId(int messageId)
setMessageId
in interface ExtendedRequest
setMessageId
in interface Message
setMessageId
in class MessageDecorator<Q extends ExtendedRequest>
messageId
- The message Idpublic ExtendedRequest addControl(Control control)
addControl
in interface ExtendedRequest
addControl
in interface Message
addControl
in class MessageDecorator<Q extends ExtendedRequest>
control
- the control to add.public ExtendedRequest addAllControls(Control[] controls)
addAllControls
in interface ExtendedRequest
addAllControls
in interface Message
addAllControls
in class MessageDecorator<Q extends ExtendedRequest>
controls
- the controls to add.public ExtendedRequest removeControl(Control control)
removeControl
in interface ExtendedRequest
removeControl
in interface Message
removeControl
in class MessageDecorator<Q extends ExtendedRequest>
control
- the control to remove.public int computeLength()
computeLength
in interface Asn1Object
computeLength
in interface Decorator<Q extends ExtendedRequest>
public ByteBuffer encode(ByteBuffer buffer) throws EncoderException
encode
in interface Asn1Object
encode
in interface Decorator<Q extends ExtendedRequest>
buffer
- The buffer where to put the PDUEncoderException
- if the buffer can't be encodedCopyright © 2003–2015 The Apache Software Foundation. All rights reserved.