Class AmqpInvokerServiceExporter

  • All Implemented Interfaces:
    MessageListener, Aware, BeanClassLoaderAware

    @Deprecated
    public class AmqpInvokerServiceExporter
    extends RemoteInvocationBasedExporter
    implements MessageListener
    Deprecated.
    will be removed in 3.0.0.
    This message listener exposes a plain java service via AMQP. Such services can be accessed via plain AMQP or via AmqpProxyFactoryBean. To configure this message listener so that it actually receives method calls via AMQP, it needs to be put into a listener container. See MessageListener.

    When receiving a message, a service method is called according to the contained RemoteInvocation. The result of that invocation is returned as a RemoteInvocationResult contained in a message that is sent according to the ReplyToAddress of the received message.

    Please note that this exporter does not use the MessageConverter of the injected AmqpTemplate to convert incoming calls and their results. Instead you have to directly inject the MessageConverter into this class.

    This listener responds to "Request/Reply"-style messages as described here.

    Since:
    1.2
    Author:
    David Bilge, Gary Russell, Artem Bilan
    • Constructor Detail

      • AmqpInvokerServiceExporter

        public AmqpInvokerServiceExporter()
        Deprecated.
    • Method Detail

      • onMessage

        public void onMessage​(Message message)
        Deprecated.
        Description copied from interface: MessageListener
        Delivers a single message.
        Specified by:
        onMessage in interface MessageListener
        Parameters:
        message - the message.
      • getAmqpTemplate

        public AmqpTemplate getAmqpTemplate()
        Deprecated.
      • setAmqpTemplate

        public void setAmqpTemplate​(AmqpTemplate amqpTemplate)
        Deprecated.
        The AMQP template to use for sending the return value.

        Note that the exchange and routing key parameters on this template are ignored for these return messages. Instead of those the respective parameters from the original message's returnAddress are being used.

        Also, the template's MessageConverter is not used for the reply.

        Parameters:
        amqpTemplate - The amqp template.
        See Also:
        setMessageConverter(MessageConverter)
      • getMessageConverter

        public MessageConverter getMessageConverter()
        Deprecated.
      • setMessageConverter

        public void setMessageConverter​(MessageConverter messageConverter)
        Deprecated.
        Set the message converter for this remote service. Used to deserialize remote method calls and to serialize their return values.

        The default converter is a SimpleMessageConverter, which is able to handle byte arrays, Strings, and Serializable Objects depending on the message content type header.

        Note that this class never uses the message converter of the underlying AmqpTemplate!

        Parameters:
        messageConverter - The message converter.
        See Also:
        SimpleMessageConverter