Class MessageTypeRule
- java.lang.Object
-
- org.apache.axis2.transport.jms.ctype.MessageTypeRule
-
- All Implemented Interfaces:
ContentTypeRule
public class MessageTypeRule extends Object implements ContentTypeRule
Content type rule that matches a given message type and returns a fixed content type.
-
-
Constructor Summary
Constructors Constructor Description MessageTypeRule(Class<? extends javax.jms.Message> messageType, String contentType)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ContentTypeInfogetContentType(javax.jms.Message message)Attempt to determine the content type of the given JMS message.StringgetExpectedContentTypeProperty()Get the name of the message property used to extract the content type from, if applicable.
-
-
-
Method Detail
-
getContentType
public ContentTypeInfo getContentType(javax.jms.Message message)
Description copied from interface:ContentTypeRuleAttempt to determine the content type of the given JMS message.- Specified by:
getContentTypein interfaceContentTypeRule- 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.
-
getExpectedContentTypeProperty
public String getExpectedContentTypeProperty()
Description copied from interface:ContentTypeRuleGet the name of the message property used to extract the content type from, if applicable.- Specified by:
getExpectedContentTypePropertyin interfaceContentTypeRule- Returns:
- the property name or null if not applicable
-
-