spring-framework / org.springframework.jms.remoting / JmsInvokerProxyFactoryBean

JmsInvokerProxyFactoryBean

open class JmsInvokerProxyFactoryBean : JmsInvokerClientInterceptor, FactoryBean<Any>, BeanClassLoaderAware

FactoryBean for JMS invoker proxies. Exposes the proxied service for use as a bean reference, using the specified service interface.

Serializes remote invocation objects and deserializes remote invocation result objects. Uses Java serialization just like RMI, but with the JMS provider as communication infrastructure.

To be configured with a javax.jms.QueueConnectionFactory and a target queue (either as javax.jms.Queue reference or as queue name).

Author
Juergen Hoeller

Since
2.0

See Also
#setConnectionFactory#setQueueName#setServiceInterfaceorg.springframework.jms.remoting.JmsInvokerClientInterceptororg.springframework.jms.remoting.JmsInvokerServiceExporter

Constructors

<init>

JmsInvokerProxyFactoryBean()

FactoryBean for JMS invoker proxies. Exposes the proxied service for use as a bean reference, using the specified service interface.

Serializes remote invocation objects and deserializes remote invocation result objects. Uses Java serialization just like RMI, but with the JMS provider as communication infrastructure.

To be configured with a javax.jms.QueueConnectionFactory and a target queue (either as javax.jms.Queue reference or as queue name).

Functions

afterPropertiesSet

open fun afterPropertiesSet(): Unit

getObject

open fun getObject(): Any

getObjectType

open fun getObjectType(): Class<*>

isSingleton

open fun isSingleton(): Boolean

setBeanClassLoader

open fun setBeanClassLoader(classLoader: ClassLoader): Unit

setServiceInterface

open fun setServiceInterface(serviceInterface: Class<*>): Unit

Set the interface that the proxy must implement.

Inherited Functions

invoke

open fun invoke(methodInvocation: MethodInvocation): Any

setConnectionFactory

open fun setConnectionFactory(connectionFactory: ConnectionFactory): Unit

Set the QueueConnectionFactory to use for obtaining JMS QueueConnections.

setDestinationResolver

open fun setDestinationResolver(destinationResolver: DestinationResolver): Unit

Set the DestinationResolver that is to be used to resolve Queue references for this accessor.

The default resolver is a DynamicDestinationResolver. Specify a JndiDestinationResolver for resolving destination names as JNDI locations.

setMessageConverter

open fun setMessageConverter(messageConverter: MessageConverter): Unit

Specify the MessageConverter to use for turning org.springframework.remoting.support.RemoteInvocation objects into request messages, as well as response messages into org.springframework.remoting.support.RemoteInvocationResult objects.

Default is a SimpleMessageConverter, using a standard JMS javax.jms.ObjectMessage for each invocation / invocation result object.

Custom implementations may generally adapt java.io.Serializable objects into special kinds of messages, or might be specifically tailored for translating RemoteInvocation(Result)s into specific kinds of messages.

setQueue

open fun setQueue(queue: Queue): Unit

Set the target Queue to send invoker requests to.

setQueueName

open fun setQueueName(queueName: String): Unit

Set the name of target queue to send invoker requests to.

The specified name will be dynamically resolved via the DestinationResolver.

setReceiveTimeout

open fun setReceiveTimeout(receiveTimeout: Long): Unit

Set the timeout to use for receiving the response message for a request (in milliseconds).

The default is 0, which indicates a blocking receive without timeout.

setRemoteInvocationFactory

open fun setRemoteInvocationFactory(remoteInvocationFactory: RemoteInvocationFactory): Unit

Set the RemoteInvocationFactory to use for this accessor.

Default is a DefaultRemoteInvocationFactory.

A custom invocation factory can add further context information to the invocation, for example user credentials.