Package org.apache.cxf.transport.jms
Class JMSDestination
java.lang.Object
org.apache.cxf.transport.AbstractObservable
org.apache.cxf.transport.AbstractDestination
org.apache.cxf.transport.AbstractMultiplexDestination
org.apache.cxf.transport.jms.JMSDestination
- All Implemented Interfaces:
jakarta.jms.MessageListener,Destination,DestinationWithEndpoint,MultiplexDestination,Observable
public class JMSDestination
extends AbstractMultiplexDestination
implements jakarta.jms.MessageListener
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.cxf.transport.AbstractDestination
AbstractDestination.AbstractBackChannelConduit -
Field Summary
Fields inherited from class org.apache.cxf.transport.AbstractDestination
endpointInfo, referenceFields inherited from class org.apache.cxf.transport.AbstractObservable
incomingObserver -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidactivate()Initialize jmsTemplate and jmsListener from jms configuration data in jmsConfig Activate messages flow.voidDeactivate messages flow.protected ConduitgetInbuiltBackChannel(Message inMessage) protected LoggervoidonMessage(jakarta.jms.Message message) Convert JMS message received by ListenerThread to CXF message and inform incomingObserver that a message was received.protected voidvoidsetJmsConfig(JMSConfiguration jmsConfig) voidshutdown()Shutdown the Destination, i.e.Methods inherited from class org.apache.cxf.transport.AbstractMultiplexDestination
getAddressWithId, getIdMethods inherited from class org.apache.cxf.transport.AbstractDestination
getAddress, getBackChannel, getEndpointInfoMethods inherited from class org.apache.cxf.transport.AbstractObservable
getMessageObserver, getTargetReference, getTargetReference, setMessageObserverMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.cxf.transport.Destination
getAddress, getBackChannel, getMessageObserverMethods inherited from interface org.apache.cxf.transport.Observable
setMessageObserver
-
Constructor Details
-
JMSDestination
-
-
Method Details
-
getInbuiltBackChannel
- Specified by:
getInbuiltBackChannelin classAbstractDestination- Parameters:
inMessage- the incoming message- Returns:
- the inbuilt backchannel
-
activate
public void activate()Initialize jmsTemplate and jmsListener from jms configuration data in jmsConfig Activate messages flow.- Overrides:
activatein classAbstractObservable
-
restartConnection
protected void restartConnection() -
deactivate
public void deactivate()Description copied from class:AbstractObservableDeactivate messages flow.- Overrides:
deactivatein classAbstractObservable
-
shutdown
public void shutdown()Description copied from class:AbstractDestinationShutdown the Destination, i.e. stop accepting incoming messages.- Specified by:
shutdownin interfaceDestination- Overrides:
shutdownin classAbstractDestination
-
onMessage
public void onMessage(jakarta.jms.Message message) Convert JMS message received by ListenerThread to CXF message and inform incomingObserver that a message was received. The observer will call the service and then send the response CXF message by using the BackChannelConduit- Specified by:
onMessagein interfacejakarta.jms.MessageListener
-
getLogger
- Specified by:
getLoggerin classAbstractObservable- Returns:
- the logger to use
-
getJmsConfig
-
setJmsConfig
-