org.logicblaze.lingo.jms
Class JmsServiceExporter

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

public class JmsServiceExporter
extends JmsServiceExporterSupport
implements org.springframework.beans.factory.InitializingBean, org.springframework.beans.factory.DisposableBean

A JMS MessageListener that exports the specified service bean as a JMS service endpoint, accessible via a JMS proxy.

Note: JMS services exported with this class can be accessed by any JMS client, as there isn't any special handling involved.

Author:
James Strachan
See Also:
JmsProxyFactoryBean

Field Summary
 
Fields inherited from class org.logicblaze.lingo.jms.JmsServiceExporterSupport
proxy
 
Fields inherited from class org.springframework.remoting.support.RemoteExporter
logger
 
Constructor Summary
JmsServiceExporter()
           
 
Method Summary
 void afterPropertiesSet()
           
 void destroy()
           
 ConnectionFactory getConnectionFactory()
           
 Destination getDestination()
           
 JmsProducer getProducer()
           
 void setConnectionFactory(ConnectionFactory connectionFactory)
          Used to create a default JmsProducer if no producer is explicitly configured.
 void setDestination(Destination destination)
          If specified then the service will be auto-subscribed to this destination
 void setProducer(JmsProducer producer)
           
protected  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.logicblaze.lingo.jms.JmsServiceExporterSupport
createRemoteProxy, createResponseMessage, getInvocationFactory, getMarshaller, getResponseRequestor, introduceRemoteReferences, isIgnoreFailures, onException, onMessage, setIgnoreFailures, setInvocationFactory, setMarshaller, setResponseRequestor
 
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
 

Constructor Detail

JmsServiceExporter

public JmsServiceExporter()
Method Detail

afterPropertiesSet

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

destroy

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

getProducer

public JmsProducer getProducer()

setProducer

public void setProducer(JmsProducer producer)

getConnectionFactory

public ConnectionFactory getConnectionFactory()

setConnectionFactory

public void setConnectionFactory(ConnectionFactory connectionFactory)
Used to create a default JmsProducer if no producer is explicitly configured.


getDestination

public Destination getDestination()

setDestination

public void setDestination(Destination destination)
If specified then the service will be auto-subscribed to this destination


writeRemoteInvocationResult

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

Specified by:
writeRemoteInvocationResult in class JmsServiceExporterSupport
Parameters:
message - current HTTP message
result - the RemoteInvocationResult object
Throws:
JMSException - if thrown by trying to send the message


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