org.jboss.soa.esb.listeners
Class ListenerUtil

java.lang.Object
  extended by org.jboss.soa.esb.listeners.ListenerUtil

public class ListenerUtil
extends java.lang.Object


Method Summary
static EPR assembleEpr(ConfigTree tree)
           
static FileEpr fileEprFromElement(ConfigTree tree)
           
static java.lang.String getAttrAndWarn(ConfigTree tree, java.lang.String tag, java.lang.String defaultValue)
           
static long getMaxMillisGatewayWait(ConfigTree tree, org.apache.log4j.Logger logr)
           
static java.lang.String getValue(ConfigTree p_oP, java.lang.String p_sAtt)
          Default value of null.
static java.lang.String getValue(ConfigTree p_oP, java.lang.String p_sAtt, java.lang.String p_sDefault)
          Find an attribute in the tree (arg 0) or assign default value (arg 2) If no such value exists then the default value will be returned, no matter what the value.
static InVMEpr inVMEprFromElement(ConfigTree tree)
           
static JDBCEpr jdbcEprFromElement(ConfigTree tree)
           
static JMSEpr jmsEprFromElement(ConfigTree tree)
           
static java.lang.String obtainAtt(ConfigTree p_oP, java.lang.String p_sAtt, java.lang.String p_sDefault)
          Deprecated. DO NOT USE. Use ListenerUtil#getValue() instead.
static void tryToDeliver(Message message, java.lang.String category, java.lang.String name)
          Deprecated. DO NOT USE. Use ServiceInvoker.deliverAsync(org.jboss.soa.esb.message.Message) instead.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

tryToDeliver

public static void tryToDeliver(Message message,
                                java.lang.String category,
                                java.lang.String name)
                         throws MessageDeliverException,
                                javax.jms.JMSException,
                                RegistryException
Deprecated. DO NOT USE. Use ServiceInvoker.deliverAsync(org.jboss.soa.esb.message.Message) instead.

For unittest/quickstart use, to deliver a message. This method closes all JmsCOnnectionPools.

Parameters:
message -
category -
name -
Throws:
MessageDeliverException
RegistryException
javax.jms.JMSException

assembleEpr

public static EPR assembleEpr(ConfigTree tree)
                       throws ConfigurationException
Throws:
ConfigurationException

inVMEprFromElement

public static InVMEpr inVMEprFromElement(ConfigTree tree)
                                  throws ConfigurationException
Throws:
ConfigurationException

jmsEprFromElement

public static JMSEpr jmsEprFromElement(ConfigTree tree)
                                throws ConfigurationException
Throws:
ConfigurationException

fileEprFromElement

public static FileEpr fileEprFromElement(ConfigTree tree)
                                  throws ConfigurationException
Throws:
ConfigurationException

jdbcEprFromElement

public static JDBCEpr jdbcEprFromElement(ConfigTree tree)
                                  throws ConfigurationException
Throws:
ConfigurationException

getAttrAndWarn

public static java.lang.String getAttrAndWarn(ConfigTree tree,
                                              java.lang.String tag,
                                              java.lang.String defaultValue)
                                       throws ConfigurationException
Throws:
ConfigurationException

getValue

public static java.lang.String getValue(ConfigTree p_oP,
                                        java.lang.String p_sAtt,
                                        java.lang.String p_sDefault)
Find an attribute in the tree (arg 0) or assign default value (arg 2) If no such value exists then the default value will be returned, no matter what the value. This differs from obtainAtt, which will throw a ConfigurationException if no value is present and the default value is null.

Parameters:
p_oP - ConfigTree - look for attributes in this Element only
p_sAtt - String - Name of attribute to find
p_sDefault - String -default value if requested attribute is not there
Returns:
String - value of attribute, or default value (if null)

getValue

public static java.lang.String getValue(ConfigTree p_oP,
                                        java.lang.String p_sAtt)
Default value of null.

Parameters:
p_oP -
p_sAtt -
Returns:

obtainAtt

public static java.lang.String obtainAtt(ConfigTree p_oP,
                                         java.lang.String p_sAtt,
                                         java.lang.String p_sDefault)
                                  throws ConfigurationException
Deprecated. DO NOT USE. Use ListenerUtil#getValue() instead.

Find an attribute in the tree (arg 0) or assign default value (arg 2). If there is no value associated with the attribute and the default value is null, then a ConfigurationException will be thrown. For more intuitive behaviour in the presence of default values, use getValue.

Parameters:
p_oP - ConfigTree - look for attributes in this Element only
p_sAtt - String - Name of attribute to find
p_sDefault - String -default value if requested attribute is not there
Returns:
String - value of attribute, or default value (if null)
Throws:
ConfigurationException - - If requested attribute not found and no default value supplied by invoker

getMaxMillisGatewayWait

public static long getMaxMillisGatewayWait(ConfigTree tree,
                                           org.apache.log4j.Logger logr)
                                    throws ConfigurationException
Throws:
ConfigurationException