Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

alma::ACS::jbaci::BACIDispatchAction Class Reference

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

Inheritance graph
[legend]
Collaboration diagram for alma::ACS::jbaci::BACIDispatchAction:

Collaboration graph
[legend]
List of all members.

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

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 listeners = new ArrayList()

Static Protected Attributes

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
[inline]
 

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
[inline]
 

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
[inline]
 

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
[inline]
 

Constructor.

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


Member Function Documentation

void alma::ACS::jbaci::BACIDispatchAction::addDispatchFailedListener DispatchFailedListener  listener  )  [inline]
 

Add dispatch failed listener.

Parameters:
listener listener to listen failed dispatch notifications.

boolean alma::ACS::jbaci::BACIDispatchAction::dispatch  )  [inline, protected]
 

Dispatch method. Dispatches pendingRequest, should be non-null.

Returns:
true if successfully dispatched.

void alma::ACS::jbaci::BACIDispatchAction::dispatchDoneRequest Completion  completion,
Object  value
[inline]
 

Added done callback request to dispatch queue.

Parameters:
completion completion.
value value.

void alma::ACS::jbaci::BACIDispatchAction::dispatchDoneRequest Completion  completion  )  [inline]
 

Added done callback request to dispatch queue.

Parameters:
completion completion.

void alma::ACS::jbaci::BACIDispatchAction::dispatchRequest DispatchRequest  request  )  [inline, protected]
 

Added request to dispatch queue (internal).

void alma::ACS::jbaci::BACIDispatchAction::dispatchRequest int  type,
Completion  completion,
Object  value
[inline]
 

Added request to dispatch queue.

void alma::ACS::jbaci::BACIDispatchAction::dispatchWorkingRequest Completion  completion,
Object  value
[inline]
 

Added working callback request to dispatch queue.

Parameters:
completion completion.

void alma::ACS::jbaci::BACIDispatchAction::dispatchWorkingRequest Completion  completion  )  [inline]
 

Added working callback request to dispatch queue.

Parameters:
completion completion.
value value.

boolean alma::ACS::jbaci::BACIDispatchAction::failed  )  [inline, protected]
 

Call this metod to notify dispatch failure.

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

CBDescOut alma::ACS::jbaci::BACIDispatchAction::generateCBDescOut CBDescIn  descIn  )  [inline, static, protected]
 

Generates callback out descriptor from in descriptor.

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

CBDescOut alma::ACS::jbaci::BACIDispatchAction::getDescOut  )  [inline]
 

Get callback out-descriptor.

Returns:
callback out-descriptor.

BACIPriority alma::ACS::jbaci::BACIDispatchAction::getPriority  )  [inline]
 

See also:
alma.ACS.jbaci.PrioritizedRunnable::getPriority()

Implements alma::ACS::jbaci::PrioritizedRunnable.

boolean alma::ACS::jbaci::BACIDispatchAction::isOverridePolicy  )  [inline]
 

Get current override policy.

Returns:
current override policy.

void alma::ACS::jbaci::BACIDispatchAction::removeDispatchFailedListener DispatchFailedListener  listener  )  [inline]
 

Remove dispatch failed listener.

Parameters:
listener listener to remove.

final void alma::ACS::jbaci::BACIDispatchAction::run  )  [inline]
 

NOT TO BE CHANGED. Dispatching is done one by one - to achieve better fairness.

void alma::ACS::jbaci::BACIDispatchAction::setOverridePolicy boolean  b  )  [inline]
 

Set current override policy.

Parameters:
b override policy to set.

void alma::ACS::jbaci::BACIDispatchAction::setPriority BACIPriority  priority  )  [inline]
 

Set dispatching priority.

Parameters:
priority dispatching priority to set.

void alma::ACS::jbaci::BACIDispatchAction::submit  )  [inline, protected]
 

Sumbit action to be BACIExecutor to be executed.


Member Data Documentation

Callback alma::ACS::jbaci::BACIDispatchAction::callback [protected]
 

Callback.

CallbackDispatcher alma::ACS::jbaci::BACIDispatchAction::callbackDispatcher [protected]
 

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

final int alma::ACS::jbaci::BACIDispatchAction::DEFAULT_FAILURE_COUNT_LIMIT = 3 [static, protected]
 

Failure limit.

CBDescOut alma::ACS::jbaci::BACIDispatchAction::descOut [protected]
 

Callback out descriptor.

int alma::ACS::jbaci::BACIDispatchAction::failureCount = 0 [protected]
 

Failure count.

int alma::ACS::jbaci::BACIDispatchAction::failureCountLimit [protected]
 

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

ArrayList alma::ACS::jbaci::BACIDispatchAction::listeners = new ArrayList() [protected]
 

List of registered listeners.

boolean alma::ACS::jbaci::BACIDispatchAction::overridePolicy = false [protected]
 

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

DispatchRequest alma::ACS::jbaci::BACIDispatchAction::pendingRequest = null [protected]
 

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

BACIPriority alma::ACS::jbaci::BACIDispatchAction::priority [protected]
 

Action priority.

LinkedList alma::ACS::jbaci::BACIDispatchAction::queue = new LinkedList() [protected]
 

Ordered dispatch queue.

boolean alma::ACS::jbaci::BACIDispatchAction::submitPending = false [protected]
 

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


The documentation for this class was generated from the following file:
Generated on Thu Apr 30 02:53:26 2009 for ACS Java API by doxygen 1.3.8