Class AbstractLiveCommand<T extends LiveCommand<T,​B>,​B extends LiveCommandAnswerBuilder>

  • Type Parameters:
    T - the type of the LiveCommand; currently needed as return type for Command.setDittoHeaders(DittoHeaders).
    B - the type of the LiveCommandAnswerBuilder to be returned for LiveCommand.answer().
    All Implemented Interfaces:
    org.eclipse.ditto.base.model.headers.DittoHeadersSettable<T>, org.eclipse.ditto.base.model.headers.WithDittoHeaders, org.eclipse.ditto.base.model.headers.WithManifest, org.eclipse.ditto.base.model.json.Jsonifiable<org.eclipse.ditto.json.JsonObject>, org.eclipse.ditto.base.model.json.Jsonifiable.WithPredicate<org.eclipse.ditto.json.JsonObject,​org.eclipse.ditto.json.JsonField>, org.eclipse.ditto.base.model.signals.commands.Command<T>, org.eclipse.ditto.base.model.signals.Signal<T>, org.eclipse.ditto.base.model.signals.WithName, org.eclipse.ditto.base.model.signals.WithResource, org.eclipse.ditto.base.model.signals.WithType, LiveCommand<T,​B>

    @ParametersAreNonnullByDefault
    @Immutable
    public abstract class AbstractLiveCommand<T extends LiveCommand<T,​B>,​B extends LiveCommandAnswerBuilder>
    extends java.lang.Object
    implements LiveCommand<T,​B>
    An abstract base implementation for all LiveCommands.
    Since:
    2.0.0
    • Nested Class Summary

      • Nested classes/interfaces inherited from interface org.eclipse.ditto.base.model.signals.commands.Command

        org.eclipse.ditto.base.model.signals.commands.Command.Category, org.eclipse.ditto.base.model.signals.commands.Command.JsonFields
      • Nested classes/interfaces inherited from interface org.eclipse.ditto.base.model.json.Jsonifiable

        org.eclipse.ditto.base.model.json.Jsonifiable.WithFieldSelector, org.eclipse.ditto.base.model.json.Jsonifiable.WithFieldSelectorAndPredicate<T extends java.lang.Object>, org.eclipse.ditto.base.model.json.Jsonifiable.WithPointer<J extends org.eclipse.ditto.json.JsonValue>, org.eclipse.ditto.base.model.json.Jsonifiable.WithPredicate<J extends org.eclipse.ditto.json.JsonValue,​T extends java.lang.Object>
    • Field Summary

      • Fields inherited from interface org.eclipse.ditto.base.model.signals.commands.Command

        TYPE_QUALIFIER
      • Fields inherited from interface org.eclipse.ditto.base.model.signals.Signal

        CHANNEL_LIVE, CHANNEL_TWIN
      • Fields inherited from interface org.eclipse.ditto.base.model.signals.WithType

        MESSAGES_COMMAND_RESPONSES_PREFIX, MESSAGES_COMMANDS_PREFIX, POLICY_ANNOUNCEMENT_PREFIX, THINGS_COMMAND_RESPONSES_PREFIX, THINGS_COMMANDS_PREFIX, THINGS_EVENTS_PREFIX
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected AbstractLiveCommand​(org.eclipse.ditto.base.model.signals.commands.Command<?> command)
      Constructs a new AbstractLiveCommand object.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object o)  
      org.eclipse.ditto.base.model.headers.DittoHeaders getDittoHeaders()  
      java.lang.String getManifest()  
      org.eclipse.ditto.json.JsonPointer getResourcePath()  
      java.lang.String getType()  
      int hashCode()  
      org.eclipse.ditto.json.JsonObject toJson​(org.eclipse.ditto.base.model.json.JsonSchemaVersion schemaVersion, java.util.function.Predicate<org.eclipse.ditto.json.JsonField> predicate)  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface org.eclipse.ditto.base.model.signals.commands.Command

        getCategory, getImplementedSchemaVersion, getTypePrefix, setDittoHeaders, toJson
      • Methods inherited from interface org.eclipse.ditto.base.model.json.Jsonifiable

        getLatestSchemaVersion, getSupportedSchemaVersions, implementsSchemaVersion, implementsSchemaVersion, toJsonString
      • Methods inherited from interface org.eclipse.ditto.base.model.json.Jsonifiable.WithPredicate

        toJson, toJsonString, toJsonString
      • Methods inherited from interface org.eclipse.ditto.client.live.commands.base.LiveCommand

        answer
      • Methods inherited from interface org.eclipse.ditto.base.model.signals.Signal

        getName
      • Methods inherited from interface org.eclipse.ditto.base.model.signals.WithResource

        getResourceType
    • Constructor Detail

      • AbstractLiveCommand

        protected AbstractLiveCommand​(org.eclipse.ditto.base.model.signals.commands.Command<?> command)
        Constructs a new AbstractLiveCommand object.
        Parameters:
        command - the command to be wrapped by the returned object.
        Throws:
        java.lang.NullPointerException - if command is null.
    • Method Detail

      • getResourcePath

        public org.eclipse.ditto.json.JsonPointer getResourcePath()
        Specified by:
        getResourcePath in interface org.eclipse.ditto.base.model.signals.WithResource
      • getManifest

        @Nonnull
        public java.lang.String getManifest()
        Specified by:
        getManifest in interface org.eclipse.ditto.base.model.headers.WithManifest
      • getDittoHeaders

        public org.eclipse.ditto.base.model.headers.DittoHeaders getDittoHeaders()
        Specified by:
        getDittoHeaders in interface org.eclipse.ditto.base.model.headers.WithDittoHeaders
      • getType

        public java.lang.String getType()
        Specified by:
        getType in interface org.eclipse.ditto.base.model.signals.WithType
      • toJson

        public org.eclipse.ditto.json.JsonObject toJson​(org.eclipse.ditto.base.model.json.JsonSchemaVersion schemaVersion,
                                                        java.util.function.Predicate<org.eclipse.ditto.json.JsonField> predicate)
        Specified by:
        toJson in interface org.eclipse.ditto.base.model.signals.commands.Command<T extends LiveCommand<T,​B>>
        Specified by:
        toJson in interface org.eclipse.ditto.base.model.json.Jsonifiable.WithPredicate<T extends LiveCommand<T,​B>,​B extends LiveCommandAnswerBuilder>
      • equals

        public final boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public final int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        @Nonnull
        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object