org.logicblaze.lingo.jms.marshall
Class CompositeHeaderMarshaller

java.lang.Object
  extended by org.logicblaze.lingo.jms.marshall.CompositeHeaderMarshaller
All Implemented Interfaces:
HeaderMarshaller

public class CompositeHeaderMarshaller
extends java.lang.Object
implements HeaderMarshaller

Composite Header Marshaller which allows you to plugin multiple HeaderMarshaller strategies. Example :

 CompositeHeaderMarshaller headerMarshaller = new CompositeHeaderMarshaller();
 headerMarshaller.add(new AcegiHeaderMarshaller());
 headerMarshaller.add(new LocaleHeaderMarshaller());
 DefaultMarshaller marshaller = new DefualtMarshaller();
 marshaller.setHeaderMarshaller(headerMarshaller);
 

Since:
1.5
Author:
Sanjiv Jivan

Constructor Summary
CompositeHeaderMarshaller()
           
 
Method Summary
 void addHeaderMarshaller(HeaderMarshaller headerMarshaller)
           
 void addResponseMessageHeaders(javax.jms.ObjectMessage answer, org.springframework.remoting.support.RemoteInvocationResult result, javax.jms.Message requestMessage)
          A strategy for derived classes to allow them to plug in custom header processing for responses
 void appendMessageHeaders(javax.jms.Message message, Requestor requestor, LingoInvocation invocation)
          A strategy method for derived classes to allow them a plugin point to perform custom header processing.
 void appendMessageHeaders(javax.jms.Message message, javax.jms.Session session, java.lang.Object value)
           
 java.util.List getHeaderMarshallers()
           
 void handleInvocationHeaders(javax.jms.Message message)
          A strategy method to allow derived classes to process the headers in a special way.
 void handleInvocationResultHeaders(javax.jms.Message message)
          A strategy method to allow derived classes to process the headers in a special way
 void handleMessageHeaders(javax.jms.Message message)
          A strategy method to allow derived classes to process the headers in a special way
 void removeHeaderMarshaller(HeaderMarshaller headerMarshaller)
           
 void setHeaderMarshallers(java.util.List headerMarshallers)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CompositeHeaderMarshaller

public CompositeHeaderMarshaller()
Method Detail

getHeaderMarshallers

public java.util.List getHeaderMarshallers()

setHeaderMarshallers

public void setHeaderMarshallers(java.util.List headerMarshallers)

addHeaderMarshaller

public void addHeaderMarshaller(HeaderMarshaller headerMarshaller)

removeHeaderMarshaller

public void removeHeaderMarshaller(HeaderMarshaller headerMarshaller)

appendMessageHeaders

public void appendMessageHeaders(javax.jms.Message message,
                                 Requestor requestor,
                                 LingoInvocation invocation)
                          throws javax.jms.JMSException
Description copied from interface: HeaderMarshaller
A strategy method for derived classes to allow them a plugin point to perform custom header processing. This method is called when a message is being sent

Specified by:
appendMessageHeaders in interface HeaderMarshaller
Throws:
javax.jms.JMSException

appendMessageHeaders

public void appendMessageHeaders(javax.jms.Message message,
                                 javax.jms.Session session,
                                 java.lang.Object value)
Specified by:
appendMessageHeaders in interface HeaderMarshaller

addResponseMessageHeaders

public void addResponseMessageHeaders(javax.jms.ObjectMessage answer,
                                      org.springframework.remoting.support.RemoteInvocationResult result,
                                      javax.jms.Message requestMessage)
                               throws javax.jms.JMSException
Description copied from interface: HeaderMarshaller
A strategy for derived classes to allow them to plug in custom header processing for responses

Specified by:
addResponseMessageHeaders in interface HeaderMarshaller
Throws:
javax.jms.JMSException

handleInvocationHeaders

public void handleInvocationHeaders(javax.jms.Message message)
Description copied from interface: HeaderMarshaller
A strategy method to allow derived classes to process the headers in a special way. This method is called when a message is received

Specified by:
handleInvocationHeaders in interface HeaderMarshaller

handleInvocationResultHeaders

public void handleInvocationResultHeaders(javax.jms.Message message)
Description copied from interface: HeaderMarshaller
A strategy method to allow derived classes to process the headers in a special way

Specified by:
handleInvocationResultHeaders in interface HeaderMarshaller

handleMessageHeaders

public void handleMessageHeaders(javax.jms.Message message)
Description copied from interface: HeaderMarshaller
A strategy method to allow derived classes to process the headers in a special way

Specified by:
handleMessageHeaders in interface HeaderMarshaller


Copyright © 2011 LogicBlaze, Inc.. All Rights Reserved.