I
- the type of the signal identifierM
- the type of the enclosed messagesC
- the type of the message context@SPI @Immutable @GeneratedMixin public interface Signal<I,M extends io.spine.base.KnownMessage,C extends io.spine.base.MessageContext> extends io.spine.base.SerializableMessage, WithActor, WithTime
A signal message travels through the system just like an electronic signal travels through a neural network. It cases the system to change its state either directly or by exciting other signals.
A signal message may originate from outside the system, from a user, or from a policy implemented in the system.
Modifier and Type | Method and Description |
---|---|
default io.spine.core.Origin |
asMessageOrigin()
Obtains this signal as an origin of other signals.
|
default C |
context()
Obtains the context of the enclosed message.
|
default M |
enclosedMessage()
Obtains the unpacked form of the enclosed message.
|
default io.spine.type.TypeUrl |
enclosedTypeUrl()
Obtains the type URL of the enclosed message.
|
C |
getContext()
Obtains the context of the enclosed message.
|
I |
getId()
Obtains the identifier of the message.
|
com.google.protobuf.Any |
getMessage()
Obtains the packed version of the enclosed message.
|
default I |
id()
Obtains the identifier of the message.
|
default boolean |
is(java.lang.Class<? extends com.google.protobuf.Message> enclosedMessageClass)
Verifies if the enclosed message has the same type as the passed, or the passed type
is the super-type of the message.
|
default io.spine.core.MessageId |
messageId()
Obtains the ID of this message.
|
java.util.Optional<io.spine.core.Origin> |
origin()
Obtains the origin of this signal.
|
default java.util.Optional<io.spine.core.MessageId> |
parent() |
io.spine.core.MessageId |
rootMessage()
Obtains the ID of the first message in the chain.
|
default java.lang.Class<? extends M> |
type()
Obtains the type of the signal as the type of the enclosed
Message . |
equals, getParserForType, hashCode, newBuilderForType, toBuilder, toString
getSerializedSize, toByteArray, toByteString, writeDelimitedTo, writeTo, writeTo
findInitializationErrors, getAllFields, getDefaultInstanceForType, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
actor, actorContext, tenant
I getId()
com.google.protobuf.Any getMessage()
Signal.enclosedMessage()
C getContext()
default I id()
default java.lang.Class<? extends M> type()
Message
.default M enclosedMessage()
Signal.getMessage()
default C context()
default io.spine.type.TypeUrl enclosedTypeUrl()
default boolean is(java.lang.Class<? extends com.google.protobuf.Message> enclosedMessageClass)
default io.spine.core.MessageId messageId()
default io.spine.core.Origin asMessageOrigin()
This origin is assigned to any signal message produced as a reaction to this one.
java.util.Optional<io.spine.core.Origin> origin()
Optional.empty()
if this signal is posted directly
by an actorio.spine.core.MessageId rootMessage()
The root message is always produced by an actor directly. Tenant and actor of the root message define the tenant and actor of the whole chain.
default java.util.Optional<io.spine.core.MessageId> parent()