|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.logicblaze.lingo.jms.marshall.DefaultMarshaller
org.logicblaze.lingo.jms.marshall.XStreamMarshaller
public class XStreamMarshaller
Uses XStream to marshall requests and responses into and out of messages.
| Constructor Summary | |
|---|---|
XStreamMarshaller()
|
|
| 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 |
protected com.thoughtworks.xstream.XStream |
createXStream()
|
org.springframework.remoting.support.RemoteInvocationResult |
extractInvocationResult(Message message)
Extracts the invocation result from the response message |
protected Object |
fromXML(String xml)
|
com.thoughtworks.xstream.XStream |
getXStream()
|
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 |
void |
setXStream(com.thoughtworks.xstream.XStream xStream)
|
protected String |
toXML(Object object)
|
| Methods inherited from class org.logicblaze.lingo.jms.marshall.DefaultMarshaller |
|---|
addResponseMessageHeaders, appendMessageHeaders, appendMessageHeaders, getStickySessionID, handleInvocationHeaders, handleInvocationResultHeaders, handleMessageHeaders, isIgnoreInvalidMessages, onInvalidClientMessage, onInvalidMessage, setIgnoreInvalidMessages |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public XStreamMarshaller()
| Method Detail |
|---|
public Message createRequestMessage(Requestor requestor,
LingoInvocation invocation)
throws JMSException
Marshaller
createRequestMessage in interface MarshallercreateRequestMessage in class DefaultMarshallerinvocation - the remote invocation to send
JMSException - if the message could not be created
public Message createResponseMessage(Session session,
org.springframework.remoting.support.RemoteInvocationResult result,
Message requestMessage)
throws JMSException
Marshaller
createResponseMessage in interface MarshallercreateResponseMessage in class DefaultMarshallersession - the JMS session to useresult - the result invocationrequestMessage - the original request message
JMSException - if the message could not be created
public org.springframework.remoting.support.RemoteInvocationResult extractInvocationResult(Message message)
throws JMSException
Marshaller
extractInvocationResult in interface MarshallerextractInvocationResult in class DefaultMarshallermessage - the response message
JMSException - is thrown if a JMS exception occurs
public org.springframework.remoting.support.RemoteInvocation readRemoteInvocation(Message message)
throws JMSException
Marshaller
readRemoteInvocation in interface MarshallerreadRemoteInvocation in class DefaultMarshallermessage - current JMS message
JMSException
public Message createObjectMessage(Session session,
Object value)
throws JMSException
Marshaller
createObjectMessage in interface MarshallercreateObjectMessage in class DefaultMarshallerJMSException
public Object readMessage(Message message)
throws JMSException
Marshaller
readMessage in interface MarshallerreadMessage in class DefaultMarshallerJMSExceptionpublic com.thoughtworks.xstream.XStream getXStream()
public void setXStream(com.thoughtworks.xstream.XStream xStream)
protected com.thoughtworks.xstream.XStream createXStream()
protected Object fromXML(String xml)
protected String toXML(Object object)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||