|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.directory.api.ldap.model.message.AbstractMessage
public abstract class AbstractMessage
Abstract message base class.
| Field Summary | |
|---|---|
protected Map<String,Control> |
controls
Map of message controls using OID Strings for keys and Control values |
| Constructor Summary | |
|---|---|
protected |
AbstractMessage(int id,
MessageTypeEnum type)
Completes the instantiation of a Message. |
| Method Summary | |
|---|---|
Message |
addAllControls(Control[] controls)
Adds an array of controls to this Message. |
Message |
addControl(Control control)
Adds a control to this Message. |
boolean |
equals(Object obj)
Checks to see if two messages are equivalent. |
Object |
get(Object key)
Gets a message scope parameter. |
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 |
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. |
int |
hashCode()
|
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 id)
Sets the Message ID for this request |
String |
toString(String message)
Get a String representation of a LdapMessage |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final Map<String,Control> controls
| Constructor Detail |
|---|
protected AbstractMessage(int id,
MessageTypeEnum type)
id - the seq id of the messagetype - the type of the message| Method Detail |
|---|
public int getMessageId()
getMessageId in interface Messagepublic Message setMessageId(int id)
setMessageId in interface Messageid - The message Id
public 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 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 MessageTypeEnum getType()
getType 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 boolean equals(Object obj)
equals in class Objectobj - the object to compare this Message to for equalitypublic int hashCode()
hashCode in class ObjectObject.hashCode()
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 String toString(String message)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||