org.openspaces.esb.mule.eventcontainer
Class OpenSpacesMessageReceiver
java.lang.Object
org.mule.transport.AbstractConnectable
org.mule.transport.AbstractMessageReceiver
org.openspaces.esb.mule.eventcontainer.OpenSpacesMessageReceiver
- All Implemented Interfaces:
- ExceptionListener, org.mule.api.lifecycle.Disposable, org.mule.api.lifecycle.Initialisable, org.mule.api.lifecycle.Startable, org.mule.api.lifecycle.Stoppable, org.mule.api.transport.Connectable, org.mule.api.transport.MessageReceiver, SpaceDataEventListener
public class OpenSpacesMessageReceiver
- extends org.mule.transport.AbstractMessageReceiver
- implements SpaceDataEventListener
OpenSpacesMessageReceiver
is used to receive data from an GigaSpaces's space.
It implements SpaceDataEventListener and as such it register itself to Polling/Notify SpaceListeningContainer.
- Author:
- yitzhaki
- See Also:
SpaceDataEventListener
Fields inherited from class org.mule.transport.AbstractMessageReceiver |
receiverKey, responseEndpoint, service |
Fields inherited from class org.mule.transport.AbstractConnectable |
connected, connector, endpoint, logger, retryTemplate, started, startOnConnect |
Fields inherited from interface org.mule.api.lifecycle.Initialisable |
PHASE_NAME |
Fields inherited from interface org.mule.api.lifecycle.Disposable |
PHASE_NAME |
Fields inherited from interface org.mule.api.lifecycle.Startable |
PHASE_NAME |
Fields inherited from interface org.mule.api.lifecycle.Stoppable |
PHASE_NAME |
Constructor Summary |
OpenSpacesMessageReceiver(org.mule.api.transport.Connector connector,
org.mule.api.service.Service service,
org.mule.api.endpoint.InboundEndpoint endpoint)
Creates a OpenSpacesMessageReceiver and resister it as a SpaceDataEventListener to
the Polling/Notify container that declared as umoEndpoint.EndpointURI.address. |
Methods inherited from class org.mule.transport.AbstractMessageReceiver |
dispose, getConnectEventId, getConnectionDescription, getEndpoint, getEndpointURI, getListener, getReceiverKey, getService, getWorkManager, handleUnacceptedFilter, initialise, routeMessage, routeMessage, routeMessage, routeMessage, routeMessage, routeMessage, setEndpoint, setExceptionDetails, setListener, setReceiverKey, setService, toString |
Methods inherited from class org.mule.transport.AbstractConnectable |
activate, connect, disconnect, disposeAndLogException, doInitialise, exceptionThrown, getConnectEventId, getConnector, handleException, isConnected, isDoThreading, isStarted, passivate, setEndpoint, start, stop, validate, validateConnection |
Methods inherited from interface org.mule.api.transport.Connectable |
connect, disconnect, isConnected, validateConnection |
Methods inherited from interface org.mule.api.lifecycle.Startable |
start |
Methods inherited from interface org.mule.api.lifecycle.Stoppable |
stop |
OpenSpacesMessageReceiver
public OpenSpacesMessageReceiver(org.mule.api.transport.Connector connector,
org.mule.api.service.Service service,
org.mule.api.endpoint.InboundEndpoint endpoint)
throws org.mule.api.lifecycle.CreateException
- Creates a OpenSpacesMessageReceiver and resister it as a SpaceDataEventListener to
the Polling/Notify container that declared as umoEndpoint.EndpointURI.address.
- Parameters:
connector
- the endpoint that created this listenerservice
- the service to associate with the receiver. When data is
received the component dispatchEvent
or
sendEvent
is used to dispatch the data to the
relivant UMO.endpoint
- the provider contains the endpointUri on which the receiver
will listen on. The URI structure must be declared as the following
os://
- Throws:
org.mule.api.lifecycle.CreateException
- See Also:
Service
,
ImmutableEndpoint
onEvent
public void onEvent(Object data,
GigaSpace gigaSpace,
TransactionStatus txStatus,
Object source)
- An event callback with the actual data object of the event.
This method invoked by eventListenerContainer creates a UMOMessage that wraps the data object,
then routes the UMOMessage via the Mule bus.
- Specified by:
onEvent
in interface SpaceDataEventListener
- Parameters:
data
- The actual data object of the eventgigaSpace
- A GigaSpace instance that can be used to perofrm additional operations against the
spacetxStatus
- An optional transaction status allowing to rollback a transaction programmaticallysource
- Optional additional data or the actual source event data object (where relevant)
doReceiveEvent
protected void doReceiveEvent(Object data,
GigaSpace gigaSpace,
TransactionStatus txStatus,
Object source)
throws Exception
- Throws:
Exception
doStart
protected void doStart()
throws org.mule.api.MuleException
- Overrides:
doStart
in class org.mule.transport.AbstractConnectable
- Throws:
org.mule.api.MuleException
doDisconnect
protected void doDisconnect()
throws Exception
- Overrides:
doDisconnect
in class org.mule.transport.AbstractConnectable
- Throws:
Exception
doStop
protected void doStop()
throws org.mule.api.MuleException
- Overrides:
doStop
in class org.mule.transport.AbstractConnectable
- Throws:
org.mule.api.MuleException
doConnect
protected void doConnect()
throws Exception
- Overrides:
doConnect
in class org.mule.transport.AbstractConnectable
- Throws:
Exception
doDispose
protected void doDispose()
- Overrides:
doDispose
in class org.mule.transport.AbstractConnectable
Copyright © GigaSpaces.