|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mule.transport.MessagePropertiesContext
public class MessagePropertiesContext
This object maintains a scoped map of properties. This means that certain properties will only be visible under some scopes. The scopes supported by Mule are:
PropertyScope.INBOUND Contains properties that were on the message when it was
received by Mule. This scope is read-only.PropertyScope.INVOCATION Any properties set on the invocation scope will be
available to the current service but will not be attached to any outbound messages.PropertyScope.OUTBOUND Any properties set in this scope will be attached to any
outbound messages resulting from this message. This is the default scope.PropertyScope.SESSION Any properties set on this scope will be added to the session.
Note that this is a convenience scope in that you cannot directly access session properties from this scope. Session
properties can be accessed from the MuleEvent
| Field Summary | |
|---|---|
protected PropertyScope |
defaultScope
|
protected Set<String> |
keySet
The union of all property names from all scopes. |
protected Map<PropertyScope,Map<String,Object>> |
scopedMap
Map of maps containing the scoped properties, each scope has its own Map. |
| Constructor Summary | |
|---|---|
MessagePropertiesContext()
|
|
| Method Summary | |
|---|---|
protected void |
addInboundProperties(Map<String,Object> properties)
|
protected void |
checkScopeForWriteAccess(PropertyScope scope)
|
void |
clearProperties()
Removes all properties from all scopes except for SESSION and INBOUND (which is read-only). |
void |
clearProperties(PropertyScope scope)
|
protected MessagePropertiesContext |
copy()
|
boolean |
getBooleanProperty(String name,
boolean defaultValue)
|
byte |
getByteProperty(String name,
byte defaultValue)
|
PropertyScope |
getDefaultScope()
|
double |
getDoubleProperty(String name,
double defaultValue)
|
float |
getFloatProperty(String name,
float defaultValue)
|
int |
getIntProperty(String name,
int defaultValue)
|
long |
getLongProperty(String name,
long defaultValue)
|
Object |
getProperty(String key)
|
Object |
getProperty(String key,
Object defaultValue)
|
Object |
getProperty(String key,
PropertyScope scope)
|
Set<String> |
getPropertyNames()
|
Set<String> |
getPropertyNames(PropertyScope scope)
|
protected Map<String,Object> |
getScopedProperties(PropertyScope scope)
|
short |
getShortProperty(String name,
short defaultValue)
|
String |
getStringProperty(String name,
String defaultValue)
|
Object |
removeProperty(String key)
Removes a property from all scopes except for SESSION and INBOUND (which is read-only). |
Object |
removeProperty(String key,
PropertyScope scope)
Removes a property from the specified property scope. |
void |
setProperty(String key,
Object value)
Set a property on the message |
void |
setProperty(String key,
Object value,
PropertyScope scope)
Set a property on the message |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected Map<PropertyScope,Map<String,Object>> scopedMap
protected Set<String> keySet
protected PropertyScope defaultScope
| Constructor Detail |
|---|
public MessagePropertiesContext()
| Method Detail |
|---|
protected Map<String,Object> getScopedProperties(PropertyScope scope)
public PropertyScope getDefaultScope()
protected void addInboundProperties(Map<String,Object> properties)
public Object getProperty(String key)
public Object getProperty(String key,
PropertyScope scope)
public void clearProperties()
public void clearProperties(PropertyScope scope)
public Object removeProperty(String key)
key - the property key to remove
public Object removeProperty(String key,
PropertyScope scope)
key - the property key to remove
public void setProperty(String key,
Object value)
key - the key on which to associate the valuevalue - the property value
public void setProperty(String key,
Object value,
PropertyScope scope)
key - the key on which to associate the valuevalue - the property valuescope - the scope to se the property onPropertyScopepublic Set<String> getPropertyNames()
public Set<String> getPropertyNames(PropertyScope scope)
protected void checkScopeForWriteAccess(PropertyScope scope)
public Object getProperty(String key,
Object defaultValue)
public byte getByteProperty(String name,
byte defaultValue)
public short getShortProperty(String name,
short defaultValue)
public int getIntProperty(String name,
int defaultValue)
public long getLongProperty(String name,
long defaultValue)
public float getFloatProperty(String name,
float defaultValue)
public double getDoubleProperty(String name,
double defaultValue)
public boolean getBooleanProperty(String name,
boolean defaultValue)
public String getStringProperty(String name,
String defaultValue)
protected MessagePropertiesContext copy()
public String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||