public final class CommandEnvelope extends AbstractMessageEnvelope<io.spine.core.CommandId,io.spine.core.Command,io.spine.core.CommandContext> implements SignalEnvelope<io.spine.core.CommandId,io.spine.core.Command,io.spine.core.CommandContext>
Command
which provides convenient access to its properties.Modifier and Type | Method and Description |
---|---|
io.spine.core.Command |
command()
Obtains the enclosed command object.
|
io.spine.core.CommandContext |
context()
Obtains the command context.
|
io.spine.core.CommandId |
id()
Obtains the command ID.
|
io.spine.base.CommandMessage |
message()
Obtains the command message.
|
CommandClass |
messageClass()
Obtains the command class.
|
io.spine.type.TypeName |
messageTypeName()
Obtains
TypeName of the command message. |
static CommandEnvelope |
of(io.spine.core.Command command)
Creates an instance with the passed command.
|
io.spine.core.TenantId |
tenantId()
Obtains the tenant ID of the command.
|
equals, hashCode, outerObject, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
actorContext, asMessageOrigin, messageId
outerObject
public static CommandEnvelope of(io.spine.core.Command command)
public io.spine.core.Command command()
public io.spine.core.TenantId tenantId()
tenantId
in interface SignalEnvelope<io.spine.core.CommandId,io.spine.core.Command,io.spine.core.CommandContext>
public io.spine.core.CommandId id()
id
in interface MessageEnvelope<io.spine.core.CommandId,io.spine.core.Command,io.spine.core.CommandContext>
public io.spine.base.CommandMessage message()
message
in interface MessageEnvelope<io.spine.core.CommandId,io.spine.core.Command,io.spine.core.CommandContext>
public CommandClass messageClass()
messageClass
in interface MessageEnvelope<io.spine.core.CommandId,io.spine.core.Command,io.spine.core.CommandContext>
public io.spine.core.CommandContext context()
context
in interface MessageEnvelope<io.spine.core.CommandId,io.spine.core.Command,io.spine.core.CommandContext>
public io.spine.type.TypeName messageTypeName()
TypeName
of the command message.