org.springframework.jms.config

## Class MethodJmsListenerEndpoint

- java.lang.Object
- - org.springframework.jms.config.AbstractJmsListenerEndpoint
  - - org.springframework.jms.config.MethodJmsListenerEndpoint

- All Implemented Interfaces:
    Aware, BeanFactoryAware, JmsListenerEndpoint

      public class MethodJmsListenerEndpoint
      extends AbstractJmsListenerEndpoint
      implements BeanFactoryAware

  A `JmsListenerEndpoint` providing the method to invoke to process an incoming message for this endpoint.
  Since:
    4.1
  Author:
    Stephane Nicoll, Juergen Hoeller

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `MethodJmsListenerEndpoint()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected MessagingMessageListenerAdapter` | `createMessageListener(MessageListenerContainer container)` Create a `MessageListener` that is able to serve this endpoint for the specified container.
    `protected MessagingMessageListenerAdapter` | `createMessageListenerInstance()` Create an empty `MessagingMessageListenerAdapter` instance.
    `Object` | `getBean()`
    `protected String` | `getDefaultResponseDestination()` Return the default response destination, if any.
    `protected StringBuilder` | `getEndpointDescription()` Return a description for this endpoint.
    `Method` | `getMethod()`
    `Method` | `getMostSpecificMethod()`
    `void` | `setBean(Object bean)` Set the actual bean instance to invoke this endpoint method on.
    `void` | `setBeanFactory(BeanFactory beanFactory)` Set the `BeanFactory` to use to resolve expressions (may be `null`).
    `void` | `setEmbeddedValueResolver(StringValueResolver embeddedValueResolver)` Set a value resolver for embedded placeholders and expressions.
    `void` | `setMessageHandlerMethodFactory(MessageHandlerMethodFactory messageHandlerMethodFactory)` Set the `MessageHandlerMethodFactory` to use to build the `InvocableHandlerMethod` responsible to manage the invocation of this endpoint.
    `void` | `setMethod(Method method)` Set the method to invoke for processing a message managed by this endpoint.
    `void` | `setMostSpecificMethod(Method mostSpecificMethod)` Set the most specific method known for this endpoint's declaration.

    - ### Methods inherited from class org.springframework.jms.config.AbstractJmsListenerEndpoint

      `getConcurrency, getDestination, getId, getSelector, getSubscription, setConcurrency, setDestination, setId, setSelector, setSubscription, setupListenerContainer, toString`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### MethodJmsListenerEndpoint

          public MethodJmsListenerEndpoint()

  - ### Method Detail

    - #### setBean

          public void setBean(@Nullable
                              Object bean)

      Set the actual bean instance to invoke this endpoint method on.

    - #### getBean

          @Nullable
          public Object getBean()

    - #### setMethod

          public void setMethod(@Nullable
                                Method method)

      Set the method to invoke for processing a message managed by this endpoint.

    - #### getMethod

          @Nullable
          public Method getMethod()

    - #### setMostSpecificMethod

          public void setMostSpecificMethod(@Nullable
                                            Method mostSpecificMethod)

      Set the most specific method known for this endpoint's declaration.

      In case of a proxy, this will be the method on the target class (if annotated itself, that is, if not just annotated in an interface).

      Since:
        4.2.3

    - #### getMostSpecificMethod

          @Nullable
          public Method getMostSpecificMethod()

    - #### setMessageHandlerMethodFactory

          public void setMessageHandlerMethodFactory(MessageHandlerMethodFactory messageHandlerMethodFactory)

      Set the `MessageHandlerMethodFactory` to use to build the `InvocableHandlerMethod` responsible to manage the invocation of this endpoint.

    - #### setEmbeddedValueResolver

          public void setEmbeddedValueResolver(@Nullable
                                               StringValueResolver embeddedValueResolver)

      Set a value resolver for embedded placeholders and expressions.

    - #### setBeanFactory

          public void setBeanFactory(@Nullable
                                     BeanFactory beanFactory)

      Set the `BeanFactory` to use to resolve expressions (may be `null`).
      Specified by:
        `setBeanFactory` in interface `BeanFactoryAware`
      Parameters:
        `beanFactory` - owning BeanFactory (never `null`). The bean can immediately call methods on the factory.
      See Also:
        `BeanInitializationException`

    - #### createMessageListener

          protected MessagingMessageListenerAdapter createMessageListener(MessageListenerContainer container)

      Description copied from class: `AbstractJmsListenerEndpoint`
      Create a `MessageListener` that is able to serve this endpoint for the specified container.
      Specified by:
        `createMessageListener` in class `AbstractJmsListenerEndpoint`

    - #### createMessageListenerInstance

          protected MessagingMessageListenerAdapter createMessageListenerInstance()

      Create an empty `MessagingMessageListenerAdapter` instance.
      Returns:
        a new `MessagingMessageListenerAdapter` or subclass thereof

    - #### getDefaultResponseDestination

          @Nullable
          protected String getDefaultResponseDestination()

      Return the default response destination, if any.

    - #### getEndpointDescription

          protected StringBuilder getEndpointDescription()

      Description copied from class: `AbstractJmsListenerEndpoint`
      Return a description for this endpoint.

      Available to subclasses, for inclusion in their `toString()` result.

      Overrides:
        `getEndpointDescription` in class `AbstractJmsListenerEndpoint`