java.lang.Object javax.realtime.AsyncEventHandler javax.realtime.BoundAsyncEventHandler
A bound asynchronous event handler is an instance of AsyncEventHandler
that
is permanently bound to a dedicated real-time thread. Bound asynchronous event
handlers are for use in situations where the added timeliness is worth the
overhead of dedicating an individual real-time thread to the handler. Individual server real-time
threads can only be dedicated to a single bound event handler.
Constructor Summary | |
BoundAsyncEventHandler()
Create an instance of BoundAsyncEventHandler using default values.
|
|
BoundAsyncEventHandler(SchedulingParameters scheduling,
ReleaseParameters release,
MemoryParameters memory,
MemoryArea area,
ProcessingGroupParameters group,
boolean nonheap,
java.lang.Runnable logic)
Create an instance of BoundAsyncEventHandler with the specified parameters. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public BoundAsyncEventHandler()
BoundAsyncEventHandler
using default values.
This constructor is equivalent to
BoundAsyncEventHandler(null, null, null, null, null, false, null)
public BoundAsyncEventHandler(SchedulingParameters scheduling, ReleaseParameters release, MemoryParameters memory, MemoryArea area, ProcessingGroupParameters group, boolean nonheap, java.lang.Runnable logic)
BoundAsyncEventHandler
with the specified parameters.
scheduling
- A SchedulingParameters
object which will be associated with the
constructed instance.
If null, and the creator is a Java thread, a SchedulingParameters
object is
created which has the default SchedulingParameters
for the scheduler
associated with the current thread.
If null, and the creator is a schedulable object,
the SchedulingParameters
are inherited from the current schedulable
object (a new SchedulingParameters
object
is cloned).release
- A ReleaseParameters
object which will be associated with
the constructed instance. If null, this
will have default
ReleaseParameters
for the BAEH's scheduler.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/schedulable object.group
- A ProcessingGroupParameters
object which will be associated
with the constructed instance. If null, this
will not be
associated with any processing group.logic
- The Runnable
object whose run()
method
is executed by AsyncEventHandler.handleAsyncEvent()
.
If null, the logic will
default to the BAEH's run
method.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/schedulable object is not executing within a
ScopedMemory
or ImmortalMemory
scope then an IllegalArgumentException
is thrown.
java.lang.IllegalArgumentException
- Thrown if the initial memory area is in heap
memory, and the noheap
parameter is true.