javax.realtime
Class BoundAsyncEventHandler

java.lang.Object
  extended byjavax.realtime.AsyncEventHandler
      extended byjavax.realtime.BoundAsyncEventHandler
All Implemented Interfaces:
Runnable, Schedulable

public class BoundAsyncEventHandler
extends AsyncEventHandler

A bound asynchronous event handler is an asynchronous event handler that is permanently bound to a thread. Bound asynchronous event handlers are meant for use in situations where the added timeliness is worth the overhead of binding the handler to a thread.

Author:
Angelo Corsaro, Morgan Deters

Constructor Summary
BoundAsyncEventHandler()
          Creates a new BoundAsyncEventHandler instance whose SchedulingParameters are inherited from the current thread and does not have either ReleaseParameters or MemoryParameters.
BoundAsyncEventHandler(SchedulingParameters scheduling, ReleaseParameters release, MemoryParameters memory, MemoryArea area, ProcessingGroupParameters group, boolean nonheap, Runnable logic)
          Creates a new BoundAsyncEventHandler instance with the specified parameters.
 
Methods inherited from class javax.realtime.AsyncEventHandler
addIfFeasible, addToFeasibility, executionEligibility, finalize, getMemoryArea, getMemoryParameters, getProcessingGroupParameters, getReleaseParameters, getScheduler, getSchedulingParameters, handleAsyncEvent, removeFromFeasibility, run, setDaemon, setIfFeasible, setIfFeasible, setIfFeasible, setIfFeasible, setIfFeasible, setMemoryParameters, setMemoryParametersIfFeasible, setProcessingGroupParameters, setProcessingGroupParametersIfFeasible, setReleaseParameters, setReleaseParametersIfFeasible, setScheduler, setScheduler, setSchedulingParameters, setSchedulingParametersIfFeasible
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BoundAsyncEventHandler

public BoundAsyncEventHandler()
Creates a new BoundAsyncEventHandler instance whose SchedulingParameters are inherited from the current thread and does not have either ReleaseParameters or MemoryParameters.


BoundAsyncEventHandler

public BoundAsyncEventHandler(SchedulingParameters scheduling,
                              ReleaseParameters release,
                              MemoryParameters memory,
                              MemoryArea area,
                              ProcessingGroupParameters group,
                              boolean nonheap,
                              Runnable logic)
Creates a new BoundAsyncEventHandler instance with the specified parameters.

Parameters:
scheduling - a SchedulingParameters value which will be associated with the constructed instance of this. If null this will be assigned the reference to the SchedulingParameters of the current thread.
release - a ReleaseParameters value which will be associated with the constructed instance of this. If null this will have no ReleaseParameters.
memory - a MemoryParameters value which will be associated with the constructed instance of this. If null this will have no MemoryParameters.
area - The MemoryArea for this BoundAsyncEventHandler. If null, inherit the current memory area at the time of construction. The initial memory area must be a reference to a ScopedMemory or ImmortalMemory object if nonheap is true.
group - A ProcessingGroupParameters object to which this will be associated. If null this will not be associated with any processing group.
nonheap - A flag meaning, when true, that this will have characteristics identical to a NoHeapRealtimeThread. A false value means this will have characteristics identical to a RealtimeThread. If true and the current thread is not a NoHeapRealtimeThread or a RealtimeThread executing within a ScopedMemory or ImmortalMemory scope then an IllegalArgumentException is thrown.
logic - The Runnable object whose run is executed by handleAsyncEvent().
Throws:
IllegalArgumentException


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