javax.realtime
Class BoundAsyncEventHandler

java.lang.Object
  |
  +--javax.realtime.AsyncEventHandler
        |
        +--javax.realtime.BoundAsyncEventHandler
All Implemented Interfaces:
java.lang.Runnable, Schedulable

public abstract 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.


Field Summary
protected  javax.realtime.MemoryArea area
           
protected  javax.realtime.ProcessingGroupParameters group
           
protected  java.lang.Runnable logic
           
protected  javax.realtime.MemoryParameters memory
           
protected  boolean nonHeap
           
protected  javax.realtime.ReleaseParameters release
           
protected  javax.realtime.SchedulingParameters scheduling
           
 
Fields inherited from class javax.realtime.AsyncEventHandler
currentScheduler, fireCount, memArea, memParams, nonheap
 
Constructor Summary
BoundAsyncEventHandler()
          Create a handler whose parameters are inherited from the current thread, if it is a RealtimeThread, or null otherwise.
BoundAsyncEventHandler(javax.realtime.SchedulingParameters scheduling, javax.realtime.ReleaseParameters release, javax.realtime.MemoryParameters memory, javax.realtime.MemoryArea area, javax.realtime.ProcessingGroupParameters group, boolean nonheap, java.lang.Runnable logic)
          Create a handler with the specified parameters.
 
Methods inherited from class javax.realtime.AsyncEventHandler
addIfFeasible, addToFeasibility, getAndClearPendingFireCount, getAndDecrementPendingFireCount, getAndIncrementPendingFireCount, getMemoryArea, getMemoryParameters, getPendingFireCount, getProcessingGroupParameters, getReleaseParameters, getScheduler, getSchedulingParameters, getUID, handleAsyncEvent, removeFromFeasibility, run, setIfFeasible, setIfFeasible, setIfFeasible, setMemoryParameters, setMemoryParametersIfFeasible, setProcessingGroupParameters, setProcessingGroupParametersIfFeasible, setReleaseParameters, setReleaseParametersIfFeasible, setScheduler, setScheduler, setSchedulingParameters, setSchedulingParametersIfFeasible
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

nonHeap

protected boolean nonHeap

logic

protected java.lang.Runnable logic

scheduling

protected javax.realtime.SchedulingParameters scheduling

release

protected javax.realtime.ReleaseParameters release

memory

protected javax.realtime.MemoryParameters memory

group

protected javax.realtime.ProcessingGroupParameters group

area

protected javax.realtime.MemoryArea area
Constructor Detail

BoundAsyncEventHandler

public BoundAsyncEventHandler()
Create a handler whose parameters are inherited from the current thread, if it is a RealtimeThread, or null otherwise.


BoundAsyncEventHandler

public BoundAsyncEventHandler(javax.realtime.SchedulingParameters scheduling,
                              javax.realtime.ReleaseParameters release,
                              javax.realtime.MemoryParameters memory,
                              javax.realtime.MemoryArea area,
                              javax.realtime.ProcessingGroupParameters group,
                              boolean nonheap,
                              java.lang.Runnable logic)
Create a handler with the specified parameters.

Parameters:
scheduling - A SchedulingParameters object which will be associated with the constructed instance. If null, this will be assigned the reference to the SchedulingParameters of the current thread.
release - A ReleaseParameters object which will be associated with the contructed instance. If null, this will have no ReleaseParameters.
memory - A MemoryParameters object which will be associated with the constructed instance. If null, this will have no MemoryParameters.
area - The MemoryArea for this. If null, the memory area will be that of the current thread.
group - A ProcessingGroupParameters object which will be associated with the constructed instance. 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 java.lang.Runnable object whose run() method is executed by AsyncEventHandler.handleAsyncEvent().
Throws:
java.lang.IllegalArgumentException - If the initial memory area is in heap memory, and the nonheap parameter is true.