org.apache.axis2.transport.jms
Class JMSSender

java.lang.Object
  extended byorg.apache.axis2.handlers.AbstractHandler
      extended byorg.apache.axis2.transport.jms.JMSSender
All Implemented Interfaces:
Handler, Serializable, TransportSender

public class JMSSender
extends AbstractHandler
implements TransportSender

This is meant to be used on a SOAP Client to call a SOAP server.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.apache.axis2.handlers.AbstractHandler
handlerDesc
 
Constructor Summary
JMSSender()
           
 
Method Summary
 void cleanup(MessageContext msgContext)
          Clean up
static void closeAllConnectors()
          Closes all JMS connectors
static void closeMatchingJMSConnectors(String endpointAddr, String username, String password)
          Closes JMS connectors that match the specified endpoint address
protected  HashMap createApplicationProperties(MessageContext context)
          Return a map of properties that makeup the application-specific for the JMS Messages.
 String getContentType(MessageContext msgCtx)
           
 void init(ConfigurationContext confContext, TransportOutDescription transportOut)
          Initialize
 void invoke(MessageContext msgContext)
          invoke() creates an endpoint, sends the request SOAP message, and then either reads the response SOAP message or simply returns.
 void setupTransport(MessageContext context, String endpointAddr)
          Set up any transport-specific derived properties in the message context.
 void shutdown()
          Shuts down the connectors managed by this JMSTransport.
 void stop()
           
 void writeMessage(MessageContext msgContext, OutputStream out)
           
 
Methods inherited from class org.apache.axis2.handlers.AbstractHandler
cleanup, getHandlerDesc, getName, getParameter, init, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.apache.axis2.engine.Handler
cleanup, getHandlerDesc, getName, getParameter, init
 

Constructor Detail

JMSSender

public JMSSender()
Method Detail

cleanup

public void cleanup(MessageContext msgContext)
             throws AxisFault
Description copied from interface: TransportSender
Clean up

Specified by:
cleanup in interface TransportSender
Parameters:
msgContext -
Throws:
AxisFault

closeAllConnectors

public static void closeAllConnectors()
Closes all JMS connectors


closeMatchingJMSConnectors

public static void closeMatchingJMSConnectors(String endpointAddr,
                                              String username,
                                              String password)
Closes JMS connectors that match the specified endpoint address

Parameters:
endpointAddr - the JMS endpoint address
username -
password -

createApplicationProperties

protected HashMap createApplicationProperties(MessageContext context)
Return a map of properties that makeup the application-specific for the JMS Messages.


init

public void init(ConfigurationContext confContext,
                 TransportOutDescription transportOut)
          throws AxisFault
Description copied from interface: TransportSender
Initialize

Specified by:
init in interface TransportSender
Parameters:
confContext -
transportOut -
Throws:
AxisFault

stop

public void stop()
Specified by:
stop in interface TransportSender

invoke

public void invoke(MessageContext msgContext)
            throws AxisFault
invoke() creates an endpoint, sends the request SOAP message, and then either reads the response SOAP message or simply returns.

Specified by:
invoke in interface Handler
Parameters:
msgContext -
Throws:
AxisFault

setupTransport

public void setupTransport(MessageContext context,
                           String endpointAddr)
                    throws AxisFault
Set up any transport-specific derived properties in the message context.

Parameters:
context - the context to set up
Throws:
AxisFault - if service cannot be found

shutdown

public void shutdown()
Shuts down the connectors managed by this JMSTransport.


writeMessage

public void writeMessage(MessageContext msgContext,
                         OutputStream out)
                  throws AxisFault
Throws:
AxisFault

getContentType

public String getContentType(MessageContext msgCtx)