| 
AR System Java API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.bmc.arsys.api.ProxyManager
public abstract class ProxyManager
ProxyManager is a factory class that provides clients with Proxy
 instances. It is an abstract class that provides the interface used by clients.
 It is implemented by two concrete subclasses, DefaultProxyManager and
 PoolingProxyManager. Neither subclass has a public constructor (they are
 package-scoped) so clients cannot access their services directly. For that, they must
 call the public static method getProxyManager of
 ProxyManager.
 
Proxies represent connections to AR System servers and provide
 access to their server via the native AR System API. Proxies are optionally
 pooled by server. A client calling getProxy does not know
 whether proxies are being pooled or not, so it must return it to the
 ProxyManager when done by calling releaseProxy
 and not hold on to a reference to it. If proxies are being
 pooled this will return the proxy to the pool without terminating its
 connection. Otherwise, returning it will automatically terminiate its
 connection and make the proxy available for garbage collection.
 
The default ProxyManager returned by getProxyManager does
 not pool connections. Pooling can be initiated by by calling
 setUseConnectionPooling with argument true.
 Pooling can be stopped at any time by calling this method with argument
 false. When pooling is stopped, all connections in the
 pool will be terminated.
| Nested Class Summary | |
|---|---|
static class | 
ProxyManager.PoolInfo
 | 
| Constructor Summary | |
|---|---|
ProxyManager()
 | 
|
| Method Summary | |
|---|---|
static ProxyManager.PoolInfo[] | 
getPoolInformation()
 | 
abstract  com.bmc.arsys.api.Proxy | 
getProxy(ARServerUser context)
Get proxy for the AR Server specified by the context.  | 
static ProxyManager | 
getProxyManager()
Get the current ProxyManager instance.  | 
static Map<String,com.bmc.arsys.api.session.ARServerContext> | 
getServerContextMap()
 | 
static boolean | 
isUseConnectionPooling()
 | 
abstract  void | 
releaseProxy(com.bmc.arsys.api.Proxy proxy,
             ARServerUser context)
Return a proxy for possible later reuse.  | 
static void | 
setConnectionLimits(int maxPerServer)
Configure limits on proxy pool sizes per server when connection pooling is used.  | 
static void | 
setUseConnectionPooling(boolean usePooling)
Whether proxies are pooled or not is dynamically configurable.  | 
| Methods inherited from class java.lang.Object | 
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
|---|
public ProxyManager()
| Method Detail | 
|---|
public static ProxyManager getProxyManager()
public static void setConnectionLimits(int maxPerServer)
maxPerServer parameter decide the number of connections per server
 that the program can talk to.
 
 Calling this method over writes the configured value.
maxPerServer - Maximum number of proxy connections per serverpublic static void setUseConnectionPooling(boolean usePooling)
usePooling, - default value is truepublic static boolean isUseConnectionPooling()
public static ProxyManager.PoolInfo[] getPoolInformation()
public abstract com.bmc.arsys.api.Proxy getProxy(ARServerUser context)
                                          throws ARException
returnProxy. The proxy holds one of a limited number of
 connections to its associated server. The caller must not
 hold a reference to the proxy after returning it.
 In nested Java API calls, only the first call requests proxy from the pool and
 stores that proxy in ServerUser. All the following calls use the proxy from ServerUser.
ARException - if proxy not returned
public abstract void releaseProxy(com.bmc.arsys.api.Proxy proxy,
                                  ARServerUser context)
public static Map<String,com.bmc.arsys.api.session.ARServerContext> getServerContextMap()
  | 
AR System Java API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||