|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.osesb.objectpools.KeyedObjectPoolFactory
org.osesb.objectpools.ClientGatewayKeyedPoolFactory
public class ClientGatewayKeyedPoolFactory
This class is a factory for a object pool of org.osesb.msgrouting.ClientGateway(s), with different configurations (heterogeneous).
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. For multi-threaded environments or for any situation where an application client needs to send multiple messages to osESB, use a pool of ClientGateway(s) to send messages and possibly receive replies. This approach may eliminate the need for the client to correlate multiple request/reply interactions.
| Nested Class Summary | |
|---|---|
protected static class |
ClientGatewayKeyedPoolFactory.ClientGatewayPoolableObjectFactory
Inner class that implements org.apache.commons.pool.KeyedPoolableObjectFactory, which is instantiated by the enclosing class and passed to GenericObjectPool's constructor. |
| Field Summary | |
|---|---|
protected static KeyedObjectPoolConfiguration |
keyedObjectPoolConfiguration
The pool configuration as a whole including the ObjectPoolConfiguration and the pooled object configuration(s). |
protected static ClientGatewayKeyedPoolFactory |
poolFactoryInstance
Singleton pattern - thread-safe construction. |
protected static KeyedObjectPool |
poolInstance
The instance of the objectpool we will create. |
protected static java.lang.String |
thisClassName
The full name of this class |
| Fields inherited from class org.osesb.objectpools.KeyedObjectPoolFactory |
|---|
log |
| Constructor Summary | |
|---|---|
protected |
ClientGatewayKeyedPoolFactory()
Singleton pattern - cannot be instantiated directly. |
| Method Summary | |
|---|---|
static KeyedObjectPoolFactory |
getInstance()
Singleton pattern - - returns the instance of this class. |
KeyedObjectPoolConfiguration |
getKeyedObjectPoolConfiguration()
Return the pool configuration as a whole including the ObjectPoolConfiguration and the pooled object configuration(s). |
KeyedObjectPool |
getPool()
Returns the object pool instance. |
static void |
main(java.lang.String[] args)
Main method for testing and sandboxing. |
void |
resetPoolInstance()
Close the pool and reset the poolInstance. |
| Methods inherited from class org.osesb.objectpools.KeyedObjectPoolFactory |
|---|
getPoolConfig |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static KeyedObjectPool poolInstance
protected static KeyedObjectPoolConfiguration keyedObjectPoolConfiguration
protected static java.lang.String thisClassName
protected static ClientGatewayKeyedPoolFactory poolFactoryInstance
| Constructor Detail |
|---|
protected ClientGatewayKeyedPoolFactory()
| Method Detail |
|---|
public static KeyedObjectPoolFactory getInstance()
public KeyedObjectPool getPool()
throws java.lang.Exception
getPool in class KeyedObjectPoolFactoryjava.lang.Exceptionpublic KeyedObjectPoolConfiguration getKeyedObjectPoolConfiguration()
getKeyedObjectPoolConfiguration in class KeyedObjectPoolFactorypublic void resetPoolInstance()
resetPoolInstance in class KeyedObjectPoolFactorypublic static void main(java.lang.String[] args)
args -
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||