Class AbstractLiveCommand<T extends LiveCommand<T,B>,B extends LiveCommandAnswerBuilder>
- java.lang.Object
-
- org.eclipse.ditto.client.live.commands.base.AbstractLiveCommand<T,B>
-
- Type Parameters:
T
- the type of the LiveCommand; currently needed as return type forCommand.setDittoHeaders(DittoHeaders)
.B
- the type of the LiveCommandAnswerBuilder to be returned forLiveCommand.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 allLiveCommand
s.- 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>
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractLiveCommand(org.eclipse.ditto.base.model.signals.commands.Command<?> command)
Constructs a newAbstractLiveCommand
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
-
-
-
-
Constructor Detail
-
AbstractLiveCommand
protected AbstractLiveCommand(org.eclipse.ditto.base.model.signals.commands.Command<?> command)
Constructs a newAbstractLiveCommand
object.- Parameters:
command
- the command to be wrapped by the returned object.- Throws:
java.lang.NullPointerException
- ifcommand
isnull
.
-
-
Method Detail
-
getResourcePath
public org.eclipse.ditto.json.JsonPointer getResourcePath()
- Specified by:
getResourcePath
in interfaceorg.eclipse.ditto.base.model.signals.WithResource
-
getManifest
@Nonnull public java.lang.String getManifest()
- Specified by:
getManifest
in interfaceorg.eclipse.ditto.base.model.headers.WithManifest
-
getDittoHeaders
public org.eclipse.ditto.base.model.headers.DittoHeaders getDittoHeaders()
- Specified by:
getDittoHeaders
in interfaceorg.eclipse.ditto.base.model.headers.WithDittoHeaders
-
getType
public java.lang.String getType()
- Specified by:
getType
in interfaceorg.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 interfaceorg.eclipse.ditto.base.model.signals.commands.Command<T extends LiveCommand<T,B>>
- Specified by:
toJson
in interfaceorg.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 classjava.lang.Object
-
hashCode
public final int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
@Nonnull public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-