org.apache.servicemix.jms.endpoints
Class AbstractJmsMarshaler

java.lang.Object
  extended by org.apache.servicemix.jms.endpoints.AbstractJmsMarshaler
Direct Known Subclasses:
DefaultConsumerMarshaler, DefaultProviderMarshaler

public abstract class AbstractJmsMarshaler
extends java.lang.Object

A usefull base class for marshalers.

Author:
Ɓukasz Dywicki email $Id$, lhein

Field Summary
static java.lang.String CONTENT_TYPE_PROPERTY
           
static java.lang.String DONE_JMS_PROPERTY
           
static java.lang.String ERROR_JMS_PROPERTY
           
static java.lang.String FAULT_JMS_PROPERTY
           
 
Constructor Summary
AbstractJmsMarshaler()
           
 
Method Summary
protected  void copyPropertiesFromJMS(javax.jms.Message message, javax.jbi.messaging.NormalizedMessage inMessage)
          Copy properties from JMS message to JBI message.
protected  void copyPropertiesFromNM(javax.jbi.messaging.NormalizedMessage outMessage, javax.jms.Message message)
          Copy properties from JBI message to JMS message.
 java.util.List<java.lang.String> getPropertyBlackList()
           
 boolean isBlackListed(java.lang.String name)
          checks if a property is on black list
 boolean isCopyProperties()
          Get value from field copyProperties.
 boolean isNeedJavaIdentifiers()
           
 void setCopyProperties(boolean copyProperties)
          Set value from copyProperties field.
 void setNeedJavaIdentifiers(boolean needJavaIdentifiers)
           
 void setPropertyBlackList(java.util.List<java.lang.String> propertyBlackList)
           
protected  boolean shouldIncludeHeader(java.lang.String name, java.lang.Object value)
          checks whether the header property should be included or not
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DONE_JMS_PROPERTY

public static final java.lang.String DONE_JMS_PROPERTY
See Also:
Constant Field Values

FAULT_JMS_PROPERTY

public static final java.lang.String FAULT_JMS_PROPERTY
See Also:
Constant Field Values

ERROR_JMS_PROPERTY

public static final java.lang.String ERROR_JMS_PROPERTY
See Also:
Constant Field Values

CONTENT_TYPE_PROPERTY

public static final java.lang.String CONTENT_TYPE_PROPERTY
See Also:
Constant Field Values
Constructor Detail

AbstractJmsMarshaler

public AbstractJmsMarshaler()
Method Detail

isCopyProperties

public boolean isCopyProperties()
Get value from field copyProperties.

Returns:
The copyProperties field value.

setCopyProperties

public void setCopyProperties(boolean copyProperties)
Set value from copyProperties field.

Parameters:
copyProperties - New value for copyProperties field.

copyPropertiesFromJMS

protected void copyPropertiesFromJMS(javax.jms.Message message,
                                     javax.jbi.messaging.NormalizedMessage inMessage)
                              throws javax.jms.JMSException
Copy properties from JMS message to JBI message.

Parameters:
message - Received JMS message.
inMessage - Created JBI message.
Throws:
javax.jms.JMSException - If there is any problems with accessing to message properties.

copyPropertiesFromNM

protected void copyPropertiesFromNM(javax.jbi.messaging.NormalizedMessage outMessage,
                                    javax.jms.Message message)
                             throws javax.jms.JMSException
Copy properties from JBI message to JMS message.

Parameters:
outMessage - Received JBI message.
message - Created JMS message.
Throws:
javax.jms.JMSException - If there is any problems with saving JMS message properties.

shouldIncludeHeader

protected boolean shouldIncludeHeader(java.lang.String name,
                                      java.lang.Object value)
checks whether the header property should be included or not

Parameters:
name - the property name
value - the property value
Returns:
true if it should be copied

isBlackListed

public boolean isBlackListed(java.lang.String name)
checks if a property is on black list

Parameters:
name - the property
Returns:
true if on black list

getPropertyBlackList

public java.util.List<java.lang.String> getPropertyBlackList()
Returns:
Returns the propertyBlackList.

setPropertyBlackList

public void setPropertyBlackList(java.util.List<java.lang.String> propertyBlackList)
Parameters:
propertyBlackList - The propertyBlackList to set.

isNeedJavaIdentifiers

public boolean isNeedJavaIdentifiers()
Returns:
Returns the needJavaIdentifiers.

setNeedJavaIdentifiers

public void setNeedJavaIdentifiers(boolean needJavaIdentifiers)
Parameters:
needJavaIdentifiers - The needJavaIdentifiers to set.


Copyright © 2005-2014 FuseSource. All Rights Reserved.