public final class DefaultMuleSession extends Object implements MuleSession
DefaultMuleSession manages the interaction and distribution of events for Mule Services.| Constructor and Description |
|---|
DefaultMuleSession() |
DefaultMuleSession(FlowConstruct flowConstruct,
MuleContext muleContext)
Deprecated.
|
DefaultMuleSession(MuleContext muleContext)
Deprecated.
|
DefaultMuleSession(MuleSession session) |
DefaultMuleSession(MuleSession source,
FlowConstruct flowConstruct)
Deprecated.
|
DefaultMuleSession(MuleSession source,
MuleContext muleContext)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
void |
clearProperties() |
Map<String,TypedValue> |
getExtendedProperties() |
FlowConstruct |
getFlowConstruct()
WARNING: This method will always return null unless you created the DefaultMuleSession with a
flowConstruct or set one using the setter.
|
String |
getId()
Returns the unique id for this session
|
Map<String,Object> |
getProperties() |
<T> T |
getProperty(Object key)
Will retrieve a session level property.
|
<T> T |
getProperty(String key)
Will retrieve a session scope property.
|
DataType<?> |
getPropertyDataType(String name)
Retrieves a session scope property data type
|
Iterator<String> |
getPropertyNames()
Deprecated.
Use getPropertyNamesAsSet() instead
|
Set<String> |
getPropertyNamesAsSet() |
SecurityContext |
getSecurityContext()
The security context for this session.
|
boolean |
isValid()
Determines if this session is valid.
|
void |
merge(MuleSession updatedSession)
Merge current session with an updated version Result session will contain all the properties from
updatedSession plus those properties in the current session that couldn't be serialized In case
updatedSession is null, then no change will be applied.
|
Object |
removeProperty(Object key)
Will retrieve a session level property and remove it from the session
|
Object |
removeProperty(String key)
Will retrieve a session scope property and remove it from the session
|
void |
setFlowConstruct(FlowConstruct flowConstruct)
WARNING: This method should not be used, and is only here for backwards compatibility
|
void |
setProperty(String key,
Object value)
Will set a session level property.
|
void |
setProperty(String key,
Serializable value)
Will set a session scope property.
|
void |
setProperty(String key,
Serializable value,
DataType<?> dataType)
Will set a session scope property.
|
void |
setSecurityContext(SecurityContext context)
The security context for this session.
|
void |
setValid(boolean value)
Determines if this session is valid.
|
public DefaultMuleSession()
public DefaultMuleSession(MuleSession session)
@Deprecated public DefaultMuleSession(MuleContext muleContext)
@Deprecated public DefaultMuleSession(FlowConstruct flowConstruct, MuleContext muleContext)
@Deprecated public DefaultMuleSession(MuleSession source, MuleContext muleContext)
@Deprecated public DefaultMuleSession(MuleSession source, FlowConstruct flowConstruct)
public String getId()
MuleSessiongetId in interface MuleSessionpublic boolean isValid()
MuleSessionisValid in interface MuleSessionpublic void setValid(boolean value)
MuleSessionsetValid in interface MuleSessionvalue - true if the session is valid, false otherwisepublic void setSecurityContext(SecurityContext context)
setSecurityContext in interface MuleSessioncontext - the context for this session or null if the request is not secure.public SecurityContext getSecurityContext()
getSecurityContext in interface MuleSessionpublic void setProperty(String key, Object value)
setProperty in interface MuleSessionkey - the key for the object data being stored on the sessionvalue - the value of the session datapublic <T> T getProperty(Object key)
getProperty in interface MuleSessionkey - the key for the object data being stored on the sessionpublic Object removeProperty(Object key)
removeProperty in interface MuleSessionkey - the key for the object data being stored on the session@Deprecated public Iterator<String> getPropertyNames()
getPropertyNames in interface MuleSessionpublic Set<String> getPropertyNamesAsSet()
getPropertyNamesAsSet in interface MuleSessionpublic void merge(MuleSession updatedSession)
MuleSessionmerge in interface MuleSessionupdatedSession - mule session with updated propertiespublic Map<String,TypedValue> getExtendedProperties()
public void setProperty(String key, Serializable value)
MuleSessionsetProperty in interface MuleSessionkey - the key for the object data being stored on the sessionvalue - the value of the session datapublic void setProperty(String key, Serializable value, DataType<?> dataType)
MuleSessionsetProperty in interface MuleSessionkey - the key for the object data being stored on the sessionvalue - the value of the session datadataType - the data type for the property valuepublic <T> T getProperty(String key)
MuleSessiongetProperty in interface MuleSessionkey - the key for the object data being stored on the sessionpublic Object removeProperty(String key)
MuleSessionremoveProperty in interface MuleSessionkey - the key for the object data being stored on the sessionpublic void clearProperties()
clearProperties in interface MuleSessionpublic FlowConstruct getFlowConstruct()
MuleSessiongetFlowConstruct in interface MuleSessionpublic void setFlowConstruct(FlowConstruct flowConstruct)
MuleSessionsetFlowConstruct in interface MuleSessionpublic DataType<?> getPropertyDataType(String name)
MuleSessiongetPropertyDataType in interface MuleSessionname - the name for the session propertyCopyright © 2003–2015 MuleSoft, Inc.. All rights reserved.