org.osesb.objectpools
Class PooledClientGatewayAccessHelper

java.lang.Object
  extended by org.osesb.objectpools.PooledClientGatewayAccessHelper

public class PooledClientGatewayAccessHelper
extends java.lang.Object

This class encapsulates access to a configured Keyed Pool of org.osesb.msgrouting.ClientGateway(s).

ClientGateway(s) facilitate communication with broker end points such as JMS Queues and web services. ClientGateway is used to hide messaging infrastructure from client applications. Client applications are not aware of target destinations, the message transport, or how a request is fulfilled. Initiating applications merely send a message, and possibly, receive a response.

Since:
Version .9

Field Summary
protected static org.apache.commons.logging.Log log
          The logging implementation for this class.
protected static java.lang.String thisClassName
          The full name of this class.
 
Constructor Summary
PooledClientGatewayAccessHelper()
           
 
Method Summary
static java.lang.Object getPooledClientGateway(java.lang.String poolKey)
          Gets a pooled ClientGateway from the configured keyed pool of ClientGateway(s) using a poolKey.
static void main(java.lang.String[] args)
          Main method for testing and sandboxing.
static void returnPooledClientGateway(java.lang.String poolKey, java.lang.Object clientGateway)
          Returns a ClientGateway to the configured keyed pool of ClientGateway(s).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

thisClassName

protected static java.lang.String thisClassName
The full name of this class.


log

protected static org.apache.commons.logging.Log log
The logging implementation for this class.

Constructor Detail

PooledClientGatewayAccessHelper

public PooledClientGatewayAccessHelper()
Method Detail

getPooledClientGateway

public static java.lang.Object getPooledClientGateway(java.lang.String poolKey)
                                               throws java.lang.Exception
Gets a pooled ClientGateway from the configured keyed pool of ClientGateway(s) using a poolKey.

Parameters:
poolKey - The key to the target ClientGateway in the configured heterogeneous pool of ClientGateway(s).
Returns:
a org.osesb.msgrouting.ClientGateway.
Throws:
java.lang.Exception - if a ClientGateway cannot be obtained from the pool.

returnPooledClientGateway

public static void returnPooledClientGateway(java.lang.String poolKey,
                                             java.lang.Object clientGateway)
Returns a ClientGateway to the configured keyed pool of ClientGateway(s).

Parameters:
poolKey - The key to the target ClientGateway in the configured heterogeneous pool of ClientGateway(s).
clientGateway - The ClientGateway to return.

main

public static void main(java.lang.String[] args)
Main method for testing and sandboxing.

Parameters:
args -