javax.realtime
Class MonitorControl

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

public abstract class MonitorControl
extends Object

Abstract superclass for different monitor control strategies.

Since:
0.3.8
Author:
Morgan Deters

Constructor Summary
protected MonitorControl()
          Construct a MonitorControl.
 
Method Summary
static MonitorControl getMonitorControl()
          Returns the current, system-wide default monitor control strategy.
static MonitorControl getMonitorControl(Object monitor)
          Returns the monitor control strategy in use for the given object.
static MonitorControl setMonitorControl(MonitorControl policy)
          Sets the system-wide default monitor control strategy.
static MonitorControl setMonitorControl(Object monitor, MonitorControl policy)
          Sets the monitor control strategy in use for a specific object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MonitorControl

protected MonitorControl()
Construct a MonitorControl.

Method Detail

getMonitorControl

public static MonitorControl getMonitorControl()
Returns the current, system-wide default monitor control strategy.

Returns:
the current, system-wide default monitor control strategy

getMonitorControl

public static MonitorControl getMonitorControl(Object monitor)
Returns the monitor control strategy in use for the given object.

Parameters:
monitor - the Object to query
Returns:
the monitor control strategy in use for monitor
Throws:
IllegalArgumentException - if monitor is null

setMonitorControl

public static MonitorControl setMonitorControl(MonitorControl policy)
Sets the system-wide default monitor control strategy.

Parameters:
policy - the monitor control strategy to which to set the system-wide default
Returns:
the old system-wide default monitor control policy object
Throws:
SecurityException - if the current execution context is not permitted to set the system-wide default monitor control policy
IllegalArgumentException - if policy is not in immortal memory
UnsupportedOperationException - if policy is not supported by this implementation

setMonitorControl

public static MonitorControl setMonitorControl(Object monitor,
                                               MonitorControl policy)
Sets the monitor control strategy in use for a specific object. The lock on this object must be currently held by the calling thread.

Parameters:
monitor - the object for which to change the monitor control strategy object
policy - the monitor control strategy to use for the given object; if null, nothing happens
Returns:
the old monitor control policy object for monitor
Throws:
IllegalArgumentException - if monitor is null, or if policy is not in immortal memory
UnsupportedOperationException - if policy is not supported by this implementation
IllegalMonitorStateException - if the calling thread does not hold a lock on monitor


jRate is developed and maintained by the jRate project development team.
Copyright (c) 2001-2006 Angelo Corsaro and Morgan Deters.