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

alma::ACS::impl::CommonMonitorImpl Class Reference

Inheritance diagram for alma::ACS::impl::CommonMonitorImpl:

Inheritance graph
[legend]
Collaboration diagram for alma::ACS::impl::CommonMonitorImpl:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 CommonMonitorImpl (CommonPropertyImpl property, Callback callback, CBDescIn descIn)
 CommonMonitorImpl (CommonPropertyImpl property, Callback callback, CBDescIn descIn, long startTime)
void dispatchFailed (BACIDispatchAction action, DispatchRequest failedRequest)
void schedule ()
BACIPriority getPriority ()
void timeout (long timeToRun)
void run ()
long start_time ()
void set_timer_trigger (long timeInterval)
void get_timer_trigger (LongHolder timeIntervalHolder)
synchronized void suspend ()
synchronized void resume ()
synchronized void destroy ()

Protected Member Functions

 CommonMonitorImpl ()
void initialize ()
void setTimeTrigger (long timeInterval)
void alignStartTime ()
void retrieveValueAndDispatch (long keyTime, boolean done)

Protected Attributes

Object monitorTimerTask
CommonPropertyImpl property
BACIDispatchAction dispatchAction
long timeTrigger
long startTime
boolean isSuspended
boolean isDestroyed
boolean userControlledStartTime
AtomicLong queuedKeyTime = new AtomicLong(0)

Detailed Description

Implementation of common monitor.
Author:
Matej Sekoranja
Version:
$id$


Constructor & Destructor Documentation

alma::ACS::impl::CommonMonitorImpl::CommonMonitorImpl  )  [inline, protected]
 

Default constructor.

alma::ACS::impl::CommonMonitorImpl::CommonMonitorImpl CommonPropertyImpl  property,
Callback  callback,
CBDescIn  descIn
[inline]
 

Constructor with immediate monitor notification (synchronized monitors supported).

Parameters:
property property to be monitored, non-null.
callback callback, non-null.
descIn callback in-descriptor.

alma::ACS::impl::CommonMonitorImpl::CommonMonitorImpl CommonPropertyImpl  property,
Callback  callback,
CBDescIn  descIn,
long  startTime
[inline]
 

Constructor.

Parameters:
property property to be monitored, non-null.
callback callback, non-null.
descIn callback in-descriptor.
startTime startTime (OMG time), values less or equal to current time mean immediately, value 0 means that start time should be controlled automatically (synchronized monitors).


Member Function Documentation

void alma::ACS::impl::CommonMonitorImpl::alignStartTime  )  [inline, protected]
 

If userControlledStartTime == false aligns (fixes) start time required for synchronized monitors.

synchronized void alma::ACS::impl::CommonMonitorImpl::destroy  )  [inline]
 

See also:
alma.ACS.SubscriptionOperations::destroy()

Implements alma::ACS::SubscriptionOperations.

void alma::ACS::impl::CommonMonitorImpl::dispatchFailed BACIDispatchAction  action,
DispatchRequest  failedRequest
[inline]
 

See also:
alma.ACS.jbaci.BACIDispatchAction.DispatchFailedListener::dispatchFailed(alma.ACS.jbaci.BACIDispatchAction, alma.ACS.jbaci.BACIDispatchAction.DispatchRequest)

void alma::ACS::impl::CommonMonitorImpl::get_timer_trigger LongHolder  timeIntervalHolder  )  [inline]
 

See also:
alma.ACS.MonitorOperations::get_timer_trigger(org.omg.CORBA.LongHolder)

BACIPriority alma::ACS::impl::CommonMonitorImpl::getPriority  )  [inline]
 

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

Reimplemented in alma::ACS::impl::HistoryMonitorImpl.

void alma::ACS::impl::CommonMonitorImpl::initialize  )  [inline, protected]
 

Initialize monitor.

synchronized void alma::ACS::impl::CommonMonitorImpl::resume  )  [inline]
 

See also:
alma.ACS.SubscriptionOperations::resume()

Implements alma::ACS::SubscriptionOperations.

Reimplemented in alma::ACS::impl::CommonComparableMonitorImpl.

void alma::ACS::impl::CommonMonitorImpl::retrieveValueAndDispatch long  keyTime,
boolean  done
[inline, protected]
 

Retrieve property value via cached mnemonicValue and add response to BACIDispatchAction.

Reimplemented in alma::ACS::impl::HistoryMonitorImpl.

void alma::ACS::impl::CommonMonitorImpl::run  )  [inline]
 

See also:
java.lang.Runnable#run()

void alma::ACS::impl::CommonMonitorImpl::schedule  )  [inline]
 

Schedule monitor using fixed rate interval timeTrigger starting from startTime paramterer.

void alma::ACS::impl::CommonMonitorImpl::set_timer_trigger long  timeInterval  )  [inline]
 

See also:
alma.ACS.MonitorOperations::set_timer_trigger(long)

Implements alma::ACS::MonitorOperations.

void alma::ACS::impl::CommonMonitorImpl::setTimeTrigger long  timeInterval  )  [inline, protected]
 

Set time trigger. If userControlledStartTime == false also aligns (fixes) start time required for synchronized monitors.

Parameters:
timeTtrigger time trigger (monitor interval in ms), if <= 0 monitoring is disabled but not resumed since there still might be on-change trigger enabled. timeTrigger is limited with lower bound property.min_timer_trigger().

long alma::ACS::impl::CommonMonitorImpl::start_time  )  [inline]
 

See also:
alma.ACS.MonitorOperations::start_time()

Implements alma::ACS::MonitorOperations.

synchronized void alma::ACS::impl::CommonMonitorImpl::suspend  )  [inline]
 

See also:
alma.ACS.SubscriptionOperations::suspend()

Implements alma::ACS::SubscriptionOperations.

Reimplemented in alma::ACS::impl::CommonComparableMonitorImpl.

void alma::ACS::impl::CommonMonitorImpl::timeout long  timeToRun  )  [inline]
 

Timer implementation - it stores time when triggered and delegates value retrival to BACIExecutor.

See also:
alma.ACS.jbaci.BACITimer.TimerRunnable::timeout(long)


Member Data Documentation

BACIDispatchAction alma::ACS::impl::CommonMonitorImpl::dispatchAction [protected]
 

Dispatch action.

boolean alma::ACS::impl::CommonMonitorImpl::isDestroyed [protected]
 

Destruction status.

boolean alma::ACS::impl::CommonMonitorImpl::isSuspended [protected]
 

Suspend/resume status.

Object alma::ACS::impl::CommonMonitorImpl::monitorTimerTask [protected]
 

Monitor timer task.

CommonPropertyImpl alma::ACS::impl::CommonMonitorImpl::property [protected]
 

Monitorized property.

AtomicLong alma::ACS::impl::CommonMonitorImpl::queuedKeyTime = new AtomicLong(0) [protected]
 

Key time to process, 0 means none.

long alma::ACS::impl::CommonMonitorImpl::startTime [protected]
 

Start time (java time).

long alma::ACS::impl::CommonMonitorImpl::timeTrigger [protected]
 

Time trigger (monitoring interval in ms).

boolean alma::ACS::impl::CommonMonitorImpl::userControlledStartTime [protected]
 

Start time control status.


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