public abstract class InternalAbstractMessage extends Object implements InternalMessage
Modifier | Constructor and Description |
---|---|
protected |
InternalAbstractMessage(int id,
MessageTypeEnum type)
Completes the instantiation of a Message.
|
Modifier and Type | Method and Description |
---|---|
void |
add(Control control)
Adds a control to this Message.
|
void |
addAll(Control[] controls)
Adds an array of controls to this Message.
|
boolean |
equals(Object obj)
Checks to see if two messages are equivalent.
|
Object |
get(Object key)
Gets a message scope parameter.
|
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.
|
void |
remove(Control control)
Deletes a control removing it from this Message.
|
protected InternalAbstractMessage(int id, MessageTypeEnum type)
id
- the seq id of the messagetype
- the type of the messagepublic int getMessageId()
getMessageId
in interface InternalMessage
public Map<String,Control> getControls()
getControls
in interface InternalMessage
CodecControl
public boolean hasControl(String oid)
InternalMessage
hasControl
in interface InternalMessage
oid
- the OID of the controlInternalMessage.hasControl(java.lang.String)
public void add(Control control) throws MessageException
add
in interface InternalMessage
control
- the control to add.MessageException
- if controls cannot be added to this Message or the control is
not known etc.public void remove(Control control) throws MessageException
remove
in interface InternalMessage
control
- 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 InternalMessage
public Object get(Object key)
get
in interface InternalMessage
key
- the key used to access a message parameter.public Object put(Object key, Object value)
put
in interface InternalMessage
key
- the parameter keyvalue
- the parameter valuepublic boolean equals(Object obj)
public int hashCode()
hashCode
in class Object
Object.hashCode()
public void addAll(Control[] controls) throws MessageException
InternalMessage
addAll
in interface InternalMessage
controls
- the controls to add.MessageException
- if controls cannot be added to this Message or they are not known etc.Copyright © 2003–2014 The Apache Software Foundation. All rights reserved.