Classes | Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Static Protected Attributes

alma.ACS.jbaci.BACIDispatchAction Class Reference

Inheritance diagram for alma.ACS.jbaci.BACIDispatchAction:
alma.ACS.jbaci.PrioritizedRunnable

List of all members.

Classes

interface  DispatchFailedListener
class  DispatchRequest

Public Member Functions

 BACIDispatchAction (CBvoid callback, CBDescIn descIn)
 BACIDispatchAction (Callback callback, CBDescIn descIn, CallbackDispatcher callbackDispatcher)
 BACIDispatchAction (CBvoid callback, CBDescIn descIn, BACIPriority priority)
 BACIDispatchAction (Callback callback, CBDescIn descIn, CallbackDispatcher callbackDispatcher, BACIPriority priority)
void dispatchWorkingRequest (Completion completion)
void dispatchWorkingRequest (Completion completion, Object value)
void dispatchDoneRequest (Completion completion)
void dispatchDoneRequest (Completion completion, Object value)
void dispatchRequest (int type, Completion completion, Object value)
BACIPriority getPriority ()
final void run ()
CBDescOut getDescOut ()
boolean isOverridePolicy ()
void setOverridePolicy (boolean b)
void setPriority (BACIPriority priority)
void addDispatchFailedListener (DispatchFailedListener listener)
void removeDispatchFailedListener (DispatchFailedListener listener)

Protected Member Functions

void dispatchRequest (DispatchRequest request)
boolean failed ()
boolean dispatch ()
void submit ()

Static Protected Member Functions

static CBDescOut generateCBDescOut (CBDescIn descIn)

Protected Attributes

BACIPriority priority
CBDescOut descOut
Callback callback
CallbackDispatcher callbackDispatcher
int failureCountLimit
int failureCount = 0
LinkedList queue = new LinkedList()
DispatchRequest pendingRequest = null
boolean submitPending = false
boolean overridePolicy = false
ArrayList< DispatchFailedListenerlisteners = new ArrayList<DispatchFailedListener>()

Static Protected Attributes

static final int DEFAULT_FAILURE_COUNT_LIMIT = 3

Detailed Description

BACI dispatch action.

Author:
Matej Sekoranja
Version:
$id$

Constructor & Destructor Documentation

alma.ACS.jbaci.BACIDispatchAction.BACIDispatchAction ( CBvoid  callback,
CBDescIn  descIn 
)

Constructor of NORMAL priority action (CBvoid callback).

Parameters:
callback action callback.
descIn action callback in descriptor.
alma.ACS.jbaci.BACIDispatchAction.BACIDispatchAction ( Callback  callback,
CBDescIn  descIn,
CallbackDispatcher  callbackDispatcher 
)

Constructor of NORMAL priority action.

Parameters:
callback action callback.
descIn action callback in descriptor.
callbackDispatcher callback dispatcher (value dependend).
alma.ACS.jbaci.BACIDispatchAction.BACIDispatchAction ( CBvoid  callback,
CBDescIn  descIn,
BACIPriority  priority 
)

Constructor.

Parameters:
callback action callback.
descIn action in descriptor.
priority action priority.
alma.ACS.jbaci.BACIDispatchAction.BACIDispatchAction ( Callback  callback,
CBDescIn  descIn,
CallbackDispatcher  callbackDispatcher,
BACIPriority  priority 
)

Constructor.

Parameters:
callback action callback.
descIn action in descriptor.
callbackDispatcher callback dispatcher (value dependend).
priority action priority.

References alma.ACS.jbaci.BACIDispatchAction.DEFAULT_FAILURE_COUNT_LIMIT, alma.ACS.jbaci.BACIDispatchAction.descOut, alma.ACS.jbaci.BACIDispatchAction.failureCountLimit, and alma.ACS.jbaci.BACIDispatchAction.generateCBDescOut().


Member Function Documentation

void alma.ACS.jbaci.BACIDispatchAction.addDispatchFailedListener ( DispatchFailedListener  listener  ) 

Add dispatch failed listener.

Parameters:
listener listener to listen failed dispatch notifications.

References alma.ACS.jbaci.BACIDispatchAction.listeners.

Referenced by alma.ACS.impl.CommonMonitorImpl.CommonMonitorImpl().

void alma.ACS.jbaci.BACIDispatchAction.dispatchDoneRequest ( Completion  completion  ) 

Added done callback request to dispatch queue.

Parameters:
completion completion.

References alma.ACS.jbaci.BACIDispatchAction.dispatchRequest().

Referenced by alma.ACS.impl.CommonMonitorImpl.retrieveValueAndDispatch().

void alma.ACS.jbaci.BACIDispatchAction.dispatchDoneRequest ( Completion  completion,
Object  value 
)

Added done callback request to dispatch queue.

Parameters:
completion completion.
value value.

References alma.ACS.jbaci.BACIDispatchAction.dispatchRequest().

void alma.ACS.jbaci.BACIDispatchAction.dispatchRequest ( int  type,
Completion  completion,
Object  value 
)
void alma.ACS.jbaci.BACIDispatchAction.dispatchRequest ( DispatchRequest  request  )  [protected]
void alma.ACS.jbaci.BACIDispatchAction.dispatchWorkingRequest ( Completion  completion,
Object  value 
)

Added working callback request to dispatch queue.

Parameters:
completion completion.

References alma.ACS.jbaci.BACIDispatchAction.dispatchRequest().

void alma.ACS.jbaci.BACIDispatchAction.dispatchWorkingRequest ( Completion  completion  ) 

Added working callback request to dispatch queue.

Parameters:
completion completion.
value value.

References alma.ACS.jbaci.BACIDispatchAction.dispatchRequest().

Referenced by alma.ACS.impl.CommonMonitorImpl.retrieveValueAndDispatch(), and alma.ACS.impl.CommonComparableMonitorImpl.valueChanged().

boolean alma.ACS.jbaci.BACIDispatchAction.failed (  )  [protected]

Call this metod to notify dispatch failure.

Returns:
true, if dispaching is to be canceled (e.g. failure counter reached its failure limit)

References alma.ACS.jbaci.BACIDispatchAction.failureCount, and alma.ACS.jbaci.BACIDispatchAction.failureCountLimit.

Referenced by alma.ACS.jbaci.BACIDispatchAction.run().

static CBDescOut alma.ACS.jbaci.BACIDispatchAction.generateCBDescOut ( CBDescIn  descIn  )  [static, protected]

Generates callback out descriptor from in descriptor.

Parameters:
descIn callback in descriptor.
Returns:
generated callback out descriptor.

Referenced by alma.ACS.jbaci.BACIDispatchAction.BACIDispatchAction().

CBDescOut alma.ACS.jbaci.BACIDispatchAction.getDescOut (  ) 

Get callback out-descriptor.

Returns:
callback out-descriptor.

References alma.ACS.jbaci.BACIDispatchAction.descOut.

BACIPriority alma.ACS.jbaci.BACIDispatchAction.getPriority (  ) 
boolean alma.ACS.jbaci.BACIDispatchAction.isOverridePolicy (  ) 

Get current override policy.

Returns:
current override policy.

References alma.ACS.jbaci.BACIDispatchAction.overridePolicy.

Referenced by alma.ACS.jbaci.BACIDispatchAction.run().

void alma.ACS.jbaci.BACIDispatchAction.removeDispatchFailedListener ( DispatchFailedListener  listener  ) 

Remove dispatch failed listener.

Parameters:
listener listener to remove.

References alma.ACS.jbaci.BACIDispatchAction.listeners.

Referenced by alma.ACS.impl.CommonMonitorImpl.destroy().

void alma.ACS.jbaci.BACIDispatchAction.setOverridePolicy ( boolean  b  ) 

Set current override policy.

Parameters:
b override policy to set.

References alma.ACS.jbaci.BACIDispatchAction.overridePolicy.

void alma.ACS.jbaci.BACIDispatchAction.setPriority ( BACIPriority  priority  ) 

Set dispatching priority.

Parameters:
priority dispatching priority to set.
void alma.ACS.jbaci.BACIDispatchAction.submit (  )  [protected]

Member Data Documentation

Callback dispatcher (used to dispatch non-CBvoid callbacks).

Referenced by alma.ACS.jbaci.BACIDispatchAction.dispatch().

Failure limit (number of retries), 0 means until successfull.

Referenced by alma.ACS.jbaci.BACIDispatchAction.BACIDispatchAction(), and alma.ACS.jbaci.BACIDispatchAction.failed().

Override policy for request queue. If true newer request will override request in the queue. If false (default) requests will form a linked list.

Referenced by alma.ACS.jbaci.BACIDispatchAction.dispatchRequest(), alma.ACS.jbaci.BACIDispatchAction.isOverridePolicy(), and alma.ACS.jbaci.BACIDispatchAction.setOverridePolicy().

Pending request. NOTE: synchronized on queue's monitor.

Referenced by alma.ACS.jbaci.BACIDispatchAction.dispatch(), and alma.ACS.jbaci.BACIDispatchAction.run().

Flag indicating pending submit. NOTE: synchronized on queue's monitor.

Referenced by alma.ACS.jbaci.BACIDispatchAction.dispatchRequest(), alma.ACS.jbaci.BACIDispatchAction.run(), and alma.ACS.jbaci.BACIDispatchAction.submit().


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Enumerations Properties