com.vordel.circuit
Class Message
java.lang.Object
java.util.AbstractMap<K,V>
java.util.HashMap<java.lang.String,java.lang.Object>
com.vordel.circuit.Message
- All Implemented Interfaces:
- com.vordel.common.Dictionary, java.io.Serializable, java.lang.Cloneable, java.util.Map<java.lang.String,java.lang.Object>
public class Message
- extends java.util.HashMap<java.lang.String,java.lang.Object>
- implements java.util.Map<java.lang.String,java.lang.Object>, com.vordel.common.Dictionary
Represents the state of a request as it passes through a Circuit
This object maps property names to Objects.
MessageProcessor
s can inspect, add, and remove properties as they
perform their work. Co-operating MessageProcessors can share these properties,
once a type is agreed for them.
Notification of completion of a message in the circuit can be monitored,
to allow for cleanup of resources when the message is no longer useful.
Completion callbacks are called in the reverse order to that in which they
are registered.
- See Also:
MessageProperties, which contains a list of well-known
message properties.
,
Serialized Form
Nested classes/interfaces inherited from class java.util.AbstractMap |
java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V> |
Nested classes/interfaces inherited from interface java.util.Map |
java.util.Map.Entry<K,V> |
Nested classes/interfaces inherited from interface com.vordel.common.Dictionary |
com.vordel.common.Dictionary.MapAs |
Constructor Summary |
Message()
Create A new message object. |
Methods inherited from class java.util.HashMap |
clear, clone, containsKey, containsValue, entrySet, get, isEmpty, keySet, putAll, remove, size, values |
Methods inherited from class java.util.AbstractMap |
equals, hashCode, toString |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.Map |
clear, containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, putAll, remove, size, values |
currentFilter
public FilterInvocation currentFilter
invocationData
public CircuitInvocation invocationData
Message
public Message()
- Create A new message object.
At a minimum, the following properties are initialised:
"id": A unique id for this message
Any registered
Message.MessageCreationListener
s are informed of the
construction of this message (_after_ the id property has been assigned).
addCreationListener
public static final void addCreationListener(Message.MessageCreationListener mcl)
- When a new message is created, each MessageCreationListener is informed, so it
may decorate the message with its own private annotations.
addPropertiesListener
public final void addPropertiesListener(java.beans.PropertyChangeListener listener)
addPropertiesListener
public final void addPropertiesListener(java.lang.String propertyName,
java.beans.PropertyChangeListener listener)
removeProptertiesListener
public final void removeProptertiesListener(java.beans.PropertyChangeListener listener)
removeProptertiesListener
public final void removeProptertiesListener(java.lang.String propertyName,
java.beans.PropertyChangeListener listener)
firePropertyChange
public void firePropertyChange(java.lang.String propertyName,
java.lang.Object oldValue,
java.lang.Object newValue)
put
public java.lang.Object put(java.lang.String key,
java.lang.Object value)
- Specified by:
put
in interface java.util.Map<java.lang.String,java.lang.Object>
- Overrides:
put
in class java.util.HashMap<java.lang.String,java.lang.Object>
remove
public java.lang.Object remove(java.lang.String key)
removeCreationListener
public static final boolean removeCreationListener(Message.MessageCreationListener mcl)
- Remove the message creation listener
- Returns:
- true if this list contained the specified message creation
listener.
onCompletion
public void onCompletion(java.lang.Runnable r)
complete
public void complete()
- Called once the message has been entirely processed
and the client transaction complete.
removeCompletionCallback
public boolean removeCompletionCallback(java.lang.Runnable r)
removeCompletionCallbacks
public void removeCompletionCallbacks()
replaceAttributeValues
public java.lang.String replaceAttributeValues(java.lang.String inputString)
- takes a string containing message attribute names delimited
by "%" characters and replaces the so-encoded substrings with
the named values from the message.
- Parameters:
inputString
- The string with the attributes names.
- Returns:
- The string with names replaced with values.
get
public java.lang.Object get(java.lang.String key)
- Specified by:
get
in interface com.vordel.common.Dictionary
containsKey
public boolean containsKey(java.lang.String key)
- Specified by:
containsKey
in interface com.vordel.common.Dictionary
This documentation and all its contents and graphics, copyright ? 1999 - 2010 Vordel