com.sapportals.portal.prt.service.jco

Interface IJCOClientPoolEntry


public interface IJCOClientPoolEntry

IJCOClientPoolEntry

An instance of this interface wraps a JCO client coming from a pool. A JCO client should be released into the pool by calling release on this pool entry if it is not used anymore. If someone does not want to return the client into the pool, delete should be called. If neither delete or release was called, the finalize method does release the JCO client into the pool.

A pool entry gets a timeout when the HTTP session timeout occurs. In this case the method isTimeoutOccurred returns true and the reason for the timeout can be obtained by calling getTimeoutReason.

If the client was created with a lifetime longer than the HTTP session timeout, it gets an additional lifetime after the HTTP session timeout has occurred. If such an additional lifetime is started, the method isExpiring returns true and the time when the actual timeout will occur can be obtained by calling getExpireTime.


Method Summary
 void delete()
          Delete should be called if the client is not needed anymore and should not be put into the pool.
 long getExpireTime()
          Returns the remaining life time of this pool entry. 0 means there is no timeout running.
 com.sap.mw.jco.JCO.Client getJCOClient()
          Returnes the enclosed JCO client.
 String getTimeoutReason()
          Returns the reason for a timeout if there was a any.
 boolean isExpiring()
          Returns true if this client pool entry will expire in some time.
 boolean isTimeoutOccurred()
          Returns true if a timeout was triggered by the JCOClientService.
 void release()
          Releases the JCO client into the pool.
 void stopAuthorizationTrace(com.sap.mw.jco.JCO.Client client)
          This method stops authorization trace for the JCO client specified.
 

Method Detail

getJCOClient

com.sap.mw.jco.JCO.Client getJCOClient()
Returnes the enclosed JCO client.


release

void release()
Releases the JCO client into the pool.


delete

void delete()
Delete should be called if the client is not needed anymore and should not be put into the pool. Calling delete calls disconnect on the JCO client.


isTimeoutOccurred

boolean isTimeoutOccurred()
Returns true if a timeout was triggered by the JCOClientService. In this case delete was called.


getTimeoutReason

String getTimeoutReason()
Returns the reason for a timeout if there was a any.


getExpireTime

long getExpireTime()
Returns the remaining life time of this pool entry. 0 means there is no timeout running.

Returns:
0 if client is not expiring; otherwise the time as long when the client will be expired.
See Also:
Date

isExpiring

boolean isExpiring()
Returns true if this client pool entry will expire in some time.


stopAuthorizationTrace

void stopAuthorizationTrace(com.sap.mw.jco.JCO.Client client)
This method stops authorization trace for the JCO client specified.

Access Rights

This class can be accessed from:


SC DC Public Part ACH
[sap.com] EP-APPS-EXT [sap.com] tc/ep/apps/ext/api api EP-PIN


Copyright 2011 SAP AG Complete Copyright Notice