org.springframework.amqp.remoting.client
Class AmqpClientInterceptor
java.lang.Object
org.springframework.remoting.support.RemotingSupport
org.springframework.remoting.support.RemoteAccessor
org.springframework.amqp.remoting.client.AmqpClientInterceptor
- All Implemented Interfaces:
- org.aopalliance.aop.Advice, org.aopalliance.intercept.Interceptor, org.aopalliance.intercept.MethodInterceptor, Aware, BeanClassLoaderAware
- Direct Known Subclasses:
- AmqpProxyFactoryBean
public class AmqpClientInterceptor
- extends RemoteAccessor
- implements org.aopalliance.intercept.MethodInterceptor
MethodInterceptor for accessing RMI-style AMQP services.
- Since:
- 1.2
- Author:
- David Bilge, Gary Russell
- See Also:
AmqpInvokerServiceExporter,
AmqpProxyFactoryBean,
RemoteAccessException
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AmqpClientInterceptor
public AmqpClientInterceptor()
invoke
public Object invoke(org.aopalliance.intercept.MethodInvocation invocation)
throws Throwable
- Specified by:
invoke in interface org.aopalliance.intercept.MethodInterceptor
- Throws:
Throwable
getAmqpTemplate
public AmqpTemplate getAmqpTemplate()
setAmqpTemplate
public void setAmqpTemplate(AmqpTemplate amqpTemplate)
- The AMQP template to be used for sending messages and receiving results. This class is using "Request/Reply" for
sending messages as described in the Spring-AMQP
documentation.
getRoutingKey
public String getRoutingKey()
setRoutingKey
public void setRoutingKey(String routingKey)
- The routing key to send calls to the service with. Use this to route the messages to a specific queue on the
broker. If not set, the
AmqpTemplate's default routing key will be used.
This property is useful if you want to use the same AmqpTemplate to talk to multiple services.
getRemoteInvocationFactory
public RemoteInvocationFactory getRemoteInvocationFactory()
setRemoteInvocationFactory
public void setRemoteInvocationFactory(RemoteInvocationFactory remoteInvocationFactory)
- 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.