public final class STSClientPoolFactory extends Object implements STSClientPool
STSClient
s.Modifier and Type | Method and Description |
---|---|
boolean |
configExists(STSClientConfig config)
Checks whether given config has already sub pool of clients created.
|
void |
createPool(int initialNumberOfClients,
STSClientConfig config)
This method initializes sub pool of clients by given configuration data and returns client from that pool.
|
void |
createPool(int initialNumberOfClients,
STSClientCreationCallBack callBack)
This method initializes sub pool of clients by given configuration data.
|
void |
createPool(STSClientConfig config)
This method initializes sub pool of clients by given configuration data and returns client from that pool.
|
void |
destroyPool(String moduleName)
Destroy all the pools attached to given module name.
|
void |
destroyPool(STSClientConfig config)
Destroys client sub pool denoted by given config.
|
STSClient |
getClient(STSClientConfig config)
Get STSClient from sub pool denoted by config.
|
static STSClientPool |
getPoolInstance()
Get instance of
STSClientPool . |
void |
returnClient(STSClient stsClient)
Returns given
STSClient back to the sub pool of clients. |
public static STSClientPool getPoolInstance()
STSClientPool
.STSClientPool
instancepublic void createPool(STSClientConfig config)
createPool
in interface STSClientPool
config
- to construct the pool of clientspublic void createPool(int initialNumberOfClients, STSClientConfig config)
createPool
in interface STSClientPool
initialNumberOfClients
- initial number of clients in the poolconfig
- to construct the pool of clientspublic void createPool(int initialNumberOfClients, STSClientCreationCallBack callBack)
createPool
in interface STSClientPool
initialNumberOfClients
- initial number of clients in the poolcallBack
- which provide configurationpublic void destroyPool(STSClientConfig config)
destroyPool
in interface STSClientPool
config
- STSClientConfiguration
to find client sub pool to destroypublic void destroyPool(String moduleName)
destroyPool
in interface STSClientPool
moduleName
- module name to destroy pools or "" or null to destroy default module's pools.public void returnClient(STSClient stsClient)
STSClient
back to the sub pool of clients.
Sub pool is determined automatically from client configuration.returnClient
in interface STSClientPool
{@link
- STSClient} to return back to the sub pool of clientspublic STSClient getClient(STSClientConfig config)
getClient
in interface STSClientPool
config
- STSClientConfiguration
to find client sub poolSTSClient
from the sub pool of clientspublic boolean configExists(STSClientConfig config)
configExists
in interface STSClientPool
config
- STSClientConfiguration
to find client sub poolCopyright © 2020 JBoss by Red Hat. All rights reserved.