|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.axis2.transport.base.AbstractTransportListener org.apache.axis2.transport.base.AbstractTransportListenerEx<JMSEndpoint> org.apache.axis2.transport.jms.JMSListener
public class JMSListener
The revamped JMS Transport listener implementation. Creates 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
Field Summary | |
---|---|
static java.lang.String |
TRANSPORT_NAME
|
Fields inherited from class org.apache.axis2.transport.base.AbstractTransportListener |
---|
cfgCtx, config, isNonBlocking, log, metrics, state, useAxis2ThreadPool, workerPool |
Fields inherited from interface org.apache.axis2.transport.TransportListener |
---|
HOST_ADDRESS, PARAM_PORT |
Constructor Summary | |
---|---|
JMSListener()
|
Method Summary | |
---|---|
void |
addErrorListener(TransportErrorListener listener)
|
protected JMSEndpoint |
createEndpoint()
|
JMSConnectionFactory |
getConnectionFactory(org.apache.axis2.description.AxisService service)
Return the connection factory name for this service. |
void |
init(org.apache.axis2.context.ConfigurationContext cfgCtx,
org.apache.axis2.description.TransportInDescription trpInDesc)
TransportListener initialization |
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 |
Methods inherited from class org.apache.axis2.transport.base.AbstractTransportListenerEx |
---|
destroy, getEndpoints, getEPRsForService, startListeningForService, stopListeningForService |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.axis2.transport.base.ManagementSupport |
---|
getActiveThreadCount, getAvgSizeReceived, getAvgSizeSent, getBytesReceived, getBytesSent, getFaultsReceiving, getFaultsSending, getLastResetTime, getMaxSizeReceived, getMaxSizeSent, getMessagesReceived, getMessagesSent, getMetricsWindow, getMinSizeReceived, getMinSizeSent, getQueueSize, getResponseCodeTable, getTimeoutsReceiving, getTimeoutsSending, resetStatistics |
Field Detail |
---|
public static final java.lang.String TRANSPORT_NAME
Constructor Detail |
---|
public JMSListener()
Method Detail |
---|
public void init(org.apache.axis2.context.ConfigurationContext cfgCtx, org.apache.axis2.description.TransportInDescription trpInDesc) throws org.apache.axis2.AxisFault
init
in interface org.apache.axis2.transport.TransportListener
init
in class AbstractTransportListenerEx<JMSEndpoint>
cfgCtx
- the Axis configuration contexttrpInDesc
- the TransportIn description
org.apache.axis2.AxisFault
- on errorprotected JMSEndpoint createEndpoint()
createEndpoint
in class AbstractTransportListenerEx<JMSEndpoint>
protected void startEndpoint(JMSEndpoint endpoint) throws org.apache.axis2.AxisFault
startEndpoint
in class AbstractTransportListenerEx<JMSEndpoint>
service
- the Axis service for which to listen for messages
org.apache.axis2.AxisFault
protected void stopEndpoint(JMSEndpoint endpoint)
stopEndpoint
in class AbstractTransportListenerEx<JMSEndpoint>
service
- the service that was undeployed or stoppedpublic JMSConnectionFactory getConnectionFactory(org.apache.axis2.description.AxisService service)
service
- the AxisService
public void pause() throws org.apache.axis2.AxisFault
pause
in interface ManagementSupport
pause
in class AbstractTransportListener
org.apache.axis2.AxisFault
- on errorpublic void resume() throws org.apache.axis2.AxisFault
resume
in interface ManagementSupport
resume
in class AbstractTransportListener
org.apache.axis2.AxisFault
- on errorpublic void maintenenceShutdown(long millis) throws org.apache.axis2.AxisFault
maintenenceShutdown
in interface ManagementSupport
maintenenceShutdown
in class AbstractTransportListener
millis
- a number of milliseconds to wait until pending requests are allowed to complete
org.apache.axis2.AxisFault
- on errorpublic void addErrorListener(TransportErrorListener listener)
addErrorListener
in interface TransportErrorSource
public void removeErrorListener(TransportErrorListener listener)
removeErrorListener
in interface TransportErrorSource
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |