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.model.base.headers.WithDittoHeaders<T>, org.eclipse.ditto.model.base.headers.WithManifest, org.eclipse.ditto.model.base.json.Jsonifiable<org.eclipse.ditto.json.JsonObject>, org.eclipse.ditto.model.base.json.Jsonifiable.WithPredicate<org.eclipse.ditto.json.JsonObject,​org.eclipse.ditto.json.JsonField>, org.eclipse.ditto.model.things.WithThingId, org.eclipse.ditto.signals.base.Signal<T>, org.eclipse.ditto.signals.base.WithId, org.eclipse.ditto.signals.base.WithName, org.eclipse.ditto.signals.base.WithResource, org.eclipse.ditto.signals.base.WithType, org.eclipse.ditto.signals.commands.base.Command<T>, LiveCommand<T,​B>

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

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

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

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

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

        TYPE_QUALIFIER
    • Constructor Summary

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

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

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

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

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

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

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

        getEntityId, getId
      • Methods inherited from interface org.eclipse.ditto.signals.base.WithResource

        getResourceType
      • Methods inherited from interface org.eclipse.ditto.model.things.WithThingId

        getThingEntityId, getThingId
    • Constructor Detail

      • AbstractLiveCommand

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

      • getResourcePath

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

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

        public org.eclipse.ditto.model.base.headers.DittoHeaders getDittoHeaders()
        Specified by:
        getDittoHeaders in interface org.eclipse.ditto.model.base.headers.WithDittoHeaders<T extends LiveCommand<T,​B>>
      • getType

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

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

        public final int hashCode()
        Overrides:
        hashCode in class Object