public class JMSListener extends AbstractTransportListenerEx<JMSEndpoint> implements ManagementSupport, TransportErrorSource
ServiceTaskManager instances
for each service requesting exposure over JMS, and stops these if they are undeployed / stopped.
A service indicates a JMS Connection factory definition by name, which would be defined in the JMSListner on the axis2.xml, and this provides a way to reuse common configuration between services, as well as to optimize resources utilized
If the connection factory name was not specified, it will default to the one named "default"
JMSConstants.DEFAULT_CONFAC_NAME
If a destination JNDI name is not specified, a service will expect to use a Queue with the same JNDI name as of the service. Additional Parameters allows one to bind to a Topic or specify many more detailed control options. See package documentation for more details
All Destinations / JMS Administered objects used MUST be pre-created or already available
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
TRANSPORT_NAME |
cfgCtx, config, isNonBlocking, log, metrics, state, useAxis2ThreadPool, workerPoolHOST_ADDRESS, PARAM_PORT| Constructor and Description |
|---|
JMSListener() |
| Modifier and Type | Method and Description |
|---|---|
void |
addErrorListener(TransportErrorListener listener) |
protected JMSEndpoint |
createEndpoint() |
protected void |
doInit() |
JMSConnectionFactory |
getConnectionFactory(AxisService service)
Return the connection factory name for this service.
|
void |
maintenenceShutdown(long millis)
Stop processing new messages, and wait the specified maximum time for in-flight
requests to complete before a controlled shutdown for maintenence
|
void |
pause()
Pause the listener - Stop accepting/processing new messages, but continues processing existing
messages until they complete.
|
void |
removeErrorListener(TransportErrorListener listener) |
void |
resume()
Resume the lister - Brings the lister into active mode back from a paused state
|
protected void |
startEndpoint(JMSEndpoint endpoint)
Listen for JMS messages on behalf of the given service
|
protected void |
stopEndpoint(JMSEndpoint endpoint)
Stops listening for messages for the service thats undeployed or stopped
|
getEndpoints, getEPRsForService, init, start, startListeningForService, stop, stopListeningForServicecreateMessageContext, destroy, disableTransportForService, getActiveThreadCount, getAvgSizeReceived, getAvgSizeSent, getBytesReceived, getBytesSent, getConfigurationContext, getEPRForService, getEPRsForService, getFaultsReceiving, getFaultsSending, getLastResetTime, getMaxSizeReceived, getMaxSizeSent, getMessagesReceived, getMessagesSent, getMetricsCollector, getMetricsWindow, getMinSizeReceived, getMinSizeSent, getQueueSize, getResponseCodeTable, getSessionContext, getTimeoutsReceiving, getTimeoutsSending, getTransportInDescription, getTransportName, handleException, handleIncomingMessage, logException, resetStatisticsclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetActiveThreadCount, getAvgSizeReceived, getAvgSizeSent, getBytesReceived, getBytesSent, getFaultsReceiving, getFaultsSending, getLastResetTime, getMaxSizeReceived, getMaxSizeSent, getMessagesReceived, getMessagesSent, getMetricsWindow, getMinSizeReceived, getMinSizeSent, getQueueSize, getResponseCodeTable, getTimeoutsReceiving, getTimeoutsSending, resetStatisticspublic static final java.lang.String TRANSPORT_NAME
protected void doInit()
throws AxisFault
doInit in class AbstractTransportListenerEx<JMSEndpoint>AxisFaultprotected JMSEndpoint createEndpoint()
createEndpoint in class AbstractTransportListenerEx<JMSEndpoint>protected void startEndpoint(JMSEndpoint endpoint) throws AxisFault
startEndpoint in class AbstractTransportListenerEx<JMSEndpoint>service - the Axis service for which to listen for messagesAxisFaultprotected void stopEndpoint(JMSEndpoint endpoint)
stopEndpoint in class AbstractTransportListenerEx<JMSEndpoint>service - the service that was undeployed or stoppedpublic JMSConnectionFactory getConnectionFactory(AxisService service)
service - the AxisServicepublic void pause()
throws AxisFault
pause in interface ManagementSupportpause in class AbstractTransportListenerAxisFault - on errorpublic void resume()
throws AxisFault
resume in interface ManagementSupportresume in class AbstractTransportListenerAxisFault - on errorpublic void maintenenceShutdown(long millis)
throws AxisFault
maintenenceShutdown in interface ManagementSupportmaintenenceShutdown in class AbstractTransportListenermillis - a number of milliseconds to wait until pending requests are allowed to completeAxisFault - on errorpublic void addErrorListener(TransportErrorListener listener)
addErrorListener in interface TransportErrorSourcepublic void removeErrorListener(TransportErrorListener listener)
removeErrorListener in interface TransportErrorSourceCopyright © 2004-2015 The Apache Software Foundation. All Rights Reserved.