|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.mule.impl.MuleSession
MuleSession
manages the interaction and distribution of events for
Mule UMOs.
Constructor Summary | |
MuleSession(UMOComponent component)
|
|
MuleSession(UMOMessage message,
UMOSessionHandler requestSessionHandler)
|
|
MuleSession(UMOMessage message,
UMOSessionHandler requestSessionHandler,
UMOComponent component)
|
Method Summary | |
UMOEvent |
createOutboundEvent(UMOMessage message,
UMOImmutableEndpoint endpoint,
UMOEvent previousEvent)
Creates an outbound event for this session |
void |
dispatchEvent(UMOEvent event)
Depending on the session state this methods either Passes an event asynchronously to the next available Mule UMO in the pool or via the endpoint configured for the event |
void |
dispatchEvent(UMOMessage message)
This will dispatch an event asynchronously via the configured outbound endpoint on the component for this session |
void |
dispatchEvent(UMOMessage message,
String endpointName)
Depending on the session state this methods either Passes an event asynchronously to the next available Mule UMO in the pool or via the endpoint configured for the event |
void |
dispatchEvent(UMOMessage message,
UMOImmutableEndpoint endpoint)
Depending on the session state this methods either Passes an event asynchronously to the next available Mule UMO in the pool or via the endpoint configured for the event |
UMOComponent |
getComponent()
Returns the UMOComponent associated with the session in its current execution |
String |
getId()
Returns the unique id for this session |
Object |
getProperty(Object key)
Will retrieve a session level property. |
Iterator |
getPropertyNames()
Returns an iterater of property keys for the session properties on this session |
UMOSecurityContext |
getSecurityContext()
The security context for this session. |
boolean |
isValid()
Determines if this session is valid. |
protected void |
processResponse(UMOMessage response)
Once an event has been processed we need to romove certain properties so that they not propagated to the next request |
UMOMessage |
receiveEvent(String endpointName,
long timeout)
Requests a synchronous receive of an event on the component |
UMOMessage |
receiveEvent(UMOImmutableEndpoint endpoint,
long timeout)
Requests a synchronous receive of an event on the component |
Object |
removeProperty(Object key)
Will retrieve a session level property and remove it from the session |
UMOMessage |
sendEvent(UMOEvent event)
Depending on the session state this methods either Passes an event synchronously to the next available Mule UMO in the pool or via the endpoint configured for the event |
UMOMessage |
sendEvent(UMOMessage message)
This will send an event via the configured outbound endpoint on the component for this session |
UMOMessage |
sendEvent(UMOMessage message,
String endpointName)
Depending on the session state this methods either Passes an event synchronously to the next available Mule UMO in the pool or via the endpoint configured for the event |
UMOMessage |
sendEvent(UMOMessage message,
UMOImmutableEndpoint endpoint)
Depending on the session state this methods either Passes an event synchronously to the next available Mule UMO in the pool or via the endpoint configured for the event |
void |
setProperty(Object key,
Object value)
Will set a session level property. |
void |
setSecurityContext(UMOSecurityContext context)
The security context for this session. |
void |
setValid(boolean value)
Determines if this session is valid. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public MuleSession(UMOComponent component)
public MuleSession(UMOMessage message, UMOSessionHandler requestSessionHandler, UMOComponent component) throws UMOException
public MuleSession(UMOMessage message, UMOSessionHandler requestSessionHandler) throws UMOException
Method Detail |
public void dispatchEvent(UMOMessage message) throws UMOException
UMOSession
dispatchEvent
in interface UMOSession
message
- the message to send
UMOException
- if there is no outbound endpoint configured on the
component or the events fails during dispatchpublic void dispatchEvent(UMOMessage message, String endpointName) throws UMOException
UMOSession
dispatchEvent
in interface UMOSession
message
- the event message payload to sendendpointName
- The endpoint name to disptch the event through. This will
be looked up first on the component configuration and then on the
mule manager configuration
UMOException
- if the event fails to be processed by the component or
the transport for the endpointpublic void dispatchEvent(UMOMessage message, UMOImmutableEndpoint endpoint) throws UMOException
UMOSession
dispatchEvent
in interface UMOSession
message
- the event message payload to sendendpoint
- The endpoint name to disptch the event through
UMOException
- if the event fails to be processed by the component or
the transport for the endpointpublic UMOMessage sendEvent(UMOMessage message, String endpointName) throws UMOException
UMOSession
sendEvent
in interface UMOSession
message
- the event message payload to sendendpointName
- The endpoint name to disptch the event through. This will
be looked up first on the component configuration and then on the
mule manager configuration
UMOException
- if the event fails to be processed by the component or
the transport for the endpointpublic UMOMessage sendEvent(UMOMessage message) throws UMOException
UMOSession
sendEvent
in interface UMOSession
message
- the message to send
UMOException
- if there is no outbound endpoint configured
on the component or the events fails during dispatchpublic UMOMessage sendEvent(UMOMessage message, UMOImmutableEndpoint endpoint) throws UMOException
UMOSession
sendEvent
in interface UMOSession
message
- the event message payload to sendendpoint
- The endpoint to disptch the event through
UMOException
- if the event fails to be processed by the component or
the transport for the endpointpublic void dispatchEvent(UMOEvent event) throws UMOException
UMOSession
dispatchEvent
in interface UMOSession
event
- the event message payload to send first on the component
configuration and then on the mule manager configuration
UMOException
- if the event fails to be processed by the component or
the transport for the endpointpublic String getId()
UMOSession
getId
in interface UMOSession
public UMOMessage sendEvent(UMOEvent event) throws UMOException
UMOSession
sendEvent
in interface UMOSession
event
- the event to process
UMOException
- if the event fails to be processed by the component or
the transport for the endpointprotected void processResponse(UMOMessage response)
response
- The response from the previous requestpublic boolean isValid()
UMOSession
isValid
in interface UMOSession
public void setValid(boolean value)
UMOSession
setValid
in interface UMOSession
value
- true if the component is functioning properly, false otherwisepublic UMOMessage receiveEvent(String endpointName, long timeout) throws UMOException
UMOSession
receiveEvent
in interface UMOSession
endpointName
- the endpoint name identifing the endpointUri on ewhich the
event will be receivedtimeout
- time in milliseconds before the request timesout
UMOException
- if the request operation failspublic UMOMessage receiveEvent(UMOImmutableEndpoint endpoint, long timeout) throws UMOException
UMOSession
receiveEvent
in interface UMOSession
endpoint
- the endpoint identifing the endpointUri on ewhich the event
will be receivedtimeout
- time in milliseconds before the request timesout
UMOException
- if the request operation failspublic UMOEvent createOutboundEvent(UMOMessage message, UMOImmutableEndpoint endpoint, UMOEvent previousEvent) throws UMOException
UMOSession
createOutboundEvent
in interface UMOSession
message
- the event messgae payloadendpoint
- the endpoint to send/dispatch throughpreviousEvent
- the previous event (if any) on this session
UMOException
- if the evnet cannot be createdpublic UMOComponent getComponent()
UMOSession
getComponent
in interface UMOSession
UMOComponent
public void setSecurityContext(UMOSecurityContext context)
setSecurityContext
in interface UMOSession
context
- the context for this session or null if the request is not
secure.public UMOSecurityContext getSecurityContext()
getSecurityContext
in interface UMOSession
public void setProperty(Object key, Object value)
setProperty
in interface UMOSession
key
- the key for the object data being stored on the sessionvalue
- the value of the session datapublic Object getProperty(Object key)
getProperty
in interface UMOSession
key
- the key for the object data being stored on the session
public Object removeProperty(Object key)
removeProperty
in interface UMOSession
key
- the key for the object data being stored on the session
public Iterator getPropertyNames()
getPropertyNames
in interface UMOSession
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |