Sun Adapter for IMS API

com.stc.eways.ims
Class IMSClientRequestController

java.lang.Object
  extended by com.stc.eways.ims.IMSClientRequestController

public class IMSClientRequestController
extends java.lang.Object


Constructor Summary
IMSClientRequestController()
           
 
Method Summary
static boolean acquireLock(java.lang.String clientID, long waitTimeout)
          Acquires lock before processing IMS request using the supplied client ID.
static void releaseLock(java.lang.String clientID)
          Release acquired lock from previous call to acquireLock to acquire the lock for the supplied client ID.Also, notify any possible waiting thread that is waiting for the lock on that client ID.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IMSClientRequestController

public IMSClientRequestController()
Method Detail

acquireLock

public static boolean acquireLock(java.lang.String clientID,
                                  long waitTimeout)
                           throws java.lang.Exception
Acquires lock before processing IMS request using the supplied client ID. If a lock is not already created, then create the lock, acquire the lock, and register the lock with the client ID.

Parameters:
clientID - String The IMS client ID to use to create and/or acquire the lock. This is so that the same client ID used by multiple connects for multiple requests can be serialized.
waitTimeout - long The timeout in milliseconds to wait for the lock if the lock was already obtained by some other thread.
Throws:
java.lang.Exception - If failed to wait for the lock.

releaseLock

public static void releaseLock(java.lang.String clientID)
                        throws java.lang.Exception
Release acquired lock from previous call to acquireLock to acquire the lock for the supplied client ID.Also, notify any possible waiting thread that is waiting for the lock on that client ID.

Parameters:
clientID - String The client ID lock to release.
Throws:
java.lang.Exception - If no lock is has been created for the client ID.

Sun Adapter for IMS API