|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.directory.api.ldap.codec.api.MessageDecorator<M>
org.apache.directory.api.ldap.codec.decorators.RequestDecorator<M>
org.apache.directory.api.ldap.codec.decorators.ResultResponseRequestDecorator<M,R>
org.apache.directory.api.ldap.codec.decorators.SingleReplyRequestDecorator<Q,P>
org.apache.directory.api.ldap.codec.api.ExtendedRequestDecorator<Q,P>
public class ExtendedRequestDecorator<Q extends ExtendedRequest<P>,P extends ExtendedResponse>
A decorator for the ExtendedRequest message
| Field Summary | |
|---|---|
protected byte[] |
requestValue
|
| Fields inherited from class org.apache.directory.api.ldap.codec.api.MessageDecorator |
|---|
messageLength |
| Fields inherited from interface org.apache.directory.api.ldap.model.message.ExtendedRequest |
|---|
RESP_TYPE, TYPE |
| Constructor Summary | |
|---|---|
ExtendedRequestDecorator(LdapApiService codec,
Q decoratedMessage)
Makes a ExtendedRequest a MessageDecorator. |
|
| Method Summary | |
|---|---|
ExtendedRequest<P> |
addAllControls(Control[] controls)
Adds an array of controls to this Message. |
ExtendedRequest<P> |
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<P> |
removeControl(Control control)
Deletes a control removing it from this Message. |
void |
setExtendedRequestLength(int extendedRequestLength)
Stores the encoded length for the ExtendedRequest |
ExtendedRequest<P> |
setMessageId(int messageId)
Sets the Message ID for this request |
ExtendedRequest<P> |
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)
|
| Methods inherited from class org.apache.directory.api.ldap.codec.decorators.SingleReplyRequestDecorator |
|---|
abandon, addAbandonListener, getResponseType, isAbandoned |
| Methods inherited from class org.apache.directory.api.ldap.codec.decorators.ResultResponseRequestDecorator |
|---|
getResultResponse, hasResponse |
| Methods inherited from class org.apache.directory.api.ldap.codec.api.MessageDecorator |
|---|
get, getCodecService, getControl, getControls, getControlsLength, getCurrentControl, getDecorated, getDecorator, getMessageId, getMessageLength, getType, hasControl, put, setControlsLength, setMessageLength, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.apache.directory.api.ldap.model.message.SingleReplyRequest |
|---|
getResponseType |
| Methods inherited from interface org.apache.directory.api.ldap.model.message.ResultResponseRequest |
|---|
getResultResponse |
| Methods inherited from interface org.apache.directory.api.ldap.model.message.Request |
|---|
hasResponse |
| Methods inherited from interface org.apache.directory.api.ldap.model.message.Message |
|---|
get, getControl, getControls, getMessageId, getType, hasControl, put |
| Field Detail |
|---|
protected byte[] requestValue
| Constructor Detail |
|---|
public ExtendedRequestDecorator(LdapApiService codec,
Q decoratedMessage)
decoratedMessage - the decorated ExtendedRequest| Method Detail |
|---|
public 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<P extends ExtendedResponse>public ExtendedRequest<P> setRequestName(String oid)
setRequestName in interface ExtendedRequest<P extends ExtendedResponse>oid - the dotted-decimal representation as a String of the OID
public byte[] getRequestValue()
public void setRequestValue(byte[] requestValue)
public ExtendedRequest<P> setMessageId(int messageId)
setMessageId in interface ExtendedRequest<P extends ExtendedResponse>setMessageId in interface MessagesetMessageId in class MessageDecorator<Q extends ExtendedRequest<P>>messageId - The message Id
public ExtendedRequest<P> addControl(Control control)
throws MessageException
addControl in interface ExtendedRequest<P extends ExtendedResponse>addControl in interface MessageaddControl in class MessageDecorator<Q extends ExtendedRequest<P>>control - the control to add.
MessageException - if controls cannot be added to this Message or the control is
not known etc.
public ExtendedRequest<P> addAllControls(Control[] controls)
throws MessageException
addAllControls in interface ExtendedRequest<P extends ExtendedResponse>addAllControls in interface MessageaddAllControls in class MessageDecorator<Q extends ExtendedRequest<P>>controls - the controls to add.
MessageException - if controls cannot be added to this Message or they are not known etc.
public ExtendedRequest<P> removeControl(Control control)
throws MessageException
removeControl in interface ExtendedRequest<P extends ExtendedResponse>removeControl in interface MessageremoveControl in class MessageDecorator<Q extends ExtendedRequest<P>>control - the control to remove.
MessageException - if controls cannot be added to this Message or the control is
not known etc.public int computeLength()
computeLength in interface Decorator<Q extends ExtendedRequest<P>>
public ByteBuffer encode(ByteBuffer buffer)
throws EncoderException
encode in interface Decorator<Q extends ExtendedRequest<P>>buffer - The buffer where to put the PDU
EncoderException - if the buffer can't be encoded
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||