org.mule.transport.vm
Class VMConnector

java.lang.Object
  extended by org.mule.transport.AbstractConnector
      extended by org.mule.transport.vm.VMConnector
All Implemented Interfaces:
ExceptionListener, EventListener, javax.resource.spi.work.WorkListener, MuleContextAware, Disposable, Initialisable, Lifecycle, Startable, Stoppable, NamedObject, Connectable, Connector

public class VMConnector
extends AbstractConnector

VMConnector A simple endpoint wrapper to allow a Mule service to

be accessed from an endpoint


Field Summary
static String VM
           
 
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
VMConnector()
           
 
Method Summary
 MessageReceiver createReceiver(Service service, InboundEndpoint endpoint)
          Create a Message receiver for this connector
protected  void doConnect()
          Template method where any connections should be made for the connector
protected  void doDisconnect()
          Template method where any connected resources used by the connector should be disconnected
protected  void doDispose()
          Template method to perform any work when destroying the connectoe
protected  void doInitialise()
           
protected  void doStart()
          Template method to perform any work when starting the connectoe
protected  void doStop()
          Template method to perform any work when stopping the connectoe
 MessageAdapter getMessageAdapter(Object message)
          Gets a MessageAdapter for the endpoint for the given message (data)
 String getProtocol()
           
 QueueManager getQueueManager()
           
 QueueProfile getQueueProfile()
           
 int getQueueTimeout()
           
protected  MessageReceiver getReceiverByEndpoint(EndpointURI endpointUri)
           
 boolean isQueueEvents()
           
 boolean isResponseEnabled()
           
 void setQueueEvents(boolean queueEvents)
           
 void setQueueProfile(QueueProfile queueProfile)
           
 void setQueueTimeout(int queueTimeout)
           
 
Methods inherited from class org.mule.transport.AbstractConnector
checkDisposed, connect, destroyReceiver, disconnect, dispatch, dispose, disposeDispatchers, disposeReceivers, disposeRequesters, disposeWorkManagers, exceptionThrown, fireNotification, getConnectEventId, getConnectionDescription, getDefaultInboundTransformers, getDefaultOutboundTransformers, getDefaultResponseTransformers, getDispatcherFactory, getDispatcherThreadingProfile, getDispatcherWorkManager, getExceptionListener, getMaxDispatchersActive, getMaxRequestersActive, 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, 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

VM

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

VMConnector

public VMConnector()
Method Detail

doInitialise

protected void doInitialise()
                     throws InitialisationException
Specified by:
doInitialise in class AbstractConnector
Throws:
InitialisationException

doDispose

protected void doDispose()
Description copied from class: AbstractConnector
Template method to perform any work when destroying the connectoe

Specified by:
doDispose in class AbstractConnector

doConnect

protected void doConnect()
                  throws Exception
Description copied from class: AbstractConnector
Template method where any connections should be made for the connector

Specified by:
doConnect in class AbstractConnector
Throws:
Exception

doDisconnect

protected void doDisconnect()
                     throws Exception
Description copied from class: AbstractConnector
Template method where any connected resources used by the connector should be disconnected

Specified by:
doDisconnect in class AbstractConnector
Throws:
Exception

doStart

protected void doStart()
                throws MuleException
Description copied from class: AbstractConnector
Template method to perform any work when starting the connectoe

Specified by:
doStart in class AbstractConnector
Throws:
MuleException - if the method fails

doStop

protected void doStop()
               throws MuleException
Description copied from class: AbstractConnector
Template method to perform any work when stopping the connectoe

Specified by:
doStop in class AbstractConnector
Throws:
MuleException - if the method fails

createReceiver

public MessageReceiver createReceiver(Service service,
                                      InboundEndpoint endpoint)
                               throws Exception
Description copied from class: AbstractConnector
Create a Message receiver for this connector

Overrides:
createReceiver in class AbstractConnector
Parameters:
service - the service that will receive events from this receiver, the listener
endpoint - the endpoint that defies this inbound communication
Returns:
an instance of the message receiver defined in this connectors' TransportServiceDescriptor initialised using the service and endpoint.
Throws:
Exception - if there is a problem creating the receiver. This exception really depends on the underlying transport, thus any exception could be thrown

getMessageAdapter

public MessageAdapter getMessageAdapter(Object message)
                                 throws MessagingException
Description copied from class: AbstractConnector
Gets a MessageAdapter for the endpoint for the given message (data)

Specified by:
getMessageAdapter in interface Connector
Overrides:
getMessageAdapter in class AbstractConnector
Parameters:
message - the data with which to initialise the MessageAdapter
Returns:
the MessageAdapter for the endpoint
Throws:
MessagingException - if the message parameter is not supported
See Also:
MessageAdapter

getProtocol

public String getProtocol()
Returns:
the primary protocol name for endpoints of this connector

isQueueEvents

public boolean isQueueEvents()

setQueueEvents

public void setQueueEvents(boolean queueEvents)

getQueueProfile

public QueueProfile getQueueProfile()

setQueueProfile

public void setQueueProfile(QueueProfile queueProfile)

getReceiverByEndpoint

protected MessageReceiver getReceiverByEndpoint(EndpointURI endpointUri)
                                         throws EndpointException
Throws:
EndpointException

isResponseEnabled

public boolean isResponseEnabled()
Specified by:
isResponseEnabled in interface Connector
Overrides:
isResponseEnabled in class AbstractConnector

getQueueTimeout

public int getQueueTimeout()

setQueueTimeout

public void setQueueTimeout(int queueTimeout)

getQueueManager

public QueueManager getQueueManager()


Copyright © 2003-2009 MuleSource, Inc.. All Rights Reserved.