public class AmqpClientInterceptor extends RemoteAccessor implements org.aopalliance.intercept.MethodInterceptor
MethodInterceptor for accessing RMI-style AMQP services.AmqpInvokerServiceExporter,
AmqpProxyFactoryBean,
RemoteAccessExceptionlogger| Constructor and Description |
|---|
AmqpClientInterceptor() |
| Modifier and Type | Method and Description |
|---|---|
AmqpTemplate |
getAmqpTemplate() |
RemoteInvocationFactory |
getRemoteInvocationFactory() |
String |
getRoutingKey() |
Object |
invoke(org.aopalliance.intercept.MethodInvocation invocation) |
void |
setAmqpTemplate(AmqpTemplate amqpTemplate)
The AMQP template to be used for sending messages and receiving results.
|
void |
setRemoteInvocationFactory(RemoteInvocationFactory remoteInvocationFactory)
Set the RemoteInvocationFactory to use for this accessor.
|
void |
setRoutingKey(String routingKey)
The routing key to send calls to the service with.
|
getServiceInterface, setServiceInterfacegetBeanClassLoader, overrideThreadContextClassLoader, resetThreadContextClassLoader, setBeanClassLoaderpublic Object invoke(org.aopalliance.intercept.MethodInvocation invocation) throws Throwable
invoke in interface org.aopalliance.intercept.MethodInterceptorThrowablepublic AmqpTemplate getAmqpTemplate()
public void setAmqpTemplate(AmqpTemplate amqpTemplate)
amqpTemplate - The amqp template.public String getRoutingKey()
public void setRoutingKey(String routingKey)
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.
routingKey - The routing key.public RemoteInvocationFactory getRemoteInvocationFactory()
public void setRemoteInvocationFactory(RemoteInvocationFactory remoteInvocationFactory)
DefaultRemoteInvocationFactory.
A custom invocation factory can add further context information to the invocation, for example user credentials.
remoteInvocationFactory - The remote invocation factory.