|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface MuleSession
MuleSession
is the context in which a request is processed by Mule. The scope of the
MuleSession context includes all Mule Flows and Services that the request is routed through on the same or
different Mule instances. A MuleSession instance has a unique id, session scope properties and an optional
security context.
In order for the session to be propagated from one Flow or Service to the next a transports that support
message properties needs to be used. A SessionHandler
is used to store the session in an outbound
message property and then retrieve it from an inbound property using a specific strategy.
SessionHandler
Method Summary | ||
---|---|---|
void |
clearProperties()
|
|
FlowConstruct |
getFlowConstruct()
Deprecated. |
|
String |
getId()
Returns the unique id for this session |
|
|
getProperty(Object key)
Deprecated. |
|
|
getProperty(String key)
Will retrieve a session scope property. |
|
Iterator |
getPropertyNames()
Deprecated. Use getPropertyNamesAsSet() instead (Will be removed in 4.0) |
|
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)
Deprecated. |
|
Object |
removeProperty(String key)
Will retrieve a session scope property and remove it from the session |
|
void |
setFlowConstruct(FlowConstruct flowConstruct)
Deprecated. |
|
void |
setProperty(String key,
Object value)
Deprecated. |
|
void |
setProperty(String key,
Serializable value)
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. |
Method Detail |
---|
boolean isValid()
void setValid(boolean value)
value
- true if the session is valid, false otherwiseString getId()
void setSecurityContext(SecurityContext context)
context
- the context for this session or null if the request is not secure.SecurityContext getSecurityContext()
void setProperty(String key, Serializable value)
key
- the key for the object data being stored on the sessionvalue
- the value of the session data@Deprecated void setProperty(String key, Object value)
<T> T getProperty(String key)
key
- the key for the object data being stored on the session
@Deprecated <T> T getProperty(Object key)
Object removeProperty(String key)
key
- the key for the object data being stored on the session
@Deprecated Object removeProperty(Object key)
Iterator getPropertyNames()
Set<String> getPropertyNamesAsSet()
void merge(MuleSession updatedSession)
updatedSession
- mule session with updated propertiesvoid clearProperties()
@Deprecated FlowConstruct getFlowConstruct()
@Deprecated void setFlowConstruct(FlowConstruct flowConstruct)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |