IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc

com.ibm.btt.sm
Class ProcessorCounter

java.lang.Object
  extended by com.ibm.btt.sm.ProcessorCounter
All Implemented Interfaces:
java.io.Serializable

public class ProcessorCounter
extends java.lang.Object
implements java.io.Serializable

This class is used to handle the multi- ajax request problem. It will maintain how many ajax operation request active in the processor. It is internal used for BTT product.

See Also:
Serialized Form

Field Summary
static int AJAX
           
static int HTML
           
static int NONE
           
 
Constructor Summary
ProcessorCounter()
           
 
Method Summary
 void addReqData(AjaxRequestData data)
           
 boolean getChannelLock(int channel)
          true means the channel get the channel locker owner, false means that the channel lock is owned by another channel.
 Semaphore getChannelLocker()
          semaphore to control the ajax or html channel request pending Warning : BTT Internal use.
 int getChannelLockOwner()
          get the owner who occupy current channel lock. value is ProcessCounter.HTML, ProcessCounter.AJAX, or ProcessCounter.NONE
 int getCount()
           
 java.lang.String getId()
          processor id
 AjaxRequestData getReqData(java.lang.String operationId)
          get AjaxRequestData or null if not find
 void releaseChannelLock(int channel)
          release pending request if the lock owner channel is the parameter channel NOTES that the channel value must be ProcessorCounter.NONE,ProcessorCounter.HTML,ProcessorCounter.AJAX
 void removeAllReqData()
          remove all AjaxRequestData from table
 void removeReqData(java.lang.String operationId)
          remove the ajaxRequestData from the table
 void setId(java.lang.String processorId)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NONE

public static int NONE

HTML

public static int HTML

AJAX

public static int AJAX
Constructor Detail

ProcessorCounter

public ProcessorCounter()
Method Detail

getId

public java.lang.String getId()
processor id

Returns:

setId

public void setId(java.lang.String processorId)

getCount

public int getCount()

getChannelLocker

public Semaphore getChannelLocker()
semaphore to control the ajax or html channel request pending Warning : BTT Internal use. This is just used to pending a request thread, the next clause expected is semaphore.waitOn() method.

Returns:

getChannelLockOwner

public int getChannelLockOwner()
get the owner who occupy current channel lock. value is ProcessCounter.HTML, ProcessCounter.AJAX, or ProcessCounter.NONE

Returns:

getChannelLock

public boolean getChannelLock(int channel)
true means the channel get the channel locker owner, false means that the channel lock is owned by another channel. NOTES that the channel value must be ProcessorCounter.NONE,ProcessorCounter.HTML,ProcessorCounter.AJAX

Parameters:
channel - ProcessorCounter.NONE,ProcessorCounter.HTML,ProcessorCounter.AJAX
time - in milli-seconds

releaseChannelLock

public void releaseChannelLock(int channel)
release pending request if the lock owner channel is the parameter channel NOTES that the channel value must be ProcessorCounter.NONE,ProcessorCounter.HTML,ProcessorCounter.AJAX

Parameters:
channel - ProcessorCounter.NONE,ProcessorCounter.HTML,ProcessorCounter.AJAX

getReqData

public AjaxRequestData getReqData(java.lang.String operationId)
get AjaxRequestData or null if not find

Parameters:
operationId -
Returns:

addReqData

public void addReqData(AjaxRequestData data)
Parameters:
data -

removeReqData

public void removeReqData(java.lang.String operationId)
remove the ajaxRequestData from the table

Parameters:
operationId -

removeAllReqData

public void removeAllReqData()
remove all AjaxRequestData from table


toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc

(c) Copyright IBM Corporation 1998, 2011