|
||||||||||
| 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<E>
public abstract class MessageDecorator<E extends Message>
A decorator for the generic LDAP Message
| Field Summary | |
|---|---|
protected int |
messageLength
The encoded Message length |
| Constructor Summary | |
|---|---|
protected |
MessageDecorator(LdapApiService codec,
E decoratedMessage)
Makes a Message an Decorator object. |
| Method Summary | |
|---|---|
Message |
addAllControls(Control[] controls)
Adds an array of controls to this Message. |
Message |
addControl(Control control)
Adds a control to this Message. |
Object |
get(Object key)
Gets a message scope parameter. |
LdapApiService |
getCodecService()
Gets the codec service responsible for managing the encoding and decoding of the decorated objects. |
Control |
getControl(String oid)
Gets the control associated with the given OID. |
Map<String,Control> |
getControls()
Gets the controls associated with this message mapped by OID. |
int |
getControlsLength()
|
CodecControl<? extends Control> |
getCurrentControl()
Get the current Control Object |
E |
getDecorated()
Gets the object being decorated by this IDecorator. |
static MessageDecorator<? extends Message> |
getDecorator(LdapApiService codec,
Message decoratedMessage)
|
int |
getMessageId()
Gets the session unique message sequence id for this message. |
int |
getMessageLength()
|
MessageTypeEnum |
getType()
Gets the LDAP message type code associated with this Message. |
boolean |
hasControl(String oid)
Checks whether or not this message has the specified control. |
Object |
put(Object key,
Object value)
Sets a message scope parameter. |
Message |
removeControl(Control control)
Deletes a control removing it from this Message. |
void |
setControlsLength(int controlsLength)
|
Message |
setMessageId(int messageId)
Sets the Message ID for this request |
void |
setMessageLength(int messageLength)
|
String |
toString()
Delegates to the toString() method of the decorated Message. |
| 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.codec.api.Decorator |
|---|
computeLength, encode |
| Field Detail |
|---|
protected int messageLength
| Constructor Detail |
|---|
protected MessageDecorator(LdapApiService codec,
E decoratedMessage)
| Method Detail |
|---|
public static MessageDecorator<? extends Message> getDecorator(LdapApiService codec,
Message decoratedMessage)
public void setControlsLength(int controlsLength)
controlsLength - the encoded controls lengthpublic int getControlsLength()
public void setMessageLength(int messageLength)
messageLength - The encoded message lengthpublic int getMessageLength()
public CodecControl<? extends Control> getCurrentControl()
public MessageTypeEnum getType()
getType in interface Messagepublic Map<String,Control> getControls()
getControls in interface Messagepublic Control getControl(String oid)
getControl in interface Messageoid - The Cntrol's OID we are looking for
public boolean hasControl(String oid)
hasControl in interface Messageoid - the OID of the control
public Message addControl(Control control)
throws MessageException
addControl in interface Messagecontrol - the control to add.
MessageException - if controls cannot be added to this Message or the control is
not known etc.
public Message addAllControls(Control[] controls)
throws MessageException
addAllControls in interface Messagecontrols - the controls to add.
MessageException - if controls cannot be added to this Message or they are not known etc.
public Message removeControl(Control control)
throws MessageException
removeControl in interface Messagecontrol - the control to remove.
MessageException - if controls cannot be added to this Message or the control is
not known etc.public int getMessageId()
getMessageId in interface Messagepublic Object get(Object key)
get in interface Messagekey - the key used to access a message parameter.
public Object put(Object key,
Object value)
put in interface Messagekey - the parameter keyvalue - the parameter value
public Message setMessageId(int messageId)
setMessageId in interface MessagemessageId - The message Id
public String toString()
toString in class Objectpublic E getDecorated()
getDecorated in interface Decorator<E extends Message>public LdapApiService getCodecService()
getCodecService in interface Decorator<E extends Message>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||