org.apache.oozie.service
Class JMSAccessorService

java.lang.Object
  extended by org.apache.oozie.service.JMSAccessorService
All Implemented Interfaces:
Service

public class JMSAccessorService
extends Object
implements Service

This class will


Nested Class Summary
 class JMSAccessorService.JMSRetryRunnable
           
 
Field Summary
static String CONF_PREFIX
           
static String CONF_RETRY_INITIAL_DELAY
           
static String CONF_RETRY_MAX_ATTEMPTS
           
static String CONF_RETRY_MULTIPLIER
           
static String JMS_CONNECTION_CONTEXT_IMPL
           
static String SESSION_OPTS
           
 
Fields inherited from interface org.apache.oozie.service.Service
DEFAULT_LOCK_TIMEOUT, lockTimeout, USE_XCOMMAND
 
Constructor Summary
JMSAccessorService()
           
 
Method Summary
 ConnectionContext createConnectionContext(JMSConnectionInfo connInfo)
           
 ConnectionContext createProducerConnectionContext(JMSConnectionInfo connInfo)
           
 void destroy()
          Destroy the service.
 Class<? extends Service> getInterface()
          Return the public interface of the service.
 void init(Services services)
          Initialize the service.
 void reestablishConnection(JMSConnectionInfo connInfo)
          Reestablish connection for the given JMS connect information
 void registerForNotification(JMSConnectionInfo connInfo, String topic, MessageHandler msgHandler)
          Register for notifications on a JMS topic.
 void unregisterFromNotification(JMSConnectionInfo connInfo, String topic)
          Unregister from listening to JMS messages on a topic.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CONF_PREFIX

public static final String CONF_PREFIX
See Also:
Constant Field Values

JMS_CONNECTION_CONTEXT_IMPL

public static final String JMS_CONNECTION_CONTEXT_IMPL
See Also:
Constant Field Values

SESSION_OPTS

public static final String SESSION_OPTS
See Also:
Constant Field Values

CONF_RETRY_INITIAL_DELAY

public static final String CONF_RETRY_INITIAL_DELAY
See Also:
Constant Field Values

CONF_RETRY_MULTIPLIER

public static final String CONF_RETRY_MULTIPLIER
See Also:
Constant Field Values

CONF_RETRY_MAX_ATTEMPTS

public static final String CONF_RETRY_MAX_ATTEMPTS
See Also:
Constant Field Values
Constructor Detail

JMSAccessorService

public JMSAccessorService()
Method Detail

init

public void init(Services services)
          throws ServiceException
Description copied from interface: Service
Initialize the service.

Invoked by the Service singleton at start up time.

Specified by:
init in interface Service
Parameters:
services - services singleton initializing the service.
Throws:
ServiceException - thrown if the service could not initialize.

registerForNotification

public void registerForNotification(JMSConnectionInfo connInfo,
                                    String topic,
                                    MessageHandler msgHandler)
Register for notifications on a JMS topic.

Parameters:
connInfo - Information to connect to a JMS compliant messaging service.
topic - Topic in which the JMS messages are published
msgHandler - Handler which will process the messages received on the topic

unregisterFromNotification

public void unregisterFromNotification(JMSConnectionInfo connInfo,
                                       String topic)
Unregister from listening to JMS messages on a topic.

Parameters:
connInfo - Information to connect to the JMS compliant messaging service.
topic - Topic in which the JMS messages are published

createConnectionContext

public ConnectionContext createConnectionContext(JMSConnectionInfo connInfo)

createProducerConnectionContext

public ConnectionContext createProducerConnectionContext(JMSConnectionInfo connInfo)

destroy

public void destroy()
Description copied from interface: Service
Destroy the service.

Invoked by the Service singleton at shutdown time.

Specified by:
destroy in interface Service

getInterface

public Class<? extends Service> getInterface()
Description copied from interface: Service
Return the public interface of the service.

Services are retrieved by its public interface. Specializations of services must return the public interface.

Specified by:
getInterface in interface Service
Returns:
the interface of the service.

reestablishConnection

public void reestablishConnection(JMSConnectionInfo connInfo)
Reestablish connection for the given JMS connect information

Parameters:
connInfo - JMS connection info


Copyright © 2013 Apache Software Foundation. All Rights Reserved.