Monitor.Omr
Class RmoImpl

java.lang.Object
  |
  +--org.omg.PortableServer.Servant
        |
        +--Monitor.Omr.RmoPOA
              |
              +--Monitor.Omr.RmoImpl
All Implemented Interfaces:
org.omg.CORBA.portable.InvokeHandler, Monitor.Omr.RmoOperations
Direct Known Subclasses:
RmoCpuImpl, RmoMemoryImpl

public abstract class RmoImpl
extends Monitor.Omr.RmoPOA

Implements the servant for the Monitor/Omr/Rmo interface. This class implements the methods described at the Monitor/Omr/Rmo interface. It is also responsible for creating the objects that a resource monitor must have, execpt the thread responsible for the specific parameter beeing monitored. Objects created:


Field Summary
protected  CurrentRange cr
           
protected  Frequency fobj
           
protected  MonitoredEntities.Entity me
           
protected  java.lang.String meid
           
protected  Notifier notifierThread
           
protected  org.omg.CORBA.ORB orb
           
protected  MonitoredEntities.Parameter par
           
protected  java.lang.String pid
           
protected  EventEvaluator.Resource.ResourceManager rManager
           
protected  org.omg.PortableServer.POA root_poa
           
protected  SuspendMonitor smonitor
           
 
Constructor Summary
RmoImpl(org.omg.CORBA.ORB orb, org.omg.PortableServer.POA root_poa, MonitoredEntities.Entity me, MonitoredEntities.Parameter par, EventEvaluator.Resource.ResourceManager rManager)
          Creates the threads and objects that compose a resource monitoring object.
 
Method Summary
 void change_frequency(int new_frequency)
          Changes the frequency used to monitor the parameter.
 int current_range()
          Returns the range in which the parameter being monitored is operating.
 int frequency()
          Returns the frequency is seconds of the monitoring process.
 MonitoredEntities.Entity me()
          Returns a reference to the entity being monitored.
 MonitoredEntities.Parameter parameter()
          Returns a reference to the parameter being monitored.
 void resume()
          Resumes the monitoring process.
 void shutdown()
          Perform the shutdown of the RMO.
 void suspend()
          Suspends the monitoring process.
 
Methods inherited from class Monitor.Omr.RmoPOA
_all_interfaces, _invoke, _this, _this
 
Methods inherited from class org.omg.PortableServer.Servant
_default_POA, _get_delegate, _get_interface, _is_a, _non_existent, _object_id, _orb, _poa, _set_delegate, _this_object, _this_object
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

orb

protected org.omg.CORBA.ORB orb

root_poa

protected org.omg.PortableServer.POA root_poa

cr

protected CurrentRange cr

fobj

protected Frequency fobj

smonitor

protected SuspendMonitor smonitor

notifierThread

protected Notifier notifierThread

par

protected MonitoredEntities.Parameter par

pid

protected java.lang.String pid

me

protected MonitoredEntities.Entity me

meid

protected java.lang.String meid

rManager

protected EventEvaluator.Resource.ResourceManager rManager
Constructor Detail

RmoImpl

public RmoImpl(org.omg.CORBA.ORB orb,
               org.omg.PortableServer.POA root_poa,
               MonitoredEntities.Entity me,
               MonitoredEntities.Parameter par,
               EventEvaluator.Resource.ResourceManager rManager)
Creates the threads and objects that compose a resource monitoring object.
Parameters:
orb - reference to the orb
root_poa - reference to the root poa
me - reference to the monitored entity
par - refernce to the parameter being monitored
rManager - reference to the event evaluator
Method Detail

parameter

public MonitoredEntities.Parameter parameter()
Returns a reference to the parameter being monitored.
Overrides:
parameter in class Monitor.Omr.RmoPOA
Returns:
reference to the parameter being monitored

me

public MonitoredEntities.Entity me()
Returns a reference to the entity being monitored.
Overrides:
me in class Monitor.Omr.RmoPOA
Returns:
reference to the entity being monitored

frequency

public int frequency()
Returns the frequency is seconds of the monitoring process.
Overrides:
frequency in class Monitor.Omr.RmoPOA
Returns:
frequency of the monitoring process

current_range

public int current_range()
Returns the range in which the parameter being monitored is operating.
Overrides:
current_range in class Monitor.Omr.RmoPOA
Returns:
range in which the parameter being monitored is operating

suspend

public void suspend()
Suspends the monitoring process.
Overrides:
suspend in class Monitor.Omr.RmoPOA

resume

public void resume()
Resumes the monitoring process.
Overrides:
resume in class Monitor.Omr.RmoPOA

change_frequency

public void change_frequency(int new_frequency)
Changes the frequency used to monitor the parameter.
Overrides:
change_frequency in class Monitor.Omr.RmoPOA
Parameters:
new_frequency - the new frequency to be used by the monitoring thread

shutdown

public void shutdown()
Perform the shutdown of the RMO.
Overrides:
shutdown in class Monitor.Omr.RmoPOA