M - The message to decoratepublic abstract class AbstractDsmlMessageDecorator<M extends Message> extends java.lang.Object implements DsmlDecorator<M>, Message
| Modifier and Type | Field and Description |
|---|---|
private LdapApiService |
codec
The LDAP message codec
|
private java.util.Map<java.lang.String,Control> |
controls
Map of message controls using OID Strings for keys and Control values
|
private DsmlControl<? extends Control> |
currentControl
The current control
|
private M |
message
The LDAP message
|
| Constructor and Description |
|---|
AbstractDsmlMessageDecorator(LdapApiService codec,
M message)
Create a new instance of AbstractDsmlMessageDecorator
|
| Modifier and Type | Method and Description |
|---|---|
Message |
addAllControls(Control[] controlsToAdd)
Adds an array of controls to this Message.
|
Message |
addControl(Control control)
Adds a control to this Message.
|
java.lang.Object |
get(java.lang.Object key)
Gets a message scope parameter.
|
LdapApiService |
getCodecService() |
Control |
getControl(java.lang.String oid)
Gets the control associated with the given OID.
|
java.util.Map<java.lang.String,Control> |
getControls()
Gets the controls associated with this message mapped by OID.
|
DsmlControl<? extends Control> |
getCurrentControl()
Get the current Control Object
|
M |
getDecorated()
Gets the Message this DsmlDecorator decorates.
|
int |
getMessageId()
Gets the session unique message sequence id for this message.
|
MessageTypeEnum |
getType()
Gets the LDAP message type code associated with this Message.
|
boolean |
hasControl(java.lang.String oid)
Checks whether or not this message has the specified control.
|
java.lang.Object |
put(java.lang.Object key,
java.lang.Object value)
Sets a message scope parameter.
|
Message |
removeControl(Control control)
Deletes a control removing it from this Message.
|
Message |
setMessageId(int messageId)
Sets the Message ID for this request
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waittoDsmlprivate final LdapApiService codec
private final java.util.Map<java.lang.String,Control> controls
private DsmlControl<? extends Control> currentControl
public AbstractDsmlMessageDecorator(LdapApiService codec, M message)
codec - The codec to usemessage - The message to decoratepublic DsmlControl<? extends Control> getCurrentControl()
public LdapApiService getCodecService()
public MessageTypeEnum getType()
public java.util.Map<java.lang.String,Control> getControls()
getControls in interface Messagepublic Control getControl(java.lang.String oid)
getControl in interface Messageoid - The Cntrol's OID we are looking forpublic boolean hasControl(java.lang.String oid)
hasControl in interface Messageoid - the OID of the controlpublic Message addControl(Control control)
addControl in interface Messagecontrol - the control to add.public Message addAllControls(Control[] controlsToAdd)
addAllControls in interface MessagecontrolsToAdd - the controls to add.public Message removeControl(Control control)
removeControl in interface Messagecontrol - the control to remove.public int getMessageId()
getMessageId in interface Messagepublic java.lang.Object get(java.lang.Object key)
public java.lang.Object put(java.lang.Object key,
java.lang.Object value)
public Message setMessageId(int messageId)
setMessageId in interface MessagemessageId - The message Idpublic M getDecorated()
getDecorated in interface DsmlDecorator<M extends Message>