org.openanzo.services
Interface IJmsProvider

All Known Implementing Classes:
ActiveMqProvider

public interface IJmsProvider

IJmsProvider wraps an implementation of a JMS provider with any conversion needed in order for Anzo's notification system to work.

Author:
Matthew Roy ( mroy@cambridgesemantics.com )

Field Summary
static java.lang.String SELECTOR_NOT_TRANSACTION_BEGIN
          Constant added to JMS selectors in order to not get all transactionBegin messages
static java.lang.String SELECTOR_NOT_TRANSACTION_COMPLETE
          Constant added to JMS selectors in order to not get all transactionComplete messages
static java.lang.String SELECTOR_TRANSACTION_BEGIN
          Constant added to JMS selectors in order to get all transactionBegin messages
static java.lang.String SELECTOR_TRANSACTION_COMPLETE
          Constant added to JMS selectors in order to get all transactionComplete messages
 
Method Summary
 void connectProvider(javax.jms.Session session, javax.jms.Destination updateDestination, javax.jms.MessageListener listener)
          Do any provider specific operations in order to finish connecting to provider.
 javax.jms.Destination convertReplyToDestination(javax.jms.Session session, javax.jms.Destination destination)
          Do any provider specific operations that are needed in order to convert a replyToDestination to a Destination object that the provider can send messages.
 java.lang.String convertSelectorString(java.lang.String selector)
          Do any provider specific operations in order to make a selector string valid for the provider
 javax.jms.Destination convertStringToDestination(javax.jms.Session session, java.lang.String destination)
          Do any provider specific operations that are needed in order to convert a String representation of a Destination to a Destination object that the provider can send messages.
 javax.jms.ConnectionFactory createConnectionFactory(java.util.Properties properties)
          Create a new JMS ConnectionFactory given a set of properties.
 void disconnectProvider()
          Do any provider specific operations in order to finish disconnecting from a provider.
 

Field Detail

SELECTOR_TRANSACTION_COMPLETE

static final java.lang.String SELECTOR_TRANSACTION_COMPLETE
Constant added to JMS selectors in order to get all transactionComplete messages

See Also:
Constant Field Values

SELECTOR_TRANSACTION_BEGIN

static final java.lang.String SELECTOR_TRANSACTION_BEGIN
Constant added to JMS selectors in order to get all transactionBegin messages

See Also:
Constant Field Values

SELECTOR_NOT_TRANSACTION_COMPLETE

static final java.lang.String SELECTOR_NOT_TRANSACTION_COMPLETE
Constant added to JMS selectors in order to not get all transactionComplete messages

See Also:
Constant Field Values

SELECTOR_NOT_TRANSACTION_BEGIN

static final java.lang.String SELECTOR_NOT_TRANSACTION_BEGIN
Constant added to JMS selectors in order to not get all transactionBegin messages

See Also:
Constant Field Values
Method Detail

createConnectionFactory

javax.jms.ConnectionFactory createConnectionFactory(java.util.Properties properties)
                                                    throws javax.jms.JMSException
Create a new JMS ConnectionFactory given a set of properties.

Parameters:
properties - Configuration properties for the ConnectionFactory
Returns:
New JMS ConnectionFactory based on the given properties
Throws:
javax.jms.JMSException - if there is an exception creating a ConnectionFactory
See Also:
ConnectionFactory

convertReplyToDestination

javax.jms.Destination convertReplyToDestination(javax.jms.Session session,
                                                javax.jms.Destination destination)
                                                throws javax.jms.JMSException
Do any provider specific operations that are needed in order to convert a replyToDestination to a Destination object that the provider can send messages.

Parameters:
session - Session destination is a member of
destination - Destination to convert
Returns:
Converted/augmented destination
Throws:
javax.jms.JMSException

convertStringToDestination

javax.jms.Destination convertStringToDestination(javax.jms.Session session,
                                                 java.lang.String destination)
                                                 throws javax.jms.JMSException
Do any provider specific operations that are needed in order to convert a String representation of a Destination to a Destination object that the provider can send messages.

Parameters:
session - Session destination is a member of
destination - String representation of destination to convert
Returns:
New destination object
Throws:
javax.jms.JMSException

convertSelectorString

java.lang.String convertSelectorString(java.lang.String selector)
Do any provider specific operations in order to make a selector string valid for the provider

Parameters:
selector - Selector string to convert
Returns:
converted selector string

connectProvider

void connectProvider(javax.jms.Session session,
                     javax.jms.Destination updateDestination,
                     javax.jms.MessageListener listener)
                     throws javax.jms.JMSException
Do any provider specific operations in order to finish connecting to provider. This is called after standard connect code is called.

Parameters:
session - Session operation is occurring within
updateDestination - The Destination object representing the updateDestination
listener - The messageListener for said connection.
Throws:
javax.jms.JMSException

disconnectProvider

void disconnectProvider()
                        throws javax.jms.JMSException
Do any provider specific operations in order to finish disconnecting from a provider. This is called after standard

Throws:
javax.jms.JMSException


Copyright © 2007 Cambridge Semantics Inc.. All Rights Reserved.