|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mule.transport.AbstractConnector
public abstract class AbstractConnector
AbstractConnector provides base functionality for all connectors
provided with Mule. Connectors are the mechanism used to connect to external
systems and protocols in order to send and receive data.
AbstractConnector provides getter and setter methods for endpoint
name, transport name and protocol. It also provides methods to stop and start
connectors and sets up a dispatcher threadpool which allows deriving connectors
the possibility to dispatch work to separate threads. This functionality is
controlled with the doThreading property on the threadingProfiles for
dispatchers and receivers. The lifecycle for a connector is -
| Field Summary | |
|---|---|
protected edu.emory.mathcs.backport.java.util.concurrent.atomic.AtomicBoolean |
connected
|
protected boolean |
createMultipleTransactedReceivers
|
static int |
DEFAULT_NUM_CONCURRENT_TX_RECEIVERS
Default number of concurrent transactional receivers. |
protected MessageDispatcherFactory |
dispatcherFactory
Factory used to create dispatchers for this connector |
protected GenericKeyedObjectPool |
dispatchers
A pool of dispatchers for this connector, keyed by endpoint |
protected edu.emory.mathcs.backport.java.util.concurrent.atomic.AtomicBoolean |
disposed
|
protected ExceptionListener |
exceptionListener
The exception strategy used by this connector |
protected edu.emory.mathcs.backport.java.util.concurrent.atomic.AtomicBoolean |
initialised
|
protected boolean |
initialStateStopped
The will cause the connector not to start when start() is called. |
protected Log |
logger
logger used by this class |
protected MuleContext |
muleContext
|
protected String |
name
The name that identifies the endpoint |
protected int |
numberOfConcurrentTransactedReceivers
|
protected Map<Object,MessageReceiver> |
receivers
The collection of listeners on this connector. |
protected MessageRequesterFactory |
requesterFactory
Factory used to create requesters for this connector |
protected GenericKeyedObjectPool |
requesters
A pool of requesters for this connector, keyed by endpoint |
protected TransportServiceDescriptor |
serviceDescriptor
Holds the service configuration for this connector |
protected Properties |
serviceOverrides
The map of service overrides that can be used to extend the capabilities of the connector |
protected SessionHandler |
sessionHandler
The strategy used for reading and writing session information to and fromt he transport |
protected edu.emory.mathcs.backport.java.util.concurrent.atomic.AtomicBoolean |
started
|
protected boolean |
startOnConnect
Indicates whether the connector should start upon connecting. |
| 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 | |
|---|---|
AbstractConnector()
|
|
| Method Summary | |
|---|---|
protected void |
checkDisposed()
|
protected void |
configureDispatcherPool()
|
void |
connect()
Make the connection to the underlying transport. |
protected MessageReceiver |
createReceiver(Service service,
InboundEndpoint endpoint)
Create a Message receiver for this connector |
protected edu.emory.mathcs.backport.java.util.concurrent.ScheduledExecutorService |
createScheduler()
|
void |
destroyReceiver(MessageReceiver receiver,
ImmutableEndpoint endpoint)
|
void |
disconnect()
Disconnect the from the underlying transport |
void |
dispatch(OutboundEndpoint endpoint,
MuleEvent event)
Dispatches an event from the endpoint to the external system |
void |
dispose()
A lifecycle method where implementor should free up any resources. |
protected void |
disposeDispatchers()
|
protected void |
disposeReceivers()
|
protected void |
disposeRequesters()
|
protected void |
disposeWorkManagers()
|
protected abstract void |
doConnect()
Template method where any connections should be made for the connector |
protected abstract void |
doDisconnect()
Template method where any connected resources used by the connector should be disconnected |
protected abstract void |
doDispose()
Template method to perform any work when destroying the connectoe |
protected abstract void |
doInitialise()
|
protected abstract void |
doStart()
Template method to perform any work when starting the connectoe |
protected abstract void |
doStop()
Template method to perform any work when stopping the connectoe |
protected void |
doUnregisterListener(Service service,
InboundEndpoint endpoint,
MessageReceiver receiver)
|
void |
exceptionThrown(Exception e)
|
void |
fireNotification(ServerNotification notification)
Fires a server notification to all registered listeners |
protected String |
getConnectEventId()
The resource id used when firing ConnectEvents from this connector |
String |
getConnectionDescription()
Returns a string identifying the underlying resource |
List<Transformer> |
getDefaultInboundTransformers()
|
List<Transformer> |
getDefaultOutboundTransformers()
|
List<Transformer> |
getDefaultResponseTransformers()
|
MessageDispatcherFactory |
getDispatcherFactory()
The dispatcher factory is used to create a message dispatcher of the current request |
ThreadingProfile |
getDispatcherThreadingProfile()
Getter for property 'dispatcherThreadingProfile'. |
protected WorkManager |
getDispatcherWorkManager()
Returns a work manager for message dispatchers. |
ExceptionListener |
getExceptionListener()
|
int |
getMaxDispatchersActive()
Returns the maximum number of dispatchers that can be concurrently active per endpoint. |
int |
getMaxRequestersActive()
Returns the maximum number of requesters that can be concurrently active per endpoint. |
int |
getMaxTotalDispatchers()
Returns the maximum number of dispatchers that can be concurrently active for all endpoints. |
MessageAdapter |
getMessageAdapter(Object message)
Gets a MessageAdapter for the endpoint for the given message
(data) |
MessageAdapter |
getMessageAdapter(Object message,
MessageAdapter originalMessageAdapter)
|
MuleContext |
getMuleContext()
|
String |
getName()
Gets the name of the object |
int |
getNumberOfConcurrentTransactedReceivers()
Returns the number of concurrent receivers that will be launched when isCreateMultipleTransactedReceivers() returns true. |
OutputStream |
getOutputStream(OutboundEndpoint endpoint,
MuleMessage message)
Will get the output stream for this type of transport. |
MessageReceiver |
getReceiver(Service service,
InboundEndpoint endpoint)
|
protected Object |
getReceiverKey(Service service,
InboundEndpoint endpoint)
The method determines the key used to store the receiver against. |
Map<Object,MessageReceiver> |
getReceivers()
Getter for property 'receivers'. |
MessageReceiver[] |
getReceivers(String wildcardExpression)
|
ThreadingProfile |
getReceiverThreadingProfile()
Getter for property 'receiverThreadingProfile'. |
protected WorkManager |
getReceiverWorkManager(String receiverName)
Returns a work manager for message receivers. |
ReplyToHandler |
getReplyToHandler()
Getter for property 'replyToHandler'. |
MessageRequesterFactory |
getRequesterFactory()
The requester factory is used to create a message requester of the current request |
ThreadingProfile |
getRequesterThreadingProfile()
Getter for property 'requesterThreadingProfile'. |
protected WorkManager |
getRequesterWorkManager()
Returns a work manager for message requesters. |
RetryPolicyTemplate |
getRetryPolicyTemplate()
|
edu.emory.mathcs.backport.java.util.concurrent.ScheduledExecutorService |
getScheduler()
Returns a Scheduler service for periodic tasks, currently limited to internal use. |
protected TransportServiceDescriptor |
getServiceDescriptor()
Get the TransportServiceDescriptor for this connector. |
Map |
getServiceOverrides()
A map of fully qualified class names that should override those in the connectors' service descriptor This map will be null if there are no overrides |
SessionHandler |
getSessionHandler()
Getter for property 'sessionHandler'. |
List |
getSupportedProtocols()
Returns an unmodifiable list of the protocols supported by this connector |
void |
handleException(Exception exception)
|
void |
handleException(Exception exception,
Connectable failed)
|
protected void |
handleWorkException(javax.resource.spi.work.WorkEvent event,
String type)
|
protected void |
initFromServiceDescriptor()
Initialises this connector from its TransportServiceDescriptor This
will be called before the doInitialise() method is called. |
void |
initialise()
Method used to perform any initialisation work. |
void |
initialiseFromUrl(EndpointURI endpointUri)
When this connector is created via the TransportFactory the endpoint used to
determine the connector type is passed to this method so that any properties
set on the endpoint that can be used to initialise the connector are made
available. |
protected void |
initWorkManagers()
|
boolean |
isConnected()
Determines if this object is connected or not |
boolean |
isCreateMultipleTransactedReceivers()
For better throughput when using TransactedMessageReceivers this will enable a number of concurrent receivers, based on the value returned by getNumberOfConcurrentTransactedReceivers(). |
boolean |
isDisposed()
|
protected boolean |
isEnableMessageEvents()
|
boolean |
isInitialStateStopped()
The will cause the connector not to start when start() is called. |
boolean |
isResponseEnabled()
|
boolean |
isStarted()
|
boolean |
isSyncEnabled(String protocol)
Used to define is this connectors endpoints' should be synchronous by default rather than using Mule's instance wide default. |
boolean |
isValidateConnections()
Whether to test a connection on each take from pool. |
MessageReceiver |
lookupReceiver(String key)
|
MessageReceiver |
registerListener(Service service,
InboundEndpoint endpoint)
This creates a MessageReceiver associated with this endpoint
and registers it with the connector |
void |
registerSupportedMetaProtocol(String protocol)
Used by Meta endpoint descriptors to register support for endpoint of the meta endpoint type. |
void |
registerSupportedProtocol(String protocol)
Registers other protocols 'understood' by this connector. |
protected void |
registerSupportedProtocolWithoutPrefix(String protocol)
Registers other protocols 'understood' by this connector. |
MuleMessage |
request(InboundEndpoint endpoint,
long timeout)
Make a specific request to the underlying transport |
MuleMessage |
request(String uri,
long timeout)
Make a specific request to the underlying transport |
MuleMessage |
send(OutboundEndpoint endpoint,
MuleEvent event)
Sends an event from the endpoint to the external system |
void |
setConnected(boolean flag)
|
void |
setCreateMultipleTransactedReceivers(boolean createMultipleTransactedReceivers)
|
void |
setDispatcherFactory(MessageDispatcherFactory dispatcherFactory)
The dispatcher factory is used to create a message dispatcher of the current request |
void |
setDispatcherPoolMaxWait(int maxWait)
Allows a maxWait timeout to be configured on the dispatcher object pool See: GenericKeyedObjectPool.setMaxWait(long) |
void |
setDispatcherPoolWhenExhaustedAction(byte whenExhaustedAction)
Allows an ExhaustedAction to be configured on the dispatcher object pool See: GenericKeyedObjectPool.setWhenExhaustedAction(byte) |
void |
setDispatcherThreadingProfile(ThreadingProfile dispatcherThreadingProfile)
Setter for property 'dispatcherThreadingProfile'. |
void |
setDynamicNotification(boolean dynamic)
|
void |
setExceptionListener(ExceptionListener listener)
|
void |
setInitialStateStopped(boolean initialStateStopped)
The will cause the connector not to start when start() is called. |
void |
setMaxDispatchersActive(int maxActive)
Configures the maximum number of dispatchers that can be concurrently active per endpoint |
void |
setMaxRequestersActive(int maxActive)
Configures the maximum number of requesters that can be concurrently active per endpoint |
void |
setMuleContext(MuleContext context)
|
void |
setName(String newName)
Sets the name of the object |
void |
setNumberOfConcurrentTransactedReceivers(int count)
|
void |
setReceiverThreadingProfile(ThreadingProfile receiverThreadingProfile)
Setter for property 'receiverThreadingProfile'. |
void |
setRequesterFactory(MessageRequesterFactory requesterFactory)
The requester factory is used to create a message requester of the current request |
void |
setRequesterPoolMaxWait(int maxWait)
Allows a maxWait timeout to be configured on the requester object pool See: GenericKeyedObjectPool.setMaxWait(long) |
void |
setRequesterPoolWhenExhaustedAction(byte whenExhaustedAction)
Allows an ExhaustedAction to be configured on the requester object pool See: GenericKeyedObjectPool.setWhenExhaustedAction(byte) |
void |
setRequesterThreadingProfile(ThreadingProfile requesterThreadingProfile)
Setter for property 'requesterThreadingProfile'. |
void |
setRetryPolicyTemplate(RetryPolicyTemplate retryPolicyTemplate)
|
void |
setServiceOverrides(Map serviceOverrides)
Set the Service overrides on this connector. |
void |
setSessionHandler(SessionHandler sessionHandler)
Setter for property 'sessionHandler'. |
void |
setSupportedProtocols(List supportedProtocols)
Sets A list of protocols that the connector can accept |
protected void |
setupDispatchReturn(OutboundEndpoint endpoint,
MessageDispatcher dispatcher,
MuleMessage result)
This method will return the dispatcher to the pool or, if the payload is an inputstream, replace the payload with a new DelegatingInputStream which returns the dispatcher to the pool when the stream is closed. |
protected void |
setupRequestReturn(InboundEndpoint endpoint,
MessageRequester requester,
MuleMessage result)
This method will return the requester to the pool or, if the payload is an inputstream, replace the payload with a new DelegatingInputStream which returns the requester to the pool when the stream is closed. |
void |
setValidateConnections(boolean validateConnections)
Whether to test a connection on each take. |
protected void |
shutdownScheduler()
|
void |
start()
|
protected void |
startAfterConnect()
|
void |
stop()
|
boolean |
supportsProtocol(String protocol)
|
String |
toString()
|
void |
unregisterListener(Service service,
InboundEndpoint endpoint)
|
void |
unregisterSupportedProtocol(String protocol)
|
protected void |
updateCachedNotificationHandler()
|
RetryContext |
validateConnection(RetryContext retryContext)
Override this method to test whether the connector is able to connect to its resource(s). |
void |
workAccepted(javax.resource.spi.work.WorkEvent event)
|
void |
workCompleted(javax.resource.spi.work.WorkEvent event)
|
void |
workRejected(javax.resource.spi.work.WorkEvent event)
|
void |
workStarted(javax.resource.spi.work.WorkEvent event)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.mule.api.transport.Connector |
|---|
getProtocol |
| Field Detail |
|---|
public static final int DEFAULT_NUM_CONCURRENT_TX_RECEIVERS
protected final Log logger
protected volatile String name
protected volatile ExceptionListener exceptionListener
protected volatile MessageDispatcherFactory dispatcherFactory
protected volatile MessageRequesterFactory requesterFactory
protected final GenericKeyedObjectPool dispatchers
protected final GenericKeyedObjectPool requesters
protected final Map<Object,MessageReceiver> receivers
protected volatile boolean createMultipleTransactedReceivers
isCreateMultipleTransactedReceivers()protected volatile int numberOfConcurrentTransactedReceivers
getNumberOfConcurrentTransactedReceivers()protected volatile TransportServiceDescriptor serviceDescriptor
protected volatile Properties serviceOverrides
protected volatile SessionHandler sessionHandler
protected MuleContext muleContext
protected final edu.emory.mathcs.backport.java.util.concurrent.atomic.AtomicBoolean initialised
protected final edu.emory.mathcs.backport.java.util.concurrent.atomic.AtomicBoolean connected
protected final edu.emory.mathcs.backport.java.util.concurrent.atomic.AtomicBoolean started
protected final edu.emory.mathcs.backport.java.util.concurrent.atomic.AtomicBoolean disposed
protected boolean startOnConnect
protected boolean initialStateStopped
start() is called. The only way to start the connector
is to call setInitialStateStopped(boolean) with 'false' and then calling start().
This flag is used internally since some connectors that rely on external servers may need to wait for that server
to become available before starting
| Constructor Detail |
|---|
public AbstractConnector()
| Method Detail |
|---|
public String getName()
NamedObject
getName in interface NamedObjectpublic void setName(String newName)
NamedObject
setName in interface NamedObjectnewName - the name of the object
public final void initialise()
throws InitialisationException
InitialisableInitialisationException should be thrown,
causing the Mule instance to shutdown. If the error is recoverable, say by
retrying to connect, a RecoverableException should be thrown.
There is no guarantee that by throwing a Recoverable exception that the Mule
instance will not shut down.
initialise in interface InitialisableInitialisationException - if a fatal error occurs causing the Mule instance to shutdown
RecoverableException - if an error occurs that can be recovered fromprotected void configureDispatcherPool()
public final void start()
throws MuleException
start in interface StartableMuleException
protected void startAfterConnect()
throws MuleException
MuleExceptionpublic final boolean isStarted()
isStarted in interface Connector
public final void stop()
throws MuleException
stop in interface StoppableMuleExceptionprotected void shutdownScheduler()
public final void dispose()
Disposable
dispose in interface Disposable
protected void initWorkManagers()
throws MuleException
MuleExceptionprotected void disposeWorkManagers()
protected void disposeReceivers()
protected void disposeDispatchers()
protected void disposeRequesters()
public boolean isDisposed()
isDisposed in interface Connectorpublic void handleException(Exception exception)
handleException in interface Connectorexception - the exception that was caught
public void handleException(Exception exception,
Connectable failed)
public void exceptionThrown(Exception e)
exceptionThrown in interface ExceptionListenerpublic ExceptionListener getExceptionListener()
getExceptionListener in interface ConnectorExceptionListenerpublic void setExceptionListener(ExceptionListener listener)
setExceptionListener in interface Connectorlistener - the ExceptionStrategy to use with this endpointExceptionListenerpublic MessageDispatcherFactory getDispatcherFactory()
Connector
getDispatcherFactory in interface Connectorpublic void setDispatcherFactory(MessageDispatcherFactory dispatcherFactory)
Connector
setDispatcherFactory in interface ConnectordispatcherFactory - The dispatcherFactory to set.public MessageRequesterFactory getRequesterFactory()
Connector
getRequesterFactory in interface Connectorpublic void setRequesterFactory(MessageRequesterFactory requesterFactory)
Connector
setRequesterFactory in interface ConnectorrequesterFactory - The requesterFactory to set.public boolean isInitialStateStopped()
start() is called. The only way to start the connector
is to call setInitialStateStopped(boolean) with 'false' and then calling start().
This flag is used internally since some connectors that rely on external servers may need to wait for that server
to become available before starting.
public void setInitialStateStopped(boolean initialStateStopped)
start() is called. The only way to start the connector
is to call setInitialStateStopped(boolean) with 'false' and then calling start().
This flag is used internally since some connectors that rely on external servers may need to wait for that server
to become available before starting.
The only time this method should be used is when a subclassing connector needs to delay the start lifecycle due to
a dependence on an external system. Most users can ignore this.
true - to stop the connector starting through normal lifecycle. It will be the responsibility
of the code that sets this property to start the connectorpublic int getMaxDispatchersActive()
public int getMaxTotalDispatchers()
public void setMaxDispatchersActive(int maxActive)
maxActive - max. number of active dispatcherspublic int getMaxRequestersActive()
public void setMaxRequestersActive(int maxActive)
maxActive - max. number of active requesters
protected void checkDisposed()
throws DisposeException
DisposeException
public MessageReceiver registerListener(Service service,
InboundEndpoint endpoint)
throws Exception
ConnectorMessageReceiver associated with this endpoint
and registers it with the connector
registerListener in interface Connectorservice - the listening serviceendpoint - the endpoint contains the listener endpointUri on which to
listen on.
Exception - if the MessageReceiver cannot be created or the Receiver
cannot be registered
protected Object getReceiverKey(Service service,
InboundEndpoint endpoint)
service - the service for which the endpoint is being registeredendpoint - the endpoint being registered for the service
public final void unregisterListener(Service service,
InboundEndpoint endpoint)
throws Exception
unregisterListener in interface Connectorservice - the listening serviceendpoint - the associated endpointDescriptor with the listener
Exception - if the listener cannot be unregistered. If a listener is not
associated with the given endpoint this will not throw an
exception
protected void doUnregisterListener(Service service,
InboundEndpoint endpoint,
MessageReceiver receiver)
public ThreadingProfile getDispatcherThreadingProfile()
public void setDispatcherThreadingProfile(ThreadingProfile dispatcherThreadingProfile)
dispatcherThreadingProfile - Value to set for property
'dispatcherThreadingProfile'.public ThreadingProfile getRequesterThreadingProfile()
public void setRequesterThreadingProfile(ThreadingProfile requesterThreadingProfile)
requesterThreadingProfile - Value to set for property
'requesterThreadingProfile'.public ThreadingProfile getReceiverThreadingProfile()
public void setReceiverThreadingProfile(ThreadingProfile receiverThreadingProfile)
receiverThreadingProfile - Value to set for property
'receiverThreadingProfile'.
public void destroyReceiver(MessageReceiver receiver,
ImmutableEndpoint endpoint)
throws Exception
Exception
protected abstract void doInitialise()
throws InitialisationException
InitialisationExceptionprotected abstract void doDispose()
protected abstract void doStart()
throws MuleException
MuleException - if the method fails
protected abstract void doStop()
throws MuleException
MuleException - if the method failspublic List<Transformer> getDefaultInboundTransformers()
public List<Transformer> getDefaultResponseTransformers()
public List<Transformer> getDefaultOutboundTransformers()
public ReplyToHandler getReplyToHandler()
public void fireNotification(ServerNotification notification)
notification - the notification to fire.public boolean isResponseEnabled()
isResponseEnabled in interface Connectorpublic boolean isSyncEnabled(String protocol)
Connector
isSyncEnabled in interface ConnectorImmutableEndpoint.isSynchronous()
public MessageReceiver getReceiver(Service service,
InboundEndpoint endpoint)
public Map<Object,MessageReceiver> getReceivers()
public MessageReceiver lookupReceiver(String key)
public MessageReceiver[] getReceivers(String wildcardExpression)
public void connect()
throws Exception
Connectable
connect in interface ConnectableExceptionpublic RetryContext validateConnection(RetryContext retryContext)
validateConnection in interface ConnectableRetryContext.isOk(),
RetryContext.getLastFailure()
public void disconnect()
throws Exception
Connectable
disconnect in interface ConnectableExceptionpublic String getConnectionDescription()
Connectable
getConnectionDescription in interface Connectablepublic final boolean isConnected()
Connectable
isConnected in interface ConnectableisConnected in interface Connectorpublic final void setConnected(boolean flag)
protected abstract void doConnect()
throws Exception
Exception
protected abstract void doDisconnect()
throws Exception
Exceptionprotected String getConnectEventId()
public boolean isCreateMultipleTransactedReceivers()
getNumberOfConcurrentTransactedReceivers(). This property is used by
transports that support transactions, specifically receivers that extend the
TransactedPollingMessageReceiver.
public void setCreateMultipleTransactedReceivers(boolean createMultipleTransactedReceivers)
createMultipleTransactedReceivers - if true, multiple receivers will be
created for this connectionisCreateMultipleTransactedReceivers()public int getNumberOfConcurrentTransactedReceivers()
isCreateMultipleTransactedReceivers() returns true.
DEFAULT_NUM_CONCURRENT_TX_RECEIVERSpublic void setNumberOfConcurrentTransactedReceivers(int count)
count - the number of concurrent transacted receivers to startgetNumberOfConcurrentTransactedReceivers()public void setDynamicNotification(boolean dynamic)
protected void updateCachedNotificationHandler()
protected boolean isEnableMessageEvents()
public void registerSupportedProtocol(String protocol)
protocol - the supported protocol to registerpublic void registerSupportedMetaProtocol(String protocol)
protocol - the meta protocol that can be used with this connectorprotected void registerSupportedProtocolWithoutPrefix(String protocol)
registerSupportedProtocol(String) method,
this allows you to register protocols that are not prefixed with the connector
protocol. This is useful where you use a Service Finder to discover which
Transport implementation to use. For example the 'wsdl' transport is a generic
'finder' transport that will use Axis or CXF to create the WSDL
client. These transport protocols would be wsdl-axis and wsdl-cxf,
but they can all support 'wsdl' protocol too.
protocol - the supported protocol to registerpublic void unregisterSupportedProtocol(String protocol)
public boolean supportsProtocol(String protocol)
supportsProtocol in interface Connectorpublic List getSupportedProtocols()
public void setSupportedProtocols(List supportedProtocols)
supportedProtocols -
protected WorkManager getReceiverWorkManager(String receiverName)
throws MuleException
MuleException
protected WorkManager getDispatcherWorkManager()
throws MuleException
MuleException - in case of error
protected WorkManager getRequesterWorkManager()
throws MuleException
MuleException - in case of errorpublic edu.emory.mathcs.backport.java.util.concurrent.ScheduledExecutorService getScheduler()
protected edu.emory.mathcs.backport.java.util.concurrent.ScheduledExecutorService createScheduler()
public SessionHandler getSessionHandler()
public void setSessionHandler(SessionHandler sessionHandler)
sessionHandler - Value to set for property 'sessionHandler'.public void workAccepted(javax.resource.spi.work.WorkEvent event)
workAccepted in interface javax.resource.spi.work.WorkListenerpublic void workRejected(javax.resource.spi.work.WorkEvent event)
workRejected in interface javax.resource.spi.work.WorkListenerpublic void workStarted(javax.resource.spi.work.WorkEvent event)
workStarted in interface javax.resource.spi.work.WorkListenerpublic void workCompleted(javax.resource.spi.work.WorkEvent event)
workCompleted in interface javax.resource.spi.work.WorkListener
protected void handleWorkException(javax.resource.spi.work.WorkEvent event,
String type)
public void dispatch(OutboundEndpoint endpoint,
MuleEvent event)
throws DispatchException
Connector
dispatch in interface Connectorevent - The event to dispatch
DispatchException - if the event fails to be dispatched
protected void setupDispatchReturn(OutboundEndpoint endpoint,
MessageDispatcher dispatcher,
MuleMessage result)
endpoint - dispatcher - result -
public MuleMessage request(String uri,
long timeout)
throws Exception
Connector
request in interface Connectoruri - the endpoint uri to use when connecting to the resourcetimeout - the maximum time the operation should block before returning.
The call should return immediately if there is data available. If
no data becomes available before the timeout elapses, null will be
returned
Exception - if the call to the underlying protocal cuases an exception
public MuleMessage request(InboundEndpoint endpoint,
long timeout)
throws Exception
Connector
request in interface Connectorendpoint - the endpoint to use when connecting to the resourcetimeout - the maximum time the operation should block before returning.
The call should return immediately if there is data available. If
no data becomes available before the timeout elapses, null will be
returned
Exception - if the call to the underlying protocal cuases an exception
protected void setupRequestReturn(InboundEndpoint endpoint,
MessageRequester requester,
MuleMessage result)
endpoint - requester - result -
public MuleMessage send(OutboundEndpoint endpoint,
MuleEvent event)
throws DispatchException
Connector
send in interface Connectorevent - The event to send
DispatchException - if the event fails to be dispatched
public void initialiseFromUrl(EndpointURI endpointUri)
throws InitialisationException
TransportFactory the endpoint used to
determine the connector type is passed to this method so that any properties
set on the endpoint that can be used to initialise the connector are made
available.
endpointUri - the EndpointURI use to create this connector
InitialisationException - If there are any problems with the
configuration set on the Endpoint or if another exception is
thrown it is wrapped in an InitialisationException.
protected void initFromServiceDescriptor()
throws InitialisationException
TransportServiceDescriptor This
will be called before the doInitialise() method is called.
InitialisationException - InitialisationException If there are any
problems with the configuration or if another exception is thrown
it is wrapped in an InitialisationException.protected TransportServiceDescriptor getServiceDescriptor()
TransportServiceDescriptor for this connector. This will be
null if the connector was created by the developer. To create a connector the
proper way the developer should use the TransportFactory and pass in
an endpoint.
TransportServiceDescriptor for this connector
protected MessageReceiver createReceiver(Service service,
InboundEndpoint endpoint)
throws Exception
service - the service that will receive events from this receiver,
the listenerendpoint - the endpoint that defies this inbound communication
TransportServiceDescriptor
initialised using the service and endpoint.
Exception - if there is a problem creating the receiver. This exception
really depends on the underlying transport, thus any exception
could be thrown
public MessageAdapter getMessageAdapter(Object message)
throws MuleException
MessageAdapter for the endpoint for the given message
(data)
getMessageAdapter in interface Connectormessage - the data with which to initialise the
MessageAdapter
MessageAdapter for the endpoint
MessagingException - if the message parameter is not
supported
MessageTypeNotSupportedException - if the message parameter is not supported
MuleException - if there is a problem creating the AdapterMessageAdapter
public MessageAdapter getMessageAdapter(Object message,
MessageAdapter originalMessageAdapter)
throws MessagingException
MessagingExceptionpublic Map getServiceOverrides()
public void setServiceOverrides(Map serviceOverrides)
serviceOverrides - the override values to use
public OutputStream getOutputStream(OutboundEndpoint endpoint,
MuleMessage message)
throws MuleException
UnsupportedOperationException
is thrown. Note that the stream MUST release resources on close. For help doing so, see
CallbackOutputStream.
getOutputStream in interface Connectorendpoint - the endpoint that releates to this Dispatchermessage - the current message being processed
MuleException - in case of any errorpublic MuleContext getMuleContext()
getMuleContext in interface Connectorpublic void setMuleContext(MuleContext context)
setMuleContext in interface MuleContextAwarepublic String toString()
toString in class Objectpublic RetryPolicyTemplate getRetryPolicyTemplate()
getRetryPolicyTemplate in interface Connectorpublic void setRetryPolicyTemplate(RetryPolicyTemplate retryPolicyTemplate)
public boolean isValidateConnections()
public void setValidateConnections(boolean validateConnections)
true
public void setDispatcherPoolWhenExhaustedAction(byte whenExhaustedAction)
GenericKeyedObjectPool.setWhenExhaustedAction(byte)
public void setDispatcherPoolMaxWait(int maxWait)
GenericKeyedObjectPool.setMaxWait(long)
public void setRequesterPoolWhenExhaustedAction(byte whenExhaustedAction)
GenericKeyedObjectPool.setWhenExhaustedAction(byte)
public void setRequesterPoolMaxWait(int maxWait)
GenericKeyedObjectPool.setMaxWait(long)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||