Q
- The extended request to decoratepublic class ExtendedRequestDecorator<Q extends ExtendedRequest> extends SingleReplyRequestDecorator<Q> implements ExtendedRequest
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 : |
ByteBuffer |
encode(ByteBuffer buffer)
Encode the ExtendedRequest message to a PDU.
|
String |
getRequestName()
Gets the Object Identifier corresponding to the extended request type.
|
byte[] |
getRequestValue()
Gets the Extended request payload
|
ExtendedRequest |
removeControl(Control control)
Deletes a control removing it from this Message.
|
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 |
setRequestValue(byte[] requestValue)
sets the Extended request payload
|
abandon, addAbandonListener, getResponseType, isAbandoned
getResultResponse, hasResponse
get, getCodecService, getControl, getControls, getControlsLength, getCurrentControl, getDecorated, getDecorator, getMessageId, getMessageLength, getType, hasControl, put, setControlsLength, setMessageLength, toString
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
getResponseType
getResultResponse
hasResponse
get, getControl, getControls, getMessageId, getType, hasControl, put
public ExtendedRequestDecorator(LdapApiService codec, Q decoratedMessage)
codec
- The LDAP service instancedecoratedMessage
- the decorated ExtendedRequestpublic 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)
requestValue
- The extended payloadpublic 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()
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
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–2018 The Apache Software Foundation. All rights reserved.