Class AbstractJmsListener

java.lang.Object
org.apache.ofbiz.service.jms.AbstractJmsListener
All Implemented Interfaces:
javax.jms.ExceptionListener, javax.jms.MessageListener, GenericMessageListener
Direct Known Subclasses:
JmsQueueListener, JmsTopicListener

public abstract class AbstractJmsListener extends Object implements GenericMessageListener, javax.jms.ExceptionListener
AbstractJmsListener
  • Constructor Details

    • AbstractJmsListener

      protected AbstractJmsListener(Delegator delegator)
      Initializes the LocalDispatcher for this service listener.
      Parameters:
      delegator - the delegator associated to the dispatcher
  • Method Details

    • runService

      protected Map<String,Object> runService(javax.jms.MapMessage message)
      Runs the service defined in the MapMessage
      Parameters:
      message -
      Returns:
      Map
    • onMessage

      public void onMessage(javax.jms.Message message)
      Receives the MapMessage and processes the service.
      Specified by:
      onMessage in interface javax.jms.MessageListener
      See Also:
      • MessageListener.onMessage(Message)
    • onException

      public void onException(javax.jms.JMSException je)
      On exception try to re-establish connection to the JMS server.
      Specified by:
      onException in interface javax.jms.ExceptionListener
      See Also:
      • ExceptionListener.onException(JMSException)
    • refresh

      public void refresh() throws GenericServiceException
      Description copied from interface: GenericMessageListener
      Refresh the connection.
      Specified by:
      refresh in interface GenericMessageListener
      Throws:
      GenericServiceException
    • isConnected

      public boolean isConnected()
      Description copied from interface: GenericMessageListener
      Indicator if a connection is present.
      Specified by:
      isConnected in interface GenericMessageListener
      Returns:
      true if connectio is present.
    • setConnected

      protected void setConnected(boolean connected)
      Setter method for the connected field.
      Parameters:
      connected -