aicas logoJamaica 6.4 release 1

javax.realtime
Class BoundAsyncEventHandler

java.lang.Object
  extended by javax.realtime.AbstractAsyncEventHandler
      extended by javax.realtime.AsyncEventHandler
          extended by javax.realtime.BoundAsyncEventHandler
All Implemented Interfaces:
Runnable, BoundAbstractAsyncEventHandler, Schedulable

public class BoundAsyncEventHandler
extends AsyncEventHandler
implements BoundAbstractAsyncEventHandler

Jamaica Real-Time Specification for Java class BoundAsyncEventHandler.

An instance of this class behaves exactly as an instance of AsyncEventHandler, with the only difference being that this instance will have its own instance of RealtimeThread or NoHeapRealtimeThread associated to it.

An instance of BoundAsyncEventHandler should be used in preference to a normal AsyncEventHandler if the added timeliness by not sharing a thread with other handlers is required. A handler that may block should be of this class since it might otherwise prevent the execution of other AsyncEventHandlers that may require the same shared thread.

As long as all handlers with equal priority parameters do not block during their execution, there is no need to use BoundAsyncEventHandler for this since several threads of the same priority might block one another.


Constructor Summary
BoundAsyncEventHandler()
          Constructor to create an instance of BoundAsyncEventHandler with default parameters.
BoundAsyncEventHandler(SchedulingParameters scheduling, ReleaseParameters release, MemoryParameters memory, MemoryArea area, ProcessingGroupParameters group, boolean nonheap, Runnable logic)
          Constructor to create an instance of BoundAsyncEventHandler with the given scheduling, release, memory, memory area, processing group, noheap, and logic parameters.
 
Method Summary
 
Methods inherited from class javax.realtime.AsyncEventHandler
handleAsyncEvent, run
 
Methods inherited from class javax.realtime.AbstractAsyncEventHandler
addIfFeasible, addToFeasibility, finalize, getAndClearPendingFireCount, getAndDecrementPendingFireCount, getAndIncrementPendingFireCount, getMemoryArea, getMemoryParameters, getPendingFireCount, getProcessingGroupParameters, getReleaseParameters, getScheduler, getSchedulingParameters, isDaemon, removeFromFeasibility, 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
 
Methods inherited from interface javax.realtime.Schedulable
addIfFeasible, addToFeasibility, getMemoryParameters, getProcessingGroupParameters, getReleaseParameters, getScheduler, getSchedulingParameters, removeFromFeasibility, setIfFeasible, setIfFeasible, setIfFeasible, setIfFeasible, setIfFeasible, setMemoryParameters, setMemoryParametersIfFeasible, setProcessingGroupParameters, setProcessingGroupParametersIfFeasible, setReleaseParameters, setReleaseParametersIfFeasible, setScheduler, setScheduler, setSchedulingParameters, setSchedulingParametersIfFeasible
 

Constructor Detail

BoundAsyncEventHandler

public BoundAsyncEventHandler()
Constructor to create an instance of BoundAsyncEventHandler with default parameters. This is short-hand for new BoundAsyncEventHandler(null, null, null, null, null, false, null).


BoundAsyncEventHandler

public BoundAsyncEventHandler(SchedulingParameters scheduling,
                              ReleaseParameters release,
                              MemoryParameters memory,
                              MemoryArea area,
                              ProcessingGroupParameters group,
                              boolean nonheap,
                              Runnable logic)
Constructor to create an instance of BoundAsyncEventHandler with the given scheduling, release, memory, memory area, processing group, noheap, and logic parameters.

Parameters:
scheduling - SchedulingParameters to be associated with the new AsyncEventHandler. This can be shared with several Schedulable objects. If it is null, a copy of the creator's value will be created in the same memory area as this AEH object. If it is null and the current thread is a normal Java thread, the scheduling parameters will be set to the default priority.
release - ReleaseParameters to be associated with the new AsyncEventHandler. This can be shared with several Schedulable objects. If it is null, default release parameters will be used.
memory - MemoryParameters to be associated with new thread. May be null for unrestricted amount and rate of memory allocation for the new AEH.
area - MemoryArea to be used by the new AEH. If it is null, the current memory area of the calling thread will be used.
group - ProcessingGroupParameters to be associated with this. This can be shared with several Schedulable objects. If it is null, this will not be associated with any processing group.
nonheap - true to create an AsyncEventHandler that runs in a NoHeapRealtimeThread.
logic - Runnable to be used as the logic for this. If is is null, the run() method in this new AsyncEventHandler object will be called when the thread is started.
Throws:
IllegalArgumentException - if scheduling or release parameters are not compatible with the default scheduler, i.e., if they are non-null and not an instance of PriorityParameters or PeriodicParameters, AperiodicParameters and SporadicParameters, respectively.
IllegalAssignmentError - if scheduling, release, memory, area, group, or logic reside in memory areas whose objects cannot be referred to by this or this object resides in a memory area that cannot be referenced by scheduling, release or memory.

aicas logoJamaica 6.4 release 1

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