public abstract class AbstractDsmlMessageDecorator<E extends Message> extends Object implements DsmlDecorator<E>, Message
Constructor and Description |
---|
AbstractDsmlMessageDecorator(LdapApiService codec,
E message) |
Modifier and Type | Method and Description |
---|---|
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() |
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.
|
DsmlControl<? extends Control> |
getCurrentControl()
Get the current Control Object
|
E |
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(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.
|
Message |
setMessageId(int messageId)
Sets the Message ID for this request
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
toDsml
public AbstractDsmlMessageDecorator(LdapApiService codec, E message)
public DsmlControl<? extends Control> getCurrentControl()
public LdapApiService getCodecService()
public MessageTypeEnum getType()
public Map<String,Control> getControls()
getControls
in interface Message
public Control getControl(String oid)
getControl
in interface Message
oid
- The Cntrol's OID we are looking forpublic boolean hasControl(String oid)
hasControl
in interface Message
oid
- the OID of the controlpublic Message addControl(Control control) throws MessageException
addControl
in interface Message
control
- 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 Message
controls
- 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 Message
control
- 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 Message
public Object get(Object key)
public Object put(Object key, Object value)
public Message setMessageId(int messageId)
setMessageId
in interface Message
messageId
- The message Idpublic E getDecorated()
getDecorated
in interface DsmlDecorator<E extends Message>
Copyright © 2003-2014 The Apache Software Foundation. All Rights Reserved.