org.logicblaze.lingo.jms
Class JmsServiceExporterSupport

java.lang.Object
  extended byorg.springframework.remoting.support.RemoteExporter
      extended byorg.springframework.remoting.support.RemoteInvocationBasedExporter
          extended byorg.logicblaze.lingo.jms.JmsServiceExporterSupport
All Implemented Interfaces:
org.springframework.beans.factory.InitializingBean, MessageListener
Direct Known Subclasses:
JmsServiceExporter, JmsServiceExporterMessageListener, JmsTemplateServiceExporter

public abstract class JmsServiceExporterSupport
extends org.springframework.remoting.support.RemoteInvocationBasedExporter
implements MessageListener, org.springframework.beans.factory.InitializingBean

Version:
$Revision: 1.2 $

Field Summary
protected  Object proxy
           
 
Fields inherited from class org.springframework.remoting.support.RemoteExporter
logger
 
Constructor Summary
JmsServiceExporterSupport()
           
 
Method Summary
 void afterPropertiesSet()
           
protected  Object createRemoteProxy(Message message, Class parameterType, Object argument)
           
protected  Message createResponseMessage(Session session, Message message, org.springframework.remoting.support.RemoteInvocationResult result)
          Creates the invocation result response message
 org.springframework.remoting.support.RemoteInvocationFactory getInvocationFactory()
           
 Marshaller getMarshaller()
           
 Requestor getResponseRequestor()
           
protected  void introduceRemoteReferences(LingoInvocation invocation, Message requestMessage)
          Lets replace any remote object correlation IDs with dynamic proxies
 boolean isIgnoreFailures()
           
protected  void onException(Message message, JMSException e)
          Handle the processing of an exception when processing an inbound messsage
 void onMessage(Message message)
           
 void setIgnoreFailures(boolean ignoreFailures)
          Sets whether or not failures should be ignored (and just logged) or thrown as runtime exceptions into the JMS provider
 void setInvocationFactory(org.springframework.remoting.support.RemoteInvocationFactory invocationFactory)
           
 void setMarshaller(Marshaller marshaller)
           
 void setResponseRequestor(Requestor responseRequestor)
           
protected abstract  void writeRemoteInvocationResult(Message message, org.springframework.remoting.support.RemoteInvocationResult result)
          Send the given RemoteInvocationResult as a JMS message to the originator
 
Methods inherited from class org.springframework.remoting.support.RemoteInvocationBasedExporter
getRemoteInvocationExecutor, invoke, invokeAndCreateResult, setRemoteInvocationExecutor
 
Methods inherited from class org.springframework.remoting.support.RemoteExporter
checkService, checkServiceInterface, getExporterName, getProxyForService, getService, getServiceInterface, isRegisterTraceInterceptor, setRegisterTraceInterceptor, setService, setServiceInterface
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

proxy

protected Object proxy
Constructor Detail

JmsServiceExporterSupport

public JmsServiceExporterSupport()
Method Detail

afterPropertiesSet

public void afterPropertiesSet()
                        throws Exception
Specified by:
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
Throws:
Exception

onMessage

public void onMessage(Message message)
Specified by:
onMessage in interface MessageListener

getResponseRequestor

public Requestor getResponseRequestor()

setResponseRequestor

public void setResponseRequestor(Requestor responseRequestor)

getMarshaller

public Marshaller getMarshaller()

setMarshaller

public void setMarshaller(Marshaller marshaller)

getInvocationFactory

public org.springframework.remoting.support.RemoteInvocationFactory getInvocationFactory()

setInvocationFactory

public void setInvocationFactory(org.springframework.remoting.support.RemoteInvocationFactory invocationFactory)

isIgnoreFailures

public boolean isIgnoreFailures()

setIgnoreFailures

public void setIgnoreFailures(boolean ignoreFailures)
Sets whether or not failures should be ignored (and just logged) or thrown as runtime exceptions into the JMS provider


writeRemoteInvocationResult

protected abstract void writeRemoteInvocationResult(Message message,
                                                    org.springframework.remoting.support.RemoteInvocationResult result)
                                             throws JMSException
Send the given RemoteInvocationResult as a JMS message to the originator

Parameters:
message - current HTTP message
result - the RemoteInvocationResult object
Throws:
JMSException - if thrown by trying to send the message

createResponseMessage

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

Parameters:
session - the JMS session to use
message - the original request message, in case we want to attach any properties etc.
result - the invocation result
Returns:
the message response to send
Throws:
JMSException - if creating the messsage failed

introduceRemoteReferences

protected void introduceRemoteReferences(LingoInvocation invocation,
                                         Message requestMessage)
                                  throws JMSException
Lets replace any remote object correlation IDs with dynamic proxies

Parameters:
invocation -
requestMessage -
Throws:
JMSException

createRemoteProxy

protected Object createRemoteProxy(Message message,
                                   Class parameterType,
                                   Object argument)
                            throws JMSException
Throws:
JMSException

onException

protected void onException(Message message,
                           JMSException e)
Handle the processing of an exception when processing an inbound messsage



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