public class MessagePropertiesContext extends Object implements Serializable
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 timeModifier and Type | Field and Description |
---|---|
protected CopyOnWriteCaseInsensitiveMap<String,TypedValue> |
inboundMap |
protected Map<String,TypedValue> |
invocationMap |
protected CopyOnWriteCaseInsensitiveMap<String,TypedValue> |
outboundMap |
protected Map<String,TypedValue> |
sessionMap |
Constructor and Description |
---|
MessagePropertiesContext() |
MessagePropertiesContext(MessagePropertiesContext previous) |
Modifier and Type | Method and Description |
---|---|
protected void |
addInboundProperties(Map<String,Object> properties) |
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) |
protected Map<String,TypedValue> |
getOrphanFlowVariables() |
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) |
<T> T |
getProperty(String key,
PropertyScope scope) |
DataType<?> |
getPropertyDataType(String key,
PropertyScope scope) |
Set<String> |
getPropertyNames(PropertyScope scope) |
protected Map<String,TypedValue> |
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)
|
void |
setProperty(String key,
Object value,
PropertyScope scope)
Set a property on the message
|
void |
setProperty(String key,
Object value,
PropertyScope scope,
DataType<?> dataType)
Set a property on the message
|
String |
toString() |
protected CopyOnWriteCaseInsensitiveMap<String,TypedValue> inboundMap
protected CopyOnWriteCaseInsensitiveMap<String,TypedValue> outboundMap
protected Map<String,TypedValue> invocationMap
protected transient Map<String,TypedValue> sessionMap
public MessagePropertiesContext()
public MessagePropertiesContext(MessagePropertiesContext previous)
protected Map<String,TypedValue> getScopedProperties(PropertyScope scope)
public PropertyScope getDefaultScope()
@Deprecated public Object getProperty(String key)
public <T> T getProperty(String key, PropertyScope scope)
public DataType<?> getPropertyDataType(String key, PropertyScope scope)
public void clearProperties()
public void clearProperties(PropertyScope scope)
public Object removeProperty(String key)
key
- the property key to removepublic Object removeProperty(String key, PropertyScope scope)
key
- the property key to remove@Deprecated public void setProperty(String key, Object value)
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
public void setProperty(String key, Object value, PropertyScope scope, DataType<?> dataType)
key
- the key on which to associate the valuevalue
- the property valuescope
- the scope to se the property onPropertyScope
public Set<String> getPropertyNames(PropertyScope scope)
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)
protected Map<String,TypedValue> getOrphanFlowVariables()
Copyright © 2003–2016 MuleSoft, Inc.. All rights reserved.