org.apache.cxf.transport.jms
Class JMSConduit
java.lang.Object
org.apache.cxf.transport.AbstractObservable
org.apache.cxf.transport.AbstractConduit
org.apache.cxf.transport.jms.JMSConduit
- All Implemented Interfaces:
- javax.jms.MessageListener, org.apache.cxf.transport.Conduit, org.apache.cxf.transport.Observable
public class JMSConduit
- extends org.apache.cxf.transport.AbstractConduit
- implements javax.jms.MessageListener
JMSConduit is instantiated by the JMSTransportfactory which is selected by a client if the transport
protocol starts with jms:// JMSConduit converts CXF Messages to JMS Messages and sends the request by using
a JMS destination. If the Exchange is not oneway it then recevies the response and converts it to a CXF
Message. This is then provided in the Exchange and also sent to the incomingObserver
| Fields inherited from class org.apache.cxf.transport.AbstractConduit |
target |
| Fields inherited from class org.apache.cxf.transport.AbstractObservable |
incomingObserver |
|
Constructor Summary |
JMSConduit(org.apache.cxf.service.model.EndpointInfo endpointInfo,
org.apache.cxf.ws.addressing.EndpointReferenceType target,
JMSConfiguration jmsConfig)
|
|
Method Summary |
void |
close()
|
protected void |
finalize()
|
JMSConfiguration |
getJmsConfig()
|
protected java.util.logging.Logger |
getLogger()
|
void |
onMessage(javax.jms.Message jmsMessage)
When a message is received on the reply destination the correlation map is searched for the
correlationId. |
void |
prepare(org.apache.cxf.message.Message message)
Prepare the message for send out. |
void |
sendExchange(org.apache.cxf.message.Exchange exchange,
java.lang.Object request)
Send the JMS Request out and if not oneWay receive the response |
void |
setJmsConfig(JMSConfiguration jmsConfig)
|
| Methods inherited from class org.apache.cxf.transport.AbstractConduit |
close, getBackChannel, getTarget, toString |
| Methods inherited from class org.apache.cxf.transport.AbstractObservable |
activate, deactivate, getMessageObserver, getTargetReference, getTargetReference, setMessageObserver |
| Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.apache.cxf.transport.Observable |
setMessageObserver |
JMSConduit
public JMSConduit(org.apache.cxf.service.model.EndpointInfo endpointInfo,
org.apache.cxf.ws.addressing.EndpointReferenceType target,
JMSConfiguration jmsConfig)
prepare
public void prepare(org.apache.cxf.message.Message message)
throws java.io.IOException
- Prepare the message for send out. The message will be sent after the caller has written the payload to
the OutputStream of the message and calls the close method of the stream. In the JMS case the
JMSOutputStream will then call back the sendExchange method of this class.
- Specified by:
prepare in interface org.apache.cxf.transport.Conduit
- Throws:
java.io.IOException
sendExchange
public void sendExchange(org.apache.cxf.message.Exchange exchange,
java.lang.Object request)
- Send the JMS Request out and if not oneWay receive the response
- Parameters:
outMessage - request -
onMessage
public void onMessage(javax.jms.Message jmsMessage)
- When a message is received on the reply destination the correlation map is searched for the
correlationId. If it is found the message is converted to a CXF message and the thread sending the
request is notified
- Specified by:
onMessage in interface javax.jms.MessageListener
close
public void close()
- Specified by:
close in interface org.apache.cxf.transport.Conduit- Overrides:
close in class org.apache.cxf.transport.AbstractConduit
getLogger
protected java.util.logging.Logger getLogger()
- Specified by:
getLogger in class org.apache.cxf.transport.AbstractObservable
getJmsConfig
public JMSConfiguration getJmsConfig()
setJmsConfig
public void setJmsConfig(JMSConfiguration jmsConfig)
finalize
protected void finalize()
throws java.lang.Throwable
- Overrides:
finalize in class java.lang.Object
- Throws:
java.lang.Throwable
Apache CXF