org.logicblaze.lingo.jms.marshall
Interface Marshaller

All Known Implementing Classes:
DefaultMarshaller, XStreamMarshaller

public interface Marshaller

Version:
$Revision: 84 $

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

Method Detail

createRequestMessage

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

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

createResponseMessage

javax.jms.Message createResponseMessage(javax.jms.Session session,
                                        org.springframework.remoting.support.RemoteInvocationResult result,
                                        javax.jms.Message requestMessage)
                                        throws javax.jms.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:
javax.jms.JMSException - if the message could not be created

extractInvocationResult

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

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

readRemoteInvocation

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

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

createObjectMessage

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

Throws:
javax.jms.JMSException

readMessage

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

Throws:
javax.jms.JMSException


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