org.apache.uima.adapter.jms.activemq

## Class JmsInputChannel

- java.lang.Object
- - org.apache.uima.adapter.jms.activemq.JmsInputChannel

- All Implemented Interfaces:
    Serializable, org.apache.uima.aae.Channel, org.apache.uima.aae.InputChannel, JmsInputChannelMBean, org.springframework.jms.listener.SessionAwareMessageListener

      public class JmsInputChannel
      extends Object
      implements org.apache.uima.aae.InputChannel, JmsInputChannelMBean, org.springframework.jms.listener.SessionAwareMessageListener

  Thin adapter for receiving JMS messages from Spring. It delegates processing of all messages to the `Handler`. Each JMS Message is wrapped in transport neutral MessageContext wrapper.
  See Also:
    Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static boolean` | `attachToBrokerMBeanServer`

    - ### Fields inherited from interface org.apache.uima.aae.Channel

      `CloseAllChannels, InputChannels`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `JmsInputChannel()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `abort()`
    `void` | `ackMessage(org.apache.uima.aae.message.MessageContext aMessageContext)`
    `void` | `createListener(String aDelegateKey, org.apache.uima.aae.controller.Endpoint endpointToUpdate)`
    `void` | `createListenerForTargetedMessages()`
    `void` | `createListenerOnTempQueue(javax.jms.ConnectionFactory cf, boolean isFreeCasDestination)`
    `void` | `destroyListener(String anEndpointName, String aDelegateKey)`
    `void` | `disconnectListenersFromQueue()`
    `String` | `getBrokerURL()`
    `int` | `getConcurrentConsumerCount()`
    `org.apache.activemq.ActiveMQConnectionFactory` | `getConnectionFactory()`
    `org.apache.uima.aae.controller.AnalysisEngineController` | `getController()`
    `String` | `getInputQueueName()`
    `List<UimaDefaultMessageListenerContainer>` | `getListeners()`
    `String` | `getName()`
    `String` | `getServerUri()`
    `org.apache.uima.aae.jmx.ServiceInfo` | `getServiceInfo()`
    `int` | `getSessionAckMode()`
    `boolean` | `isFailed(String aDelegateKey)`
    `boolean` | `isListenerActiveOnDestination(javax.jms.Destination destination)`
    `boolean` | `isListenerForDestination(String anEndpointName)`
    `boolean` | `isStopped()`
    `void` | `onMessage(javax.jms.Message aMessage, javax.jms.Session aJmsSession)` Receives Messages from the JMS Provider.
    `void` | `onMessage(org.apache.uima.aae.message.MessageWrapper wrapper)`
    `List<UimaDefaultMessageListenerContainer>` | `registerListener(UimaDefaultMessageListenerContainer messageListener)`
    `void` | `removeDelegateFromFailedList(String aDelegateKey)`
    `void` | `setController(org.apache.uima.aae.controller.AnalysisEngineController aController)`
    `void` | `setEndpointName(String anEndpointName)`
    `void` | `setListenerContainer(UimaDefaultMessageListenerContainer jmsL)`
    `void` | `setMessageHandler(org.apache.uima.aae.handler.Handler aHandler)`
    `void` | `setServerUri(String serverUri)`
    `void` | `setTerminating()`
    `void` | `stop(boolean shutdownNow)`
    `void` | `stop(int channelsToClose, boolean shutdownNow)`
    `void` | `terminate()`
    `boolean` | `validMessage(javax.jms.Message aMessage)` Validates contents of the message.

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

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

- - ### Field Detail

    - #### attachToBrokerMBeanServer

          public static transient boolean attachToBrokerMBeanServer

  - ### Constructor Detail

    - #### JmsInputChannel

          public JmsInputChannel()

  - ### Method Detail

    - #### getController

          public org.apache.uima.aae.controller.AnalysisEngineController getController()

    - #### getName

          public String getName()

      Specified by:
        `getName` in interface `org.apache.uima.aae.Channel`

    - #### setController

          public void setController(org.apache.uima.aae.controller.AnalysisEngineController aController)
                             throws Exception

      Throws:
        `Exception`

    - #### setMessageHandler

          public void setMessageHandler(org.apache.uima.aae.handler.Handler aHandler)

    - #### setEndpointName

          public void setEndpointName(String anEndpointName)

    - #### validMessage

          public boolean validMessage(javax.jms.Message aMessage)
                               throws Exception

      Validates contents of the message. It checks if command, payload and message types contain valid data.
      Parameters:
        `aMessage` - - JMS Message to validate
      Returns:
        - true if message is valid, false otherwise
      Throws:
        `Exception`

    - #### abort

          public void abort()

    - #### onMessage

          public void onMessage(org.apache.uima.aae.message.MessageWrapper wrapper)

      Specified by:
        `onMessage` in interface `org.apache.uima.aae.InputChannel`

    - #### onMessage

          public void onMessage(javax.jms.Message aMessage,
                                javax.jms.Session aJmsSession)

      Receives Messages from the JMS Provider. It checks the message header to determine the type of message received. Based on the type, a MessageContext is created to facilitate access to the transport specific message. Once the MessageContext is determined this routine delegates handling of the message to the chain of MessageHandlers.
      Specified by:
        `onMessage` in interface `org.springframework.jms.listener.SessionAwareMessageListener`
      Parameters:
        `aMessage` - - JMS Message containing header and payload
        `aJmsSession` - - JMSSession object

    - #### getSessionAckMode

          public int getSessionAckMode()

      Specified by:
        `getSessionAckMode` in interface `org.apache.uima.aae.InputChannel`

    - #### getServerUri

          public String getServerUri()

      Specified by:
        `getServerUri` in interface `org.apache.uima.aae.InputChannel`

    - #### registerListener

          public List<UimaDefaultMessageListenerContainer> registerListener(UimaDefaultMessageListenerContainer messageListener)

    - #### getListeners

          public List<UimaDefaultMessageListenerContainer> getListeners()

    - #### setListenerContainer

          public void setListenerContainer(UimaDefaultMessageListenerContainer jmsL)

    - #### getConnectionFactory

          public org.apache.activemq.ActiveMQConnectionFactory getConnectionFactory()

    - #### ackMessage

          public void ackMessage(org.apache.uima.aae.message.MessageContext aMessageContext)

      Specified by:
        `ackMessage` in interface `org.apache.uima.aae.InputChannel`

    - #### getBrokerURL

          public String getBrokerURL()

      Specified by:
        `getBrokerURL` in interface `JmsInputChannelMBean`

    - #### getInputQueueName

          public String getInputQueueName()

      Specified by:
        `getInputQueueName` in interface `org.apache.uima.aae.InputChannel`
      Specified by:
        `getInputQueueName` in interface `JmsInputChannelMBean`

    - #### getServiceInfo

          public org.apache.uima.aae.jmx.ServiceInfo getServiceInfo()

      Specified by:
        `getServiceInfo` in interface `org.apache.uima.aae.InputChannel`

    - #### setServerUri

          public void setServerUri(String serverUri)

      Specified by:
        `setServerUri` in interface `org.apache.uima.aae.InputChannel`

    - #### stop

          public void stop(boolean shutdownNow)
                    throws Exception

      Specified by:
        `stop` in interface `org.apache.uima.aae.Channel`
      Throws:
        `Exception`

    - #### disconnectListenersFromQueue

          public void disconnectListenersFromQueue()
                                            throws Exception

      Specified by:
        `disconnectListenersFromQueue` in interface `org.apache.uima.aae.InputChannel`
      Throws:
        `Exception`

    - #### setTerminating

          public void setTerminating()

      Specified by:
        `setTerminating` in interface `org.apache.uima.aae.InputChannel`

    - #### terminate

          public void terminate()

      Specified by:
        `terminate` in interface `org.apache.uima.aae.InputChannel`

    - #### stop

          public void stop(int channelsToClose,
                           boolean shutdownNow)
                    throws Exception

      Specified by:
        `stop` in interface `org.apache.uima.aae.Channel`
      Throws:
        `Exception`

    - #### isStopped

          public boolean isStopped()

      Specified by:
        `isStopped` in interface `org.apache.uima.aae.InputChannel`

    - #### getConcurrentConsumerCount

          public int getConcurrentConsumerCount()

      Specified by:
        `getConcurrentConsumerCount` in interface `org.apache.uima.aae.InputChannel`

    - #### createListenerOnTempQueue

          public void createListenerOnTempQueue(javax.jms.ConnectionFactory cf,
                                                boolean isFreeCasDestination)
                                         throws Exception

      Throws:
        `Exception`

    - #### createListenerForTargetedMessages

          public void createListenerForTargetedMessages()
                                                 throws Exception

      Specified by:
        `createListenerForTargetedMessages` in interface `org.apache.uima.aae.InputChannel`
      Throws:
        `Exception`

    - #### createListener

          public void createListener(String aDelegateKey,
                                     org.apache.uima.aae.controller.Endpoint endpointToUpdate)
                              throws Exception

      Specified by:
        `createListener` in interface `org.apache.uima.aae.InputChannel`
      Throws:
        `Exception`

    - #### isListenerActiveOnDestination

          public boolean isListenerActiveOnDestination(javax.jms.Destination destination)

    - #### destroyListener

          public void destroyListener(String anEndpointName,
                                      String aDelegateKey)

      Specified by:
        `destroyListener` in interface `org.apache.uima.aae.InputChannel`

    - #### isFailed

          public boolean isFailed(String aDelegateKey)

      Specified by:
        `isFailed` in interface `org.apache.uima.aae.InputChannel`

    - #### removeDelegateFromFailedList

          public void removeDelegateFromFailedList(String aDelegateKey)

      Specified by:
        `removeDelegateFromFailedList` in interface `org.apache.uima.aae.InputChannel`

    - #### isListenerForDestination

          public boolean isListenerForDestination(String anEndpointName)

      Specified by:
        `isListenerForDestination` in interface `org.apache.uima.aae.InputChannel`

Copyright © 2006–2018 The Apache Software Foundation. All rights reserved.