public final class HappeningDispatcher extends ActiveEventDispatcher<HappeningDispatcher,Happening>
Happening
.Constructor and Description |
---|
HappeningDispatcher(SchedulingParameters schedule)
Creates a new dispatcher, whose dispatching thread runs with the given
scheduling parameters.
|
HappeningDispatcher(SchedulingParameters schedule,
RealtimeThreadGroup group)
Creates a new dispatcher, whose dispatching thread runs with the given
scheduling parameters.
|
Modifier and Type | Method and Description |
---|---|
protected void |
activate(Happening target)
Activate an active event registered with this
dispatcher.
|
protected void |
deactivate(Happening target)
Deactivate an active event registered with this dispatcher.
|
protected void |
deregister(Happening target)
Deregisters an active event from this dispatcher, breaking its
association with this dispatcher.
|
void |
destroy()
Releases all resources thereby making the dispatcher unusable.
|
static HappeningDispatcher |
getDefaultDispatcher()
Gets the system default happening dispatcher.
|
boolean |
isRegistered(Happening target)
Test wether or not a given event is registered with this
dispatcher.
|
protected void |
register(Happening target)
Registers an active event with this dispatcher.
|
static void |
setDefaultDispatcher(HappeningDispatcher dispatcher)
Sets the system default time dispatcher.
|
getRealtimeThreadGroup, getScheduler, getSchedulingParameters, getThread, setScheduler, setScheduler, setSchedulingParameters
public HappeningDispatcher(SchedulingParameters schedule, RealtimeThreadGroup group) throws StaticIllegalStateException
StaticIllegalStateException
- when the intersection of affinity
in schedule
and the affinity of group
does not
correspond to a valid affinity.schedule
- The parameters to use for scheduling this dispatcher.group
- The realtime thread group to use for the dispatcher.public HappeningDispatcher(SchedulingParameters schedule) throws StaticIllegalStateException
StaticIllegalStateException
- when the intersection of affinity
in schedule
and the affinity of the current thread grouo
does not correspond to a valid affinity.schedule
- The parameters to use for scheduling this dispatcher.public static HappeningDispatcher getDefaultDispatcher()
public static void setDefaultDispatcher(HappeningDispatcher dispatcher)
UnsupportedOperationException
- every time, since this is
not implemented yet.dispatcher
- To be used when no dispatcher is provided. When
null
, the default time dispatcher is set to the
original system default.public boolean isRegistered(Happening target)
isRegistered
in class ActiveEventDispatcher<HappeningDispatcher,Happening>
target
- The event to testtrue
when event
is registered with this
dispatcher.protected void register(Happening target) throws RegistrationException, StaticIllegalStateException
register
in class ActiveEventDispatcher<HappeningDispatcher,Happening>
RegistrationException
- when event
is already
registered.StaticIllegalStateException
- when this object has been destroyed.target
- The event to registerprotected void activate(Happening target) throws StaticIllegalStateException
activate
in class ActiveEventDispatcher<HappeningDispatcher,Happening>
StaticIllegalStateException
- when event
is
stopped.target
- The event to registerprotected void deregister(Happening target) throws DeregistrationException, StaticIllegalStateException
deregister
in class ActiveEventDispatcher<HappeningDispatcher,Happening>
StaticIllegalStateException
- when this object has been
destroyedDeregistrationException
target
- The event to deregisterprotected void deactivate(Happening target) throws StaticIllegalStateException
deactivate
in class ActiveEventDispatcher<HappeningDispatcher,Happening>
StaticIllegalStateException
- when this object has been destroyed.target
- The event to deregisterpublic void destroy() throws StaticIllegalStateException
destroy
in class ActiveEventDispatcher<HappeningDispatcher,Happening>
StaticIllegalStateException
- when called on
a dispatcher that has one or more registered Happening
objects.aicas GmbH, Karlsruhe, Germany —www.aicas.com
Copyright © 2001-2024 aicas GmbH. All Rights Reserved.