org.bss.esb
Class EsbConfigManager

java.lang.Object
  extended byorg.bss.esb.EsbConfigManager

public class EsbConfigManager
extends java.lang.Object

Helper class for initializing the ESB configuration by creating appropriate bean classes as specified in the EsbConfiguration XML. It then puts all the created beans in a Map. Information about the configured routes and retry policies is also placed in separate Map objects.

Version:
1.0
Author:
Balwinder Sodhi
See Also:
RouteInfo, RetryPolicyInfo

Constructor Summary
EsbConfigManager()
           
 
Method Summary
 void clear()
          Clears all the object maps maintained by this class.
 java.util.Map getBeansMap()
          Returns the map holding the bean instances as per the configuration in EsbConfiguration XML.
 java.util.Map getRetryPolicyMap()
          Returns the map holding the RetryPolicyInfo objects as per the configuration in EsbConfiguration XML.
 java.util.Map getRouteMap()
          Returns the map holding RouteInfo objects.
 void init(java.lang.String configUrl)
          Initializes the various object maps as per the configuration defined in the EsbConfiguration XML.
static java.lang.Object invokeMethod(java.lang.Object obj, java.lang.String methodName, java.lang.Class[] argTypes, java.lang.Object[] args)
          Uses reflection to invoke a given method on a given class.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EsbConfigManager

public EsbConfigManager()
Method Detail

getRouteMap

public final java.util.Map getRouteMap()
Returns the map holding RouteInfo objects.

Returns:

getBeansMap

public final java.util.Map getBeansMap()
Returns the map holding the bean instances as per the configuration in EsbConfiguration XML.

Returns:

getRetryPolicyMap

public final java.util.Map getRetryPolicyMap()
Returns the map holding the RetryPolicyInfo objects as per the configuration in EsbConfiguration XML.

Returns:

clear

public void clear()
Clears all the object maps maintained by this class.


init

public void init(java.lang.String configUrl)
          throws java.lang.Exception
Initializes the various object maps as per the configuration defined in the EsbConfiguration XML.

Parameters:
configUrl -
Throws:
java.lang.Exception

invokeMethod

public static java.lang.Object invokeMethod(java.lang.Object obj,
                                            java.lang.String methodName,
                                            java.lang.Class[] argTypes,
                                            java.lang.Object[] args)
                                     throws java.lang.Exception
Uses reflection to invoke a given method on a given class.

Parameters:
obj - Instance of the class on which to call the method
methodName - Name of the method to be invoked
argTypes - Class[] containing the argument types
args - Object[] containing the actual param values
Throws:
java.lang.Exception


Copyright © 2005 Balwinder Sodhi. All Rights Reserved.