public abstract class ApiProxyManager extends Object implements ApiProxyManagerI
Constructor and Description |
---|
ApiProxyManager() |
ApiProxyManager(boolean proxyPoolingFlag) |
ApiProxyManager(int maxProxiesPerServerSize,
int idleConnectionsPerServerSize,
long connectionTimeoutT,
long connectionLifespanT,
ARTimeUnit unit) |
Modifier and Type | Method and Description |
---|---|
void |
addCMTProxyInCMTPool(String mTransactionHandle,
ApiProxyI apiProxyI,
ApiUserContextI apiUserContextI,
String arProxyName,
String cmd,
ApiProxyType proxyType)
add the proxy that handles the client managed transaction in it's pool
this method should only be called in beginClientManagedTransaction before releaseProxy().
|
void |
adjustProxyPoolVariables(int maxProxyPerServerSize,
int minIdleProxySize,
long connectionTimeout2,
ARTimeUnit unit) |
void |
checkCleanUpTimer() |
void |
clear()
Clear the pool for each server whose connections (proxies) are
managed by this
ProxyManager . |
abstract ApiProxyI |
createProxy(ApiUserContextI context) |
void |
deRecodeProxy(ApiProxyPoolI pool,
ApiProxyI proxy) |
void |
deRecodeProxy(ApiUserContextI context,
ApiProxyI t) |
static void |
deRegisterARServerUser(ApiUserContextI apiUserContextBase) |
static long |
getConnectionLifespan(ARTimeUnit unit)
Check if load is set to be balanced.
|
static long |
getConnectionLifespanMilliSec() |
static long |
getConnectionTimeoutMilliSec() |
static int |
getIdleConnectionsPerServer() |
String |
getKeyForServer(ApiUserContextI context) |
static int |
getMaxConnectedServerCMTAllowed() |
static int |
getMaxProxiesPerServer() |
ApiProxyI |
getProxy(ApiUserContextI context) |
ApiProxyI |
getProxy(ApiUserContextI context,
Class<? extends ApiProxyI> proxyJRpcClazz,
String apiCmdName,
ApiProxyType rpcType)
Get a proxy instance based on proxyJRpcClazz (used if the class is in a child class loader, such as DVM)
|
ApiProxyI |
getProxy(ApiUserContextI context,
String proxyJRpcClazzName,
String apiCmdName,
ApiProxyType rpcType)
Get a proxy instance which could be AR or CMDB proxy, base on ProxyJrpcClazzName.
|
static int |
getServerCmtTimeout() |
static void |
registerARServerUserCheck(ApiUserContextI arServerUser) |
void |
releaseProxy(ApiProxyI proxy,
ApiUserContextI context) |
void |
releaseProxy(ApiProxyI proxy,
ApiUserContextI context,
Class<? extends ApiProxyI> proxyJRpcClazz,
String apiCmdName,
ApiProxyType rpcType)
Release the proxy to corresponding pool based on proxyJRpcClazz (used if the class is in a child class loader, such as DVM)
|
void |
releaseProxy(ApiProxyI proxy,
ApiUserContextI context,
String proxyJRpcClazzName,
String apiCmdName,
ApiProxyType rpcType)
Release the proxy to corresponding pool based on proxyJRpcClazzName
|
boolean |
removeCMTProxyFromCMTPool(String mTransactionHandle,
ApiProxyI apiProxyI,
ApiUserContextI apiUserContextI,
String arProxyName,
String cmd,
ApiProxyType proxyType)
this method should only be called in endClientManagedTransaction before releaseProxy().
|
static void |
setConnectionLifespan(long newConnectionLifespan,
ARTimeUnit unit) |
void |
setGenericUserSessionInfo(ApiUserContextI context) |
static void |
setMaxConnectedServerCMTAllowed(int newMaxConnectedServerCMTAllowed) |
static void |
setServerCmtTimeout(int newServerCmtTimeout) |
public ApiProxyManager()
public ApiProxyManager(boolean proxyPoolingFlag)
public ApiProxyManager(int maxProxiesPerServerSize, int idleConnectionsPerServerSize, long connectionTimeoutT, long connectionLifespanT, ARTimeUnit unit)
public ApiProxyI getProxy(ApiUserContextI context, String proxyJRpcClazzName, String apiCmdName, ApiProxyType rpcType) throws ARException
getProxy
in interface ApiProxyManagerI
ARException
public ApiProxyI getProxy(ApiUserContextI context, Class<? extends ApiProxyI> proxyJRpcClazz, String apiCmdName, ApiProxyType rpcType) throws ARException
getProxy
in interface ApiProxyManagerI
ARException
public ApiProxyI getProxy(ApiUserContextI context) throws ARException
getProxy
in interface ApiProxyManagerI
ARException
public void releaseProxy(ApiProxyI proxy, ApiUserContextI context, Class<? extends ApiProxyI> proxyJRpcClazz, String apiCmdName, ApiProxyType rpcType)
releaseProxy
in interface ApiProxyManagerI
public void releaseProxy(ApiProxyI proxy, ApiUserContextI context, String proxyJRpcClazzName, String apiCmdName, ApiProxyType rpcType)
releaseProxy
in interface ApiProxyManagerI
public void releaseProxy(ApiProxyI proxy, ApiUserContextI context)
releaseProxy
in interface ApiProxyManagerI
public String getKeyForServer(ApiUserContextI context)
public void deRecodeProxy(ApiProxyPoolI pool, ApiProxyI proxy)
public void clear()
ProxyManager
. Connections will be terminated.clear
in interface ApiProxyManagerI
public abstract ApiProxyI createProxy(ApiUserContextI context) throws ARException
createProxy
in interface ApiProxyManagerI
ARException
public static int getMaxProxiesPerServer()
public static int getIdleConnectionsPerServer()
public static long getConnectionTimeoutMilliSec()
public static long getConnectionLifespanMilliSec()
public static void setConnectionLifespan(long newConnectionLifespan, ARTimeUnit unit)
public void adjustProxyPoolVariables(int maxProxyPerServerSize, int minIdleProxySize, long connectionTimeout2, ARTimeUnit unit)
public void checkCleanUpTimer()
public static void registerARServerUserCheck(ApiUserContextI arServerUser)
public static void deRegisterARServerUser(ApiUserContextI apiUserContextBase)
public static long getConnectionLifespan(ARTimeUnit unit)
public void deRecodeProxy(ApiUserContextI context, ApiProxyI t)
public void addCMTProxyInCMTPool(String mTransactionHandle, ApiProxyI apiProxyI, ApiUserContextI apiUserContextI, String arProxyName, String cmd, ApiProxyType proxyType) throws ARException
mTransactionHandle
- apiProxyI
- apiUserContextI
- arProxyName
- cmd
- proxyType
- ARException
public boolean removeCMTProxyFromCMTPool(String mTransactionHandle, ApiProxyI apiProxyI, ApiUserContextI apiUserContextI, String arProxyName, String cmd, ApiProxyType proxyType) throws ARException
mTransactionHandle
- apiProxyI
- apiUserContextI
- arProxyName
- cmd
- proxyType
- ARException
public static int getMaxConnectedServerCMTAllowed()
public static void setMaxConnectedServerCMTAllowed(int newMaxConnectedServerCMTAllowed)
public static void setServerCmtTimeout(int newServerCmtTimeout)
public static int getServerCmtTimeout()
public void setGenericUserSessionInfo(ApiUserContextI context)
? Copyright 2013 BMC Software, Inc.