com.codestreet.selector.jms
Class ValueProvider

java.lang.Object
  extended bycom.codestreet.selector.jms.ValueProvider
All Implemented Interfaces:
IValueProvider

public class ValueProvider
extends java.lang.Object
implements IValueProvider

Value provider for JMS. As an extension to the JMS specification, this implementation allows values to be extracted from JMS message body using a dot notation.

The dot notation provides reference to message body fields. For example, .order.quantity would access the quantity field of the nested sub-message field order, if it exists. If the field does not exist, it returns null.

Author:
Jawaid Hakim.

Method Summary
 java.lang.Object getValue(java.lang.Object identifier, java.lang.Object correlation)
          Get the value of the specified identifier.
static IValueProvider valueOf(javax.jms.Message msg)
          Factory.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

valueOf

public static IValueProvider valueOf(javax.jms.Message msg)
Factory.

Parameters:
msg - Message to extract values from.
Returns:
Instance.

getValue

public java.lang.Object getValue(java.lang.Object identifier,
                                 java.lang.Object correlation)
Get the value of the specified identifier.

Specified by:
getValue in interface IValueProvider
Parameters:
identifier - Field identifier.
correlation - Application correlation data. May be null.
Returns:
Value of the specified identifier. Returns null if value of the specified identifier is not found.
See Also:
NumericValue


Copyright © 2002-2006 CodeStreet. All Rights Reserved.