org.apache.synapse.transport.amqp
Class AMQPUtils

java.lang.Object
  extended by org.apache.synapse.transport.base.BaseUtils
      extended by org.apache.synapse.transport.amqp.AMQPUtils

public class AMQPUtils
extends BaseUtils


Constructor Summary
AMQPUtils()
           
 
Method Summary
static List<AMQPBinding> getBindingsForService(AxisService service)
          Get the AMQP destination used by this service
 InputStream getInputStream(Object message)
          Get an InputStream to the message payload
static BaseUtils getInstace()
           
 byte[] getMessageBinaryPayload(Object message)
          Get the message payload as a byte[], if the message is a non-SOAP, non-XML, binary message
 String getMessageTextPayload(Object message)
          Get the message payload as a String, if the message is a non-SOAP, non-XML, plain text message
 String getProperty(Object message, String property)
          Get a String property from a message
static Map getTransportHeaders(org.apache.qpidity.api.Message message)
          Extract transport level headers for JMS from the given message into a Map
 
Methods inherited from class org.apache.synapse.transport.base.BaseUtils
getEnvelope, getMessageFormatter, getMinPollTime, getOMOutputFormat, getQNameFromString, handleException, handleException, isUsingTransport, isValid, markServiceAsFaulty, setSOAPEnvelope
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AMQPUtils

public AMQPUtils()
Method Detail

getInstace

public static BaseUtils getInstace()

getInputStream

public InputStream getInputStream(Object message)
Description copied from class: BaseUtils
Get an InputStream to the message payload

Specified by:
getInputStream in class BaseUtils
Parameters:
message - Object
Returns:
an InputStream to the payload

getMessageBinaryPayload

public byte[] getMessageBinaryPayload(Object message)
Description copied from class: BaseUtils
Get the message payload as a byte[], if the message is a non-SOAP, non-XML, binary message

Specified by:
getMessageBinaryPayload in class BaseUtils
Parameters:
message - the message Object
Returns:
the payload of the message as a byte[]

getMessageTextPayload

public String getMessageTextPayload(Object message)
Description copied from class: BaseUtils
Get the message payload as a String, if the message is a non-SOAP, non-XML, plain text message

Specified by:
getMessageTextPayload in class BaseUtils
Parameters:
message - the message Object
Returns:
the plain text payload of the message if applicable

getProperty

public String getProperty(Object message,
                          String property)
Description copied from class: BaseUtils
Get a String property from a message

Specified by:
getProperty in class BaseUtils
Parameters:
message - the message object
property - property name
Returns:
property value

getTransportHeaders

public static Map getTransportHeaders(org.apache.qpidity.api.Message message)
Extract transport level headers for JMS from the given message into a Map

Parameters:
message - the JMS message
Returns:
a Map of the transport headers

getBindingsForService

public static List<AMQPBinding> getBindingsForService(AxisService service)
Get the AMQP destination used by this service

Parameters:
service - the Axis Service
Returns:
the name of the JMS destination


Copyright © 2005-2008 Apache Software Foundation. All Rights Reserved.