public final class RealtimeSignal extends AsyncLongEvent implements ActiveEvent<RealtimeSignal,RealtimeSignalDispatcher>
ActiveEvent
subclass for defining a POSIX realtime
signal.Modifier and Type | Method and Description |
---|---|
void |
addHandler(AsyncBaseEventHandler handler)
Add a handler to the set of handlers associated with
this event.
|
static RealtimeSignal |
get(int id)
Gets a supported realtime signal by its ID.
|
static RealtimeSignal |
get(String name)
Gets a supported realtime signal by its name.
|
RealtimeSignalDispatcher |
getDispatcher()
Obtains the dispatcher for
this . |
int |
getId()
Gets the name of this realtime signal.
|
static int |
getId(String name)
Gets the ID of a supported realtime signal by its name.
|
String |
getName()
Gets the name of this signal.
|
boolean |
isActive()
Determines the activation state of this signal,
i.e., whether or not it has been started.
|
static boolean |
isPOSIXRealtimeSignal(String name)
Determines whether or not a signal with a given name is registered.
|
boolean |
isRunning()
Determines the firing state (releasing or skipping) of this signal,
i.e., whether or not is active and enabled.
|
void |
removeHandler(AsyncBaseEventHandler handler)
Remove a handler from the set associated with this event.
|
boolean |
send(long pid,
long payload)
Sends this signal to another process.
|
void |
setHandler(AsyncBaseEventHandler handler)
Associate a new handler with this event and remove all
existing handlers.
|
void |
start()
Starts this
RealtimeSignal , i.e., changes to a running state. |
void |
start(boolean disabled)
Starts this
RealtimeSignal , i.e., changes to a running state. |
boolean |
stop()
Stops this
RealtimeSignal . |
fire
createReleaseParameters, disable, enable, handledBy, hasHandlers
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
disable, enable
public static boolean isPOSIXRealtimeSignal(String name)
UnsupportedOperationException
- everytime, since this is not implemented yet.name
- The name of the signal check.true
when a signal with the given name is registered.public static int getId(String name)
UnsupportedOperationException
- everytime, since this is not implemented yet.name
- The name of the signal whose ID should be determined.name
.public static RealtimeSignal get(String name)
UnsupportedOperationException
- everytime, since this is not implemented yet.name
- The name of the signal to get.null
.public static RealtimeSignal get(int id)
UnsupportedOperationException
- everytime, since this is not implemented yet.id
- The identifier of a registered signal.public int getId()
UnsupportedOperationException
- everytime, since this is not implemented yet.public final String getName()
UnsupportedOperationException
- everytime, since this is not implemented yet.public RealtimeSignalDispatcher getDispatcher()
this
.getDispatcher
in interface Releasable<RealtimeSignal,RealtimeSignalDispatcher>
UnsupportedOperationException
- everytime, since this is not implemented yet.public boolean isActive()
isActive
in interface ActiveEvent<RealtimeSignal,RealtimeSignalDispatcher>
UnsupportedOperationException
- everytime, since this is not implemented yet.true
when active; false
otherwise.public boolean isRunning()
isRunning
in interface ActiveEvent<RealtimeSignal,RealtimeSignalDispatcher>
isRunning
in class AsyncBaseEvent
UnsupportedOperationException
- everytime, since this is not implemented yet.true
when releasing, false
when skipping.public final void start() throws StaticIllegalStateException
RealtimeSignal
, i.e., changes to a running state.
A running realtime signal is a source of activation when in a scoped memory
and is a member of the root set when in the heap. A running
realtime signal can be triggered.start
in interface ActiveEvent<RealtimeSignal,RealtimeSignalDispatcher>
StaticIllegalStateException
- when this
RealtimeSignal
has already been started.UnsupportedOperationException
- everytime, since this is not implemented yet.stop()
public final void start(boolean disabled) throws StaticIllegalStateException
RealtimeSignal
, i.e., changes to a running state.
A running realtime signal is a source of activation when in a scoped memory
and is a member of the root set when in the heap. A running
realtime signal can be triggered.start
in interface ActiveEvent<RealtimeSignal,RealtimeSignalDispatcher>
StaticIllegalStateException
- when this
RealtimeSignal
has already been started.UnsupportedOperationException
- everytime, since this is not implemented yet.disabled
- true
for starting in a disabled state.stop()
public final boolean stop() throws StaticIllegalStateException
RealtimeSignal
. A stopped realtime signal
ceases to be a source of activation and no longer causes any AE attached
to it to be a source of activation.stop
in interface ActiveEvent<RealtimeSignal,RealtimeSignalDispatcher>
StaticIllegalStateException
- when this
RealtimeSignal
is not running.UnsupportedOperationException
- everytime, since this is not implemented yet.true
when this
was
enabled; false
otherwise.public boolean send(long pid, long payload)
UnsupportedOperationException
- everytime, since this is not implemented yet.pid
- The identifier of the process to which to send the signal.payload
- The long value associated with a fire.true
when signal can be sent; otherwise false
.public void addHandler(AsyncBaseEventHandler handler)
addHandler
in class AsyncBaseEvent
UnsupportedOperationException
- everytime, since this is not implemented yet.handler
- The new handler to add to the list of
handlers already associated with this.
When handler is already associated with
the event, the call has no effectpublic void setHandler(AsyncBaseEventHandler handler)
setHandler
in class AsyncBaseEvent
UnsupportedOperationException
- everytime, since this is not implemented yet.handler
- The instance of AsyncBaseEventHandler to
be associated with this. When handler is
null then no handler will be associated
with this, i.e., behave effectively as if
setHandler(null) invokes
removeHandler(AsyncBaseEventHandler) for
each associated handler.public void removeHandler(AsyncBaseEventHandler handler)
removeHandler
in class AsyncBaseEvent
UnsupportedOperationException
- everytime, since this is not implemented yet.handler
- The handler to be disassociated from this. When
null nothing happens. When the handler is not
already associated with this then nothing happensaicas GmbH, Karlsruhe, Germany —www.aicas.com
Copyright © 2001-2019 aicas GmbH. All Rights Reserved.