P
- is the type of object this event receives when fired.public class AsyncObjectEvent<P> extends AsyncBaseEvent
AsyncEvent
Constructor and Description |
---|
AsyncObjectEvent()
Creates a new
AsyncObjectEvent instance. |
Modifier and Type | Method and Description |
---|---|
void |
fire(P value)
When enabled, fires this instance of
AsyncObjectEvent . |
addHandler, createReleaseParameters, disable, enable, handledBy, hasHandlers, isRunning, removeHandler, setHandler
public AsyncObjectEvent()
AsyncObjectEvent
instance.public void fire(P value) throws MITViolationException, EventQueueOverflowException, IllegalAssignmentError
AsyncObjectEvent
.
The asynchronous event handlers associated with this event will be
released with the object passed by fire(P)
.
When no handlers are attached or this object is disabled
the method does nothing, i.e., it skips the release.
For an instance of AsyncEvent
that has more than one instance of
AsyncEventHandler
,
AsyncEventHandler
not affected by the exception must be released
normally before the exception is propagated, and MITViolationException
has precedence over
ArrivalTimeQueueOverflowException
, which has precedence over
all others.SporadicParameters
, since
only them can MITViolationException
and
ArrivalTimeQueueOverflowException
be thrown.value
- The payload passed to the event.MITViolationException
- under the base priority
scheduler's semantics when there is a handler associated with
this event that has its MIT violated by the call to fire
(and it has set the minimum inter-arrival time violation
behavior to MITViolationExcept). Only the handlers which do
not have their MITs violated are released in this
situation.ArrivalTimeQueueOverflowException
- when the queue of
releases information, arrival time and payload,
overflows. Only the handlers which do not cause this
exception to be thrown are released in this situation.
When fire is called from the infrastructure, such as for an
ActiveEvent
, this exception is ignored.IllegalAssignmentError
- when P
is not assignable the
event queue of one of the associated handlers.EventQueueOverflowException