|
7.0 Action Request System Java API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.remedy.arsys.api.ProxyManager
com.remedy.arsys.api.PoolingProxyManager
ProxyManager
is a singleton factory class that provides clients with
Proxy instances. Proxies represent connections to AR System servers and
provide access to their server via the native AR System API. Proxies are
pooled by server. A client taking a proxy from the pool by calling
getProxy
must return it to the pool when done
by calling releaseProxy
and not hold
on to a reference to it.
Expired proxies in the pool will be released, terminating their connection to their AR System server, and made available for garbage collection.
Each server's ProxyPool is limited to maxPerServer
number of
connections defined in setConnectionLimits
.
The total number of connections is limited to
maxTotal
defined in setConnectionLimits
.
If allocating a new pool for a server would cause
maxTotal
to be exceeded, a new pool is not allocated and an
exception is thrown.
Nested Class Summary |
Nested classes inherited from class com.remedy.arsys.api.ProxyManager |
ProxyManager.PoolInfo |
Method Summary | |
protected void |
finalize()
Clears up all the pools for all the servers. |
Proxy |
getProxy(ARServerUser context,
boolean usingContextProxy)
Get proxy for the AR System server specified by the context. |
void |
releaseProxy(Proxy proxy,
ARServerUser context,
boolean usingContextProxy)
Return a proxy to the pool for later reuse. |
Methods inherited from class com.remedy.arsys.api.ProxyManager |
getPoolInformation, getProxyManager, setConnectionLimits, setUseConnectionPooling |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public Proxy getProxy(ARServerUser context, boolean usingContextProxy) throws ARException
releaseProxy
. 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.
getProxy
in class ProxyManager
ARException
- if proxy is not returnedpublic void releaseProxy(Proxy proxy, ARServerUser context, boolean usingContextProxy)
ProxyManager
so that
when it expires its connection can be terminated and it can be
garbage collected.
releaseProxy
in class ProxyManager
protected void finalize() throws java.lang.Throwable
finalize
method calls
the C API call ARTermination for all the connections.
java.lang.Throwable
|
7.0 Action Request System Java API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |