org.apache.axis2.transport.jms.ctype
Class PropertyRule

java.lang.Object
  extended by org.apache.axis2.transport.jms.ctype.PropertyRule
All Implemented Interfaces:
ContentTypeRule

public class PropertyRule
extends java.lang.Object
implements ContentTypeRule

Content type rule that attempts to extract the content type from a message property.


Constructor Summary
PropertyRule(java.lang.String propertyName)
           
 
Method Summary
 ContentTypeInfo getContentType(javax.jms.Message message)
          Attempt to determine the content type of the given JMS message.
 java.lang.String getExpectedContentTypeProperty()
          Get the name of the message property used to extract the content type from, if applicable.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PropertyRule

public PropertyRule(java.lang.String propertyName)
Method Detail

getContentType

public ContentTypeInfo getContentType(javax.jms.Message message)
                               throws javax.jms.JMSException
Description copied from interface: ContentTypeRule
Attempt to determine the content type of the given JMS message.

Specified by:
getContentType in interface ContentTypeRule
Parameters:
message - the message
Returns:
If the rule matches, the return value encapsulates the content type of the message and the message property name from which is was extracted (if applicable). If the rule doesn't match, the method returns null.
Throws:
javax.jms.JMSException

getExpectedContentTypeProperty

public java.lang.String getExpectedContentTypeProperty()
Description copied from interface: ContentTypeRule
Get the name of the message property used to extract the content type from, if applicable.

Specified by:
getExpectedContentTypeProperty in interface ContentTypeRule
Returns:
the property name or null if not applicable


Copyright © 2004-2009 The Apache Software Foundation. All Rights Reserved.