类 JmsInvokerServiceExporter

    • 方法详细资料

      • setMessageConverter

        public void setMessageConverter​(MessageConverter messageConverter)
        Specify the MessageConverter to use for turning request messages into RemoteInvocation objects, as well as RemoteInvocationResult objects into response messages.

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

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

      • setIgnoreInvalidRequests

        public void setIgnoreInvalidRequests​(boolean ignoreInvalidRequests)
        Set whether invalidly formatted messages should be discarded. Default is "true".

        Switch this flag to "false" to throw an exception back to the listener container. This will typically lead to redelivery of the message, which is usually undesirable - since the message content will be the same (that is, still invalid).

      • afterPropertiesSet

        public void afterPropertiesSet()
        从接口复制的说明: InitializingBean
        Invoked by the containing BeanFactory after it has set all bean properties and satisfied BeanFactoryAware, ApplicationContextAware etc.

        This method allows the bean instance to perform validation of its overall configuration and final initialization when all bean properties have been set.

        指定者:
        afterPropertiesSet 在接口中 InitializingBean
      • readRemoteInvocation

        protected RemoteInvocation readRemoteInvocation​(Message requestMessage)
                                                 throws JMSException
        Read a RemoteInvocation from the given JMS message.
        参数:
        requestMessage - current request message
        返回:
        the RemoteInvocation object (or null in case of an invalid message that will simply be ignored)
        抛出:
        JMSException - in case of message access failure
      • createResponseMessage

        protected Message createResponseMessage​(Message request,
                                                Session session,
                                                RemoteInvocationResult result)
                                         throws JMSException
        Create the invocation result response message.

        The default implementation creates a JMS ObjectMessage for the given RemoteInvocationResult object. It sets the response's correlation id to the request message's correlation id, if any; otherwise to the request message id.

        参数:
        request - the original request message
        session - the JMS session to use
        result - the invocation result
        返回:
        the message response to send
        抛出:
        JMSException - if creating the messsage failed