org.logicblaze.lingo.jms.marshall
Class DefaultMarshaller

java.lang.Object
  extended byorg.logicblaze.lingo.jms.marshall.DefaultMarshaller
All Implemented Interfaces:
Marshaller
Direct Known Subclasses:
XStreamMarshaller

public class DefaultMarshaller
extends Object
implements Marshaller

Represents the strategy of marshalling of requests and responses in and out of JMS messages

Version:
$Revision: 1.2 $

Constructor Summary
DefaultMarshaller()
           
 
Method Summary
protected  void appendMessageHeaders(Message message, Requestor requestor, LingoInvocation invocation)
          A strategy method for derived classes to allow them a plugin point to perform custom header processing
 Message createRequestMessage(Requestor requestor, LingoInvocation invocation)
          Creates the request message
 org.springframework.remoting.support.RemoteInvocationResult extractInvocationResult(Message message)
          Extracts the invocation result from the response message
protected  void handleInvocationHeaders(Message message)
          A strategy method to allow derived classes to process the headers in a special way
protected  void handleInvocationResultHeaders(Message message)
          A strategy method to allow derived classes to process the headers in a special way
 boolean isIgnoreInvalidMessages()
           
protected  org.springframework.remoting.support.RemoteInvocationResult onInvalidClientMessage(Message message)
           
protected  org.springframework.remoting.support.RemoteInvocation onInvalidMessage(Message message)
          Handle invalid messages by just logging, though a different implementation may wish to throw exceptions
 org.springframework.remoting.support.RemoteInvocation readRemoteInvocation(Message message)
          Read a RemoteInvocation from the given JMS message
 void setIgnoreInvalidMessages(boolean ignoreInvalidMessages)
          Sets whether invalidly formatted messages should be silently ignored or not
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultMarshaller

public DefaultMarshaller()
Method Detail

createRequestMessage

public Message createRequestMessage(Requestor requestor,
                                    LingoInvocation invocation)
                             throws JMSException
Description copied from interface: Marshaller
Creates the request message

Specified by:
createRequestMessage in interface Marshaller
Parameters:
requestor -
invocation - the remote invocation to send
Throws:
JMSException - if the message could not be created

extractInvocationResult

public org.springframework.remoting.support.RemoteInvocationResult extractInvocationResult(Message message)
                                                                                    throws JMSException
Description copied from interface: Marshaller
Extracts the invocation result from the response message

Specified by:
extractInvocationResult in interface Marshaller
Parameters:
message - the response message
Returns:
the invocation result
Throws:
JMSException - is thrown if a JMS exception occurs

readRemoteInvocation

public org.springframework.remoting.support.RemoteInvocation readRemoteInvocation(Message message)
                                                                           throws JMSException
Description copied from interface: Marshaller
Read a RemoteInvocation from the given JMS message

Specified by:
readRemoteInvocation in interface Marshaller
Parameters:
message - current JMS message
Returns:
the RemoteInvocation object
Throws:
JMSException

isIgnoreInvalidMessages

public boolean isIgnoreInvalidMessages()

setIgnoreInvalidMessages

public void setIgnoreInvalidMessages(boolean ignoreInvalidMessages)
Sets whether invalidly formatted messages should be silently ignored or not


onInvalidClientMessage

protected org.springframework.remoting.support.RemoteInvocationResult onInvalidClientMessage(Message message)
                                                                                      throws JMSException
Throws:
JMSException

onInvalidMessage

protected org.springframework.remoting.support.RemoteInvocation onInvalidMessage(Message message)
Handle invalid messages by just logging, though a different implementation may wish to throw exceptions


appendMessageHeaders

protected void appendMessageHeaders(Message message,
                                    Requestor requestor,
                                    LingoInvocation invocation)
A strategy method for derived classes to allow them a plugin point to perform custom header processing


handleInvocationHeaders

protected void handleInvocationHeaders(Message message)
A strategy method to allow derived classes to process the headers in a special way


handleInvocationResultHeaders

protected void handleInvocationResultHeaders(Message message)
A strategy method to allow derived classes to process the headers in a special way



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