org.apache.servicemix.components.jabber
Class JabberMarshaler

java.lang.Object
  extended by org.apache.servicemix.components.jabber.JabberMarshaler

public class JabberMarshaler
extends Object

Marshals Jabber messages into and out of NMS messages

Version:
$Revision: 2153 $

Constructor Summary
JabberMarshaler()
           
JabberMarshaler(org.apache.servicemix.jbi.jaxp.SourceMarshaler sourceMarshaler)
           
 
Method Summary
protected  void addJabberProperties(org.jivesoftware.smack.packet.Message message, javax.jbi.messaging.NormalizedMessage normalizedMessage)
          Appends properties on the NMS to the JMS Message
protected  void addNmsProperties(javax.jbi.messaging.NormalizedMessage normalizedMessage, org.jivesoftware.smack.packet.Packet message)
           
 void fromNMS(org.jivesoftware.smack.packet.Message message, javax.jbi.messaging.NormalizedMessage normalizedMessage)
          Marshals from the Jabber message to the normalized message
 org.apache.servicemix.jbi.jaxp.SourceMarshaler getSourceMarshaler()
           
 org.apache.servicemix.jbi.jaxp.SourceMarshaler getSourceMarshaller()
          Deprecated. use getSourceMarshaler instead
protected  String messageAsString(javax.jbi.messaging.NormalizedMessage normalizedMessage)
          Converts the inbound message to a String that can be sent
 void setSourceMarshaler(org.apache.servicemix.jbi.jaxp.SourceMarshaler sourceMarshaler)
           
 void setSourceMarshaller(org.apache.servicemix.jbi.jaxp.SourceMarshaler sourceMarshaler)
          Deprecated. use setSourceMashaler instead
protected  boolean shouldIncludeHeader(javax.jbi.messaging.NormalizedMessage normalizedMessage, String name, Object value)
          Decides whether or not the given header should be included in the JMS message.
 void toNMS(javax.jbi.messaging.NormalizedMessage normalizedMessage, org.jivesoftware.smack.packet.Packet packet)
          Marshals the Jabber message into an NMS message
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JabberMarshaler

public JabberMarshaler()

JabberMarshaler

public JabberMarshaler(org.apache.servicemix.jbi.jaxp.SourceMarshaler sourceMarshaler)
Method Detail

toNMS

public void toNMS(javax.jbi.messaging.NormalizedMessage normalizedMessage,
                  org.jivesoftware.smack.packet.Packet packet)
           throws javax.jbi.messaging.MessagingException
Marshals the Jabber message into an NMS message

Throws:
javax.jbi.messaging.MessagingException

fromNMS

public void fromNMS(org.jivesoftware.smack.packet.Message message,
                    javax.jbi.messaging.NormalizedMessage normalizedMessage)
             throws TransformerException
Marshals from the Jabber message to the normalized message

Parameters:
message -
normalizedMessage -
Throws:
TransformerException

getSourceMarshaller

public org.apache.servicemix.jbi.jaxp.SourceMarshaler getSourceMarshaller()
Deprecated. use getSourceMarshaler instead


setSourceMarshaller

public void setSourceMarshaller(org.apache.servicemix.jbi.jaxp.SourceMarshaler sourceMarshaler)
Deprecated. use setSourceMashaler instead


getSourceMarshaler

public org.apache.servicemix.jbi.jaxp.SourceMarshaler getSourceMarshaler()
Returns:
the sourceMarshaler

setSourceMarshaler

public void setSourceMarshaler(org.apache.servicemix.jbi.jaxp.SourceMarshaler sourceMarshaler)
Parameters:
sourceMarshaler - the sourceMarshaler to set

messageAsString

protected String messageAsString(javax.jbi.messaging.NormalizedMessage normalizedMessage)
                          throws TransformerException
Converts the inbound message to a String that can be sent

Throws:
TransformerException

addJabberProperties

protected void addJabberProperties(org.jivesoftware.smack.packet.Message message,
                                   javax.jbi.messaging.NormalizedMessage normalizedMessage)
Appends properties on the NMS to the JMS Message


addNmsProperties

protected void addNmsProperties(javax.jbi.messaging.NormalizedMessage normalizedMessage,
                                org.jivesoftware.smack.packet.Packet message)

shouldIncludeHeader

protected boolean shouldIncludeHeader(javax.jbi.messaging.NormalizedMessage normalizedMessage,
                                      String name,
                                      Object value)
Decides whether or not the given header should be included in the JMS message. By default this includes all suitable typed values



Copyright © 2005-2010 The Apache Software Foundation. All Rights Reserved.