aicas logoJamaica 6.4 release 1

javax.realtime
Class MonitorControl

java.lang.Object
  extended by javax.realtime.MonitorControl
Direct Known Subclasses:
PriorityCeilingEmulation, PriorityInheritance

public abstract class MonitorControl
extends Object

Jamaica Real-Time Specification for Java class MonitorControl.

This is the abstract super class of the monitor control policies PriorityCeilingEmulation and PriorityInheritance.

The static methods in this class permit setting of the default monitor control policy and the policy to be used for one particular object.


Constructor Summary
protected MonitorControl()
          Default Constructor, must be called by subclasses of MonitorControl.
 
Method Summary
static MonitorControl getMonitorControl()
          getMonitorControl returns the default monitor control policy.
static MonitorControl getMonitorControl(Object monitor)
          getMonitorControl determines the monitor control associated with a given Java object.
static MonitorControl setMonitorControl(MonitorControl monCtl)
          setMonitorControl sets the default monitor control policy to the given argument.
static MonitorControl setMonitorControl(Object monitor, MonitorControl monCtl)
          setMonitorControl set the monitor control for the monitor associated with a Java object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MonitorControl

protected MonitorControl()
Default Constructor, must be called by subclasses of MonitorControl.

Method Detail

getMonitorControl

public static MonitorControl getMonitorControl(Object monitor)
getMonitorControl determines the monitor control associated with a given Java object.

Parameters:
monitor - The java object, must not be null;
Returns:
an instance of MonitorControl for the monitor semantics used by the provided object's monitor.

getMonitorControl

public static MonitorControl getMonitorControl()
getMonitorControl returns the default monitor control policy. This is PriorityInheritance.instance() unless it has been changed by setMonitorControl().

Returns:
The default monitor control policy.

setMonitorControl

public static MonitorControl setMonitorControl(MonitorControl monCtl)
setMonitorControl sets the default monitor control policy to the given argument. The argument must be null or an instance of PriorityInheritance or PriorityCeilingEmulation. If the argument is null, nothing happens. Otherwise, the default monitor control policy will be set to monCtl.

require

   ((monCtl == null) ||
    (monCtl instanceof PriorityInheritance) ||
    (monCtl instanceof PriorityCeilingEmulation))
 

ensure

   ((monCtl == null) || (getMonitorControl() == monCtl))
 

Parameters:
monCtl - The new policy.
Returns:
The old policy that was replaced, null if none.
Throws:
SecurityException - iff the caller is not permitted to set default monitor control policy.
Since:
RTSJ V1.0.1 return type changed to MonitorControl to return the old policy.

setMonitorControl

public static MonitorControl setMonitorControl(Object monitor,
                                               MonitorControl monCtl)
setMonitorControl set the monitor control for the monitor associated with a Java object. The monCtl argument must be null or an instance of PriorityInheritance or PriorityCeilingEmulation. If monCtl is null, nothing happens. Otherwise, the monitor control policy of monitor will be set to monCtl.

Parameters:
monitor - The Java object whose monitor's policy is to be changed.
monCtl - The new monitor control to be used for the Java object.
Returns:
The monitor control policy that has been replaced or null if it has not been replaced.
Since:
RTSJ V1.0.1 return type changed to MonitorControl to return the old policy.

aicas logoJamaica 6.4 release 1

aicas GmbH, Karlsruhe, Germany —www.aicas.com
Copyright © 2001-2015 aicas GmbH. All Rights Reserved.