Vordel SDK

com.vordel.circuit
Class Message

java.lang.Object
  extended by java.util.AbstractMap<K,V>
      extended by java.util.HashMap<java.lang.String,java.lang.Object>
          extended by 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.

MessageProcessors 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 Class Summary
static interface Message.MessageCreationListener
           
 
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
 
Field Summary
 com.vordel.dwe.CorrelationID correlationId
           
 FilterInvocation currentFilter
           
 CircuitInvocation invocationData
           
 
Constructor Summary
Message(com.vordel.dwe.CorrelationID correlationId)
          Create A new message object.
 
Method Summary
static 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.
 void addPropertiesListener(java.beans.PropertyChangeListener listener)
           
 void addPropertiesListener(java.lang.String propertyName, java.beans.PropertyChangeListener listener)
           
 java.lang.String allocID()
           
 void complete()
          Called once the message has been entirely processed and the client transaction complete.
 boolean containsKey(java.lang.String key)
           
 void firePropertyChange(java.lang.String propertyName, java.lang.Object oldValue, java.lang.Object newValue)
           
 java.lang.Object get(java.lang.String key)
           
 int getLogMask()
           
 int getPayloadMask()
           
 com.vordel.circuit.log.LogMessagePayloadProcessor getPayloadProcessor()
           
 void logPayload(CircuitInvocation ci, int maskItem)
           
 void onCompletion(java.lang.Runnable r)
           
 java.lang.Object put(java.lang.String key, java.lang.Object value)
           
 java.lang.Object remove(java.lang.String key)
           
 boolean removeCompletionCallback(java.lang.Runnable r)
           
 void removeCompletionCallbacks()
           
static boolean removeCreationListener(Message.MessageCreationListener mcl)
          Remove the message creation listener
 void removeProptertiesListener(java.beans.PropertyChangeListener listener)
           
 void removeProptertiesListener(java.lang.String propertyName, java.beans.PropertyChangeListener listener)
           
 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.
 void setLogMask(int logMask)
           
 void setPayloadMask(int payloadMask)
           
 void setPayloadProcessor(com.vordel.circuit.log.LogMessagePayloadProcessor payloadProcessor)
           
 void storeOpsField(com.vordel.dwe.http.Transaction txn, java.lang.String msgField, java.lang.String opsDBField)
           
 
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
 

Field Detail

correlationId

public final com.vordel.dwe.CorrelationID correlationId

currentFilter

public FilterInvocation currentFilter

invocationData

public CircuitInvocation invocationData
Constructor Detail

Message

public Message(com.vordel.dwe.CorrelationID correlationId)
Create A new message object. At a minimum, the following properties are initialised: "id": A unique id for this message Any registered Message.MessageCreationListeners are informed of the construction of this message (_after_ the id property has been assigned).

Method Detail

allocID

public java.lang.String allocID()

setLogMask

public void setLogMask(int logMask)

getLogMask

public int getLogMask()

setPayloadMask

public void setPayloadMask(int payloadMask)

getPayloadMask

public int getPayloadMask()

setPayloadProcessor

public void setPayloadProcessor(com.vordel.circuit.log.LogMessagePayloadProcessor payloadProcessor)

getPayloadProcessor

public com.vordel.circuit.log.LogMessagePayloadProcessor getPayloadProcessor()

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

logPayload

public void logPayload(CircuitInvocation ci,
                       int maskItem)

storeOpsField

public void storeOpsField(com.vordel.dwe.http.Transaction txn,
                          java.lang.String msgField,
                          java.lang.String opsDBField)

Vordel SDK


This documentation and all its contents and graphics, copyright © 1999 - 2011 Vordel