GigaSpaces XAP 7.1 API

org.openspaces.esb.mule.queue
Class OpenSpacesQueueConnector

java.lang.Object
  extended by org.mule.transport.AbstractConnector
      extended by org.openspaces.esb.mule.queue.OpenSpacesQueueConnector
All Implemented Interfaces:
ExceptionListener, EventListener, javax.resource.spi.work.WorkListener, org.mule.api.context.MuleContextAware, org.mule.api.lifecycle.Disposable, org.mule.api.lifecycle.Initialisable, org.mule.api.lifecycle.Lifecycle, org.mule.api.lifecycle.Startable, org.mule.api.lifecycle.Stoppable, org.mule.api.NamedObject, org.mule.api.transport.Connectable, org.mule.api.transport.Connector, ApplicationContextAware

public class OpenSpacesQueueConnector
extends org.mule.transport.AbstractConnector
implements ApplicationContextAware

An OS queue connector. Holding the actual GigaSpace instance that will be used to communicate with the Space by the dispatcher, receiver, and requestor.

If the giga space reference is defined (setGigaSpace(String), will use it to find the GigaSpace instance defined. If it is not defined, will try to get GigaSpace instances from Spring and if there is only one defined, will used it.

Also holds other attributes related to the written and read entry. Such as if the entry will be a fifo one, and if it will be persisted.

Author:
kimchy

Field Summary
static String OS_QUEUE
           
 
Fields inherited from class org.mule.transport.AbstractConnector
connected, createMultipleTransactedReceivers, DEFAULT_NUM_CONCURRENT_TX_RECEIVERS, dispatcherFactory, dispatchers, disposed, exceptionListener, initialised, logger, muleContext, name, numberOfConcurrentTransactedReceivers, receivers, requesterFactory, requesters, serviceDescriptor, serviceOverrides, sessionHandler, started, startOnConnect
 
Fields inherited from interface org.mule.api.transport.Connector
INT_VALUE_NOT_SET
 
Fields inherited from interface org.mule.api.lifecycle.Initialisable
PHASE_NAME
 
Fields inherited from interface org.mule.api.lifecycle.Startable
PHASE_NAME
 
Fields inherited from interface org.mule.api.lifecycle.Stoppable
PHASE_NAME
 
Fields inherited from interface org.mule.api.lifecycle.Disposable
PHASE_NAME
 
Constructor Summary
OpenSpacesQueueConnector()
           
 
Method Summary
protected  void doConnect()
           
protected  void doDisconnect()
           
protected  void doDispose()
           
protected  void doInitialise()
           
protected  void doStart()
           
protected  void doStop()
           
 ApplicationContext getApplicationContext()
           
 String getGigaSpace()
          Returns the GigaSpace bean id reference to be retrieved from Spring.
 GigaSpace getGigaSpaceObj()
           
 String getProtocol()
           
protected  org.mule.api.transport.MessageReceiver getReceiverByEndpoint(org.mule.api.endpoint.EndpointURI endpointUri)
           
 long getTimeout()
          The timeout waiting for a message on the queue in milliseconds.
 boolean isFifo()
          Should the entries written to the virtualized queue be fifo or not.
 boolean isPersistent()
          Should the entries written to the Space will be persistent to a backend storage or not.
 void setApplicationContext(ApplicationContext applicationContext)
          Injected by Spring.
 void setFifo(boolean fifo)
          Should the entries written to the virtualized queue be fifo or not.
 void setGigaSpace(String gigaSpaceRef)
          Sets the GigaSpace bean id reference to be retrieved from Spring.
 void setPersistent(boolean persistent)
          Should the entries written to the Space will be persistent to a backend storage or not.
 void setTimeout(long timeout)
          The timeout waiting for a message on the queue in milliseconds.
 
Methods inherited from class org.mule.transport.AbstractConnector
checkDisposed, connect, createReceiver, destroyReceiver, disconnect, dispatch, dispose, disposeDispatchers, disposeReceivers, disposeRequesters, disposeWorkManagers, exceptionThrown, fireNotification, getConnectEventId, getConnectionDescription, getDefaultInboundTransformers, getDefaultOutboundTransformers, getDefaultResponseTransformers, getDispatcherFactory, getDispatcherThreadingProfile, getDispatcherWorkManager, getExceptionListener, getMaxDispatchersActive, getMaxRequestersActive, getMessageAdapter, getMuleContext, getName, getNumberOfConcurrentTransactedReceivers, getOutputStream, getReceiver, getReceiverKey, getReceivers, getReceivers, getReceiverThreadingProfile, getReceiverWorkManager, getReplyToHandler, getRequesterFactory, getRequesterThreadingProfile, getRequesterWorkManager, getRetryPolicyTemplate, getScheduler, getServiceDescriptor, getServiceOverrides, getSessionHandler, getSupportedProtocols, handleException, handleException, handleWorkException, initFromServiceDescriptor, initialise, initialiseFromUrl, initWorkManagers, isConnected, isCreateMultipleTransactedReceivers, isDisposed, isEnableMessageEvents, isResponseEnabled, isStarted, isSyncEnabled, isValidateConnections, lookupReceiver, registerListener, registerSupportedProtocol, registerSupportedProtocolWithoutPrefix, request, request, send, setConnected, setCreateMultipleTransactedReceivers, setDispatcherFactory, setDispatcherThreadingProfile, setDynamicNotification, setExceptionListener, setMaxDispatchersActive, setMaxRequestersActive, setMuleContext, setName, setNumberOfConcurrentTransactedReceivers, setReceiverThreadingProfile, setRequesterFactory, setRequesterThreadingProfile, setRetryPolicyTemplate, setServiceOverrides, setSessionHandler, setSupportedProtocols, setupDispatchReturn, setupRequestReturn, setValidateConnections, start, stop, supportsProtocol, toString, unregisterListener, unregisterSupportedProtocol, updateCachedNotificationHandler, validateConnection, workAccepted, workCompleted, workRejected, workStarted
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

OS_QUEUE

public static final String OS_QUEUE
See Also:
Constant Field Values
Constructor Detail

OpenSpacesQueueConnector

public OpenSpacesQueueConnector()
Method Detail

getProtocol

public String getProtocol()
Specified by:
getProtocol in interface org.mule.api.transport.Connector
Returns:
the openspaces protocol name.

setApplicationContext

public void setApplicationContext(ApplicationContext applicationContext)
                           throws BeansException
Injected by Spring. The application context to get the GigaSpace instance from.

Specified by:
setApplicationContext in interface ApplicationContextAware
Throws:
BeansException

setGigaSpace

public void setGigaSpace(String gigaSpaceRef)
Sets the GigaSpace bean id reference to be retrieved from Spring. If not defined, will try to get all the GigaSpace instances from Spring, and if there is only one, will use it.


getGigaSpace

public String getGigaSpace()
Returns the GigaSpace bean id reference to be retrieved from Spring. If not defined, will try to get all the GigaSpace instances from Spring, and if there is only one, will use it.


isFifo

public boolean isFifo()
Should the entries written to the virtualized queue be fifo or not. Defaults to false.


setFifo

public void setFifo(boolean fifo)
Should the entries written to the virtualized queue be fifo or not. Defaults to false.


isPersistent

public boolean isPersistent()
Should the entries written to the Space will be persistent to a backend storage or not. Defaults to false (as many times a backup space is enough).


setPersistent

public void setPersistent(boolean persistent)
Should the entries written to the Space will be persistent to a backend storage or not. Defaults to false (as many times a backup space is enough).


getTimeout

public long getTimeout()
The timeout waiting for a message on the queue in milliseconds. Defaults to 1000.


setTimeout

public void setTimeout(long timeout)
The timeout waiting for a message on the queue in milliseconds. Defaults to 1000.


doInitialise

protected void doInitialise()
                     throws org.mule.api.lifecycle.InitialisationException
Specified by:
doInitialise in class org.mule.transport.AbstractConnector
Throws:
org.mule.api.lifecycle.InitialisationException

doDispose

protected void doDispose()
Specified by:
doDispose in class org.mule.transport.AbstractConnector

doStart

protected void doStart()
                throws org.mule.api.MuleException
Specified by:
doStart in class org.mule.transport.AbstractConnector
Throws:
org.mule.api.MuleException

doStop

protected void doStop()
               throws org.mule.api.MuleException
Specified by:
doStop in class org.mule.transport.AbstractConnector
Throws:
org.mule.api.MuleException

doConnect

protected void doConnect()
                  throws Exception
Specified by:
doConnect in class org.mule.transport.AbstractConnector
Throws:
Exception

doDisconnect

protected void doDisconnect()
                     throws Exception
Specified by:
doDisconnect in class org.mule.transport.AbstractConnector
Throws:
Exception

getApplicationContext

public ApplicationContext getApplicationContext()

getGigaSpaceObj

public GigaSpace getGigaSpaceObj()

getReceiverByEndpoint

protected org.mule.api.transport.MessageReceiver getReceiverByEndpoint(org.mule.api.endpoint.EndpointURI endpointUri)
                                                                throws org.mule.api.endpoint.EndpointException
Throws:
org.mule.api.endpoint.EndpointException

GigaSpaces XAP 7.1 API

Copyright © GigaSpaces.