org.logicblaze.lingo.jms.marshall
Interface Marshaller

All Known Implementing Classes:
DefaultMarshaller, XStreamMarshaller

public interface Marshaller

Version:
$Revision: 1.3 $

Method Summary
 Message createObjectMessage(Session session, Object value)
          Creates a message for a Java Object for when distributing objects in collections
 Message createRequestMessage(Requestor requestor, LingoInvocation invocation)
          Creates the request message
 Message createResponseMessage(Session session, org.springframework.remoting.support.RemoteInvocationResult result, Message requestMessage)
          Creates the response message
 org.springframework.remoting.support.RemoteInvocationResult extractInvocationResult(Message message)
          Extracts the invocation result from the response message
 Object readMessage(Message message)
          Extracts the body from the given JMS message
 org.springframework.remoting.support.RemoteInvocation readRemoteInvocation(Message message)
          Read a RemoteInvocation from the given JMS message
 

Method Detail

createRequestMessage

Message createRequestMessage(Requestor requestor,
                             LingoInvocation invocation)
                             throws JMSException
Creates the request message

Parameters:
requestor -
invocation - the remote invocation to send
Throws:
JMSException - if the message could not be created

createResponseMessage

Message createResponseMessage(Session session,
                              org.springframework.remoting.support.RemoteInvocationResult result,
                              Message requestMessage)
                              throws JMSException
Creates the response message

Parameters:
session - the JMS session to use
result - the result invocation
requestMessage - the original request message
Returns:
the response message to send
Throws:
JMSException - if the message could not be created

extractInvocationResult

org.springframework.remoting.support.RemoteInvocationResult extractInvocationResult(Message message)
                                                                                    throws JMSException
Extracts the invocation result from the response message

Parameters:
message - the response message
Returns:
the invocation result
Throws:
JMSException - is thrown if a JMS exception occurs

readRemoteInvocation

org.springframework.remoting.support.RemoteInvocation readRemoteInvocation(Message message)
                                                                           throws JMSException
Read a RemoteInvocation from the given JMS message

Parameters:
message - current JMS message
Returns:
the RemoteInvocation object
Throws:
JMSException

createObjectMessage

Message createObjectMessage(Session session,
                            Object value)
                            throws JMSException
Creates a message for a Java Object for when distributing objects in collections

Throws:
JMSException

readMessage

Object readMessage(Message message)
                   throws JMSException
Extracts the body from the given JMS message

Throws:
JMSException


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