|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.mule.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 Session properties are not stored on the MuleMessage
. This scope should only be
used once a MuleEvent
has been created as there is no MuleSession
and therefore Session
scope properties before this time
Field Summary | |
---|---|
protected Map<String,Object> |
invocationMap
|
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. |
protected Map<String,Object> |
sessionMap
|
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)
|
|
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)
Deprecated. use the overloaded version with an explicit lookup scope. This method will now use only the outbound scope. |
|
Object |
getProperty(String key,
Object defaultValue)
|
|
|
getProperty(String key,
PropertyScope scope)
|
|
Set<String> |
getPropertyNames()
Deprecated. use getPropertyNames(org.mule.api.transport.PropertyScope) |
|
Set<String> |
getPropertyNames(PropertyScope scope)
|
|
protected Map<String,Object> |
getScopedProperties(PropertyScope scope)
|
|
short |
getShortProperty(String name,
short defaultValue)
|
|
String |
getStringProperty(String name,
PropertyScope scope,
String defaultValue)
|
|
String |
getStringProperty(String name,
String defaultValue)
Deprecated. |
|
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)
Deprecated. use setProperty(String, Object, org.mule.api.transport.PropertyScope) |
|
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 Map<String,Object> invocationMap
protected transient Map<String,Object> sessionMap
protected Set<String> keySet
Constructor Detail |
---|
public MessagePropertiesContext()
Method Detail |
---|
protected Map<String,Object> getScopedProperties(PropertyScope scope)
public PropertyScope getDefaultScope()
protected void addInboundProperties(Map<String,Object> properties)
@Deprecated public Object getProperty(String key)
public <T> T 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
@Deprecated public void setProperty(String key, Object value)
setProperty(String, Object, org.mule.api.transport.PropertyScope)
key
- the key on which to associate the valuevalue
- the property valuepublic 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 onPropertyScope
@Deprecated public Set<String> getPropertyNames()
getPropertyNames(org.mule.api.transport.PropertyScope)
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)
@Deprecated public String getStringProperty(String name, String defaultValue)
public String getStringProperty(String name, PropertyScope scope, String defaultValue)
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |