Overview | Package | Class | Use | Tree | Deprecated | Index | Help
|  | Oracle Corporation
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.bea.wlcp.wlng.api.edr.jms
Class JMSListener

    java.lang.Object
      com.bea.wlcp.wlng.api.edr.jms.JMSListener

public abstract class JMSListener
extends Object

Root class used by all JMS listener. It provides a convenient way of extracting the Edr object from the JMS message so subclass don't have to deal with JMS specific feature.

  Copyright © 2008 Oracle Corporation Systems, Inc. All Rights Reserved.

Nested Class Summary
`static class` | `JMSListener.TYPE` Type of registration

Constructor Summary
`JMSListener()` Default constructor

Method Summary
`ConfigDescriptor` | `findConfigDescriptorMatchingEdr(EdrData edr)` Finds a descriptor given the specified Edr
`void` | `onEdr(EdrData edr, ConfigDescriptor descriptor)` Handles an EDR.
`void` | `onException(javax.jms.JMSException jmsException)` subclasses need to overwrite this method to receive the JMSException if there is any serious problems in connection.
`void` | `onMessage(Message message)`
`void` | `processEdr(EdrData edr)` Processes an individual EdrData.
`void` | `processEdr(EdrData[] datas)` Processes a batch of EdrData.
`void` | `register(Context context, JMSListener.TYPE type, EdrFilter filter)` Registers the JMS listener to the EDR topic.
`void` | `register(String url)` Registers the JMS listener to the EDR topic.
`void` | `register(String url, EdrFilter filter)` Registers the JMS listener to the EDR topic.
`void` | `register(String url, JMSListener.TYPE type)` Registers the JMS listener to the EDR topic.
`void` | `register(String url, JMSListener.TYPE type, EdrFilter filter)` Registers the JMS listener to the EDR topic.
`void` | `unregister()` Unregisters the JMS listener from the Edr topic.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### JMSListener

    public JMSListener()

  Default constructor

Method Detail

### findConfigDescriptorMatchingEdr

    public ConfigDescriptor findConfigDescriptorMatchingEdr(EdrData edr)

  Finds a descriptor given the specified Edr

  Parameters:
    `edr` - The Edr data
  Returns:
    the descriptor if any

### onEdr

    public void onEdr(EdrData edr,
                      ConfigDescriptor descriptor)

  Handles an EDR. The ConfigDescriptor parameter will be set depending on the following scenario: (1) if an EdrFilter was specified in register(), it will be null if it does not match the filter otherwise it will be of the correct subclass. (2) if no EdrFilter was specified in register(), it will be null if it does not match any tag specified by the WLNG otherwise it will be of the correct subclass

  Parameters:
    `edr` - The EdrData
    `descriptor` - The type of EdrData or null if no EdrFilter specified

### onException

    public void onException(javax.jms.JMSException jmsException)

  subclasses need to overwrite this method to receive the JMSException if there is any serious problems in connection.

  Parameters:
    `jmsException` - JMSException

### onMessage

    public void onMessage(Message message)

### processEdr

    public void processEdr(EdrData edr)

  Processes an individual EdrData. This method is called by default by the processEdr(EdrData[]) method if it has not been overriden by a subclass.

  Parameters:
    `edr` - The EdrData to process

### processEdr

    public void processEdr(EdrData[] datas)

  Processes a batch of EdrData. Can be overriden by subclass to handle the batch more efficiently. Note: this batch of EdrData is not filtered according to the specified EdrFilter

  Parameters:
    `datas` - The list of EdrData to process

### register

    public void register(Context context,
                         JMSListener.TYPE type,
                         EdrFilter filter)
                  throws Exception

  Registers the JMS listener to the EDR topic. The listener can be registered within or outside the WLNG because the EDR topic is available in the JNDI tree.

  Parameters:
    `context` - The javax Context
    `type` - Type of registration (see TYPE enum)
    `filter` - An optional EDR filter string
  Throws:
    `Exception` - An exception during registration of the listener

### register

    public void register(String url)
                  throws Exception

  Registers the JMS listener to the EDR topic. The listener can be registered within or outside the WLNG because the EDR topic is available in the JNDI tree. This method uses the "tag" filtering mechanism.

  Parameters:
    `url` - URL of the server where the WLNG is running
  Throws:
    `Exception` - An exception during registration of the listener

### register

    public void register(String url,
                         EdrFilter filter)
                  throws Exception

  Registers the JMS listener to the EDR topic. The listener can be registered within or outside the WLNG because the EDR topic is available in the JNDI tree.

  Parameters:
    `url` - URL of the server where the WLNG is running
    `filter` - An optional EDR filter string
  Throws:
    `Exception` - An exception during registration of the listener

### register

    public void register(String url,
                         JMSListener.TYPE type)
                  throws Exception

  Registers the JMS listener to the EDR topic. The listener can be registered within or outside the WLNG because the EDR topic is available in the JNDI tree. This method uses the "tag" filtering mechanism.

  Parameters:
    `url` - URL of the server where the WLNG is running
    `type` - Type of registration (see TYPE enum)
  Throws:
    `Exception` - An exception during registration of the listener

### register

    public void register(String url,
                         JMSListener.TYPE type,
                         EdrFilter filter)
                  throws Exception

  Registers the JMS listener to the EDR topic. The listener can be registered within or outside the WLNG because the EDR topic is available in the JNDI tree.

  Parameters:
    `url` - URL of the server where the WLNG is running
    `type` - Type of registration (see TYPE enum)
    `filter` - An optional EDR filter string
  Throws:
    `Exception` - An exception during registration of the listener

### unregister

    public void unregister()
                    throws JMSException

  Unregisters the JMS listener from the Edr topic.

  Throws:
    `JMSException`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
|  | Oracle Corporation
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD