|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mule.DefaultMuleSession
public final class DefaultMuleSession
DefaultMuleSession manages the interaction and distribution of events for
Mule Services.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.mule.util.store.DeserializationPostInitialisable |
|---|
DeserializationPostInitialisable.Implementation |
| Constructor Summary | |
|---|---|
DefaultMuleSession(MuleContext muleContext)
|
|
DefaultMuleSession(MuleMessage message,
SessionHandler requestSessionHandler,
MuleContext muleContext)
Deprecated. Use DefaultMuleSession(MuleContext muleContext) instead |
|
DefaultMuleSession(MuleMessage message,
SessionHandler requestSessionHandler,
Service service,
MuleContext muleContext)
Deprecated. Use DefaultMuleSession(Service service, MuleContext muleContext) instead |
|
DefaultMuleSession(Service service,
MuleContext muleContext)
|
|
| Method Summary | |
|---|---|
MuleEvent |
createOutboundEvent(MuleMessage message,
OutboundEndpoint endpoint,
MuleEvent previousEvent)
Creates an outbound event for this session |
void |
dispatchEvent(MuleEvent event)
Depending on the session state this methods either Passes an event asynchronously to the next available Mule component in the pool or via the endpoint configured for the event |
void |
dispatchEvent(MuleMessage message)
This will dispatch an event asynchronously via the configured outbound endpoint on the service for this session |
void |
dispatchEvent(MuleMessage message,
OutboundEndpoint endpoint)
Depending on the session state this methods either Passes an event asynchronously to the next available Mule component in the pool or via the endpoint configured for the event |
void |
dispatchEvent(MuleMessage message,
String endpointName)
Depending on the session state this methods either Passes an event asynchronously to the next available Mule component in the pool or via the endpoint configured for the event |
String |
getId()
Returns the unique id for this session |
Object |
getProperty(Object key)
Will retrieve a session level property. |
Iterator |
getPropertyNames()
Deprecated. Use getPropertyNamesAsSet() instead |
Set |
getPropertyNamesAsSet()
|
SecurityContext |
getSecurityContext()
The security context for this session. |
Service |
getService()
Returns the Service associated with the session in its current execution |
boolean |
isValid()
Determines if this session is valid. |
protected void |
processResponse(MuleMessage response)
Once an event has been processed we need to romove certain properties so that they not propagated to the next request |
Object |
removeProperty(Object key)
Will retrieve a session level property and remove it from the session |
MuleMessage |
requestEvent(InboundEndpoint endpoint,
long timeout)
Requests a synchronous receive of an event on the service |
MuleMessage |
requestEvent(String endpointName,
long timeout)
Requests a synchronous receive of an event on the service |
MuleMessage |
sendEvent(MuleEvent event)
Depending on the session state this methods either Passes an event synchronously to the next available Mule component in the pool or via the endpoint configured for the event |
MuleMessage |
sendEvent(MuleMessage message)
This will send an event via the configured outbound endpoint on the service for this session |
MuleMessage |
sendEvent(MuleMessage message,
OutboundEndpoint endpoint)
Depending on the session state this methods either Passes an event synchronously to the next available Mule component in the pool or via the endpoint configured for the event |
MuleMessage |
sendEvent(MuleMessage message,
String endpointName)
Depending on the session state this methods either Passes an event synchronously to the next available Mule component 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(SecurityContext context)
The security context for this session. |
void |
setService(Service service)
Sets the Service associated with the session in its current execution |
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 DefaultMuleSession(MuleContext muleContext)
public DefaultMuleSession(Service service,
MuleContext muleContext)
@Deprecated
public DefaultMuleSession(MuleMessage message,
SessionHandler requestSessionHandler,
Service service,
MuleContext muleContext)
throws MuleException
MuleException
@Deprecated
public DefaultMuleSession(MuleMessage message,
SessionHandler requestSessionHandler,
MuleContext muleContext)
throws MuleException
MuleException| Method Detail |
|---|
public void dispatchEvent(MuleMessage message)
throws MuleException
MuleSession
dispatchEvent in interface MuleSessionmessage - the message to send
MuleException - if there is no outbound endpoint configured on the
service or the events fails during dispatch
public void dispatchEvent(MuleMessage message,
String endpointName)
throws MuleException
MuleSession
dispatchEvent in interface MuleSessionmessage - the event message payload to sendendpointName - The endpoint name to disptch the event through. This will
be looked up first on the service configuration and then on the
mule manager configuration
MuleException - if the event fails to be processed by the service or
the transport for the endpoint
public void dispatchEvent(MuleMessage message,
OutboundEndpoint endpoint)
throws MuleException
MuleSession
dispatchEvent in interface MuleSessionmessage - the event message payload to sendendpoint - The endpoint name to disptch the event through
MuleException - if the event fails to be processed by the service or
the transport for the endpoint
public MuleMessage sendEvent(MuleMessage message,
String endpointName)
throws MuleException
MuleSession
sendEvent in interface MuleSessionmessage - the event message payload to sendendpointName - The endpoint name to disptch the event through. This will
be looked up first on the service configuration and then on the
mule manager configuration
MuleException - if the event fails to be processed by the service or
the transport for the endpoint
public MuleMessage sendEvent(MuleMessage message)
throws MuleException
MuleSession
sendEvent in interface MuleSessionmessage - the message to send
MuleException - if there is no outbound endpoint configured
on the service or the events fails during dispatch
public MuleMessage sendEvent(MuleMessage message,
OutboundEndpoint endpoint)
throws MuleException
MuleSession
sendEvent in interface MuleSessionmessage - the event message payload to sendendpoint - The endpoint to disptch the event through
MuleException - if the event fails to be processed by the service or
the transport for the endpoint
public void dispatchEvent(MuleEvent event)
throws MuleException
MuleSession
dispatchEvent in interface MuleSessionevent - the event message payload to send first on the service
configuration and then on the mule manager configuration
MuleException - if the event fails to be processed by the service or
the transport for the endpointpublic String getId()
MuleSession
getId in interface MuleSession
public MuleMessage sendEvent(MuleEvent event)
throws MuleException
MuleSession
sendEvent in interface MuleSessionevent - the event to process
MuleException - if the event fails to be processed by the service or
the transport for the endpointprotected void processResponse(MuleMessage response)
response - The response from the previous requestpublic boolean isValid()
MuleSession
isValid in interface MuleSessionpublic void setValid(boolean value)
MuleSession
setValid in interface MuleSessionvalue - true if the service is functioning properly, false otherwise
public MuleMessage requestEvent(String endpointName,
long timeout)
throws MuleException
MuleSession
requestEvent in interface MuleSessionendpointName - the endpoint name identifing the endpointUri on ewhich the
event will be receivedtimeout - time in milliseconds before the request timesout
MuleException - if the request operation fails
public MuleMessage requestEvent(InboundEndpoint endpoint,
long timeout)
throws MuleException
MuleSession
requestEvent in interface MuleSessionendpoint - the endpoint identifing the endpointUri on ewhich the event
will be receivedtimeout - time in milliseconds before the request timesout
MuleException - if the request operation fails
public MuleEvent createOutboundEvent(MuleMessage message,
OutboundEndpoint endpoint,
MuleEvent previousEvent)
throws MuleException
MuleSession
createOutboundEvent in interface MuleSessionmessage - the event messgae payloadendpoint - the endpoint to send/dispatch throughpreviousEvent - the previous event (if any) on this session
MuleException - if the evnet cannot be createdpublic Service getService()
MuleSession
getService in interface MuleSessionServicepublic void setService(Service service)
MuleSession
setService in interface MuleSessionServicepublic 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 MuleSession
public void setProperty(Object key,
Object value)
setProperty in interface MuleSessionkey - the key for the object data being stored on the sessionvalue - the value of the session datapublic Object getProperty(Object key)
getProperty in interface MuleSessionkey - the key for the object data being stored on the session
public Object removeProperty(Object key)
removeProperty in interface MuleSessionkey - the key for the object data being stored on the session
@Deprecated public Iterator getPropertyNames()
getPropertyNames in interface MuleSessionpublic Set getPropertyNamesAsSet()
getPropertyNamesAsSet in interface MuleSession
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||