T - the type of the implementing class.@Immutable public abstract class AbstractThingEvent<T extends AbstractThingEvent> extends Object implements ThingEvent<T>
ThingEvent.JsonFieldsorg.eclipse.ditto.model.base.json.Jsonifiable.WithFieldSelector, org.eclipse.ditto.model.base.json.Jsonifiable.WithFieldSelectorAndPredicate<T>, 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>RESOURCE_TYPE, TYPE_PREFIX| Modifier | Constructor and Description |
|---|---|
protected |
AbstractThingEvent(String type,
String thingId,
long revision,
Instant timestamp,
org.eclipse.ditto.model.base.headers.DittoHeaders dittoHeaders)
Constructs a new
AbstractThingEvent object. |
| Modifier and Type | Method and Description |
|---|---|
protected abstract void |
appendPayloadAndBuild(org.eclipse.ditto.json.JsonObjectBuilder jsonObjectBuilder,
org.eclipse.ditto.model.base.json.JsonSchemaVersion schemaVersion,
Predicate<org.eclipse.ditto.json.JsonField> predicate)
Appends the event specific custom payload to the passed
jsonObjectBuilder. |
protected boolean |
canEqual(Object other) |
boolean |
equals(Object o) |
org.eclipse.ditto.model.base.headers.DittoHeaders |
getDittoHeaders() |
String |
getManifest() |
long |
getRevision() |
String |
getThingId()
Returns the identifier of this event's
Thing. |
Optional<Instant> |
getTimestamp() |
String |
getType() |
int |
hashCode() |
org.eclipse.ditto.json.JsonObject |
toJson(org.eclipse.ditto.model.base.json.JsonSchemaVersion schemaVersion,
Predicate<org.eclipse.ditto.json.JsonField> thePredicate) |
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitgetId, getResourceType, setDittoHeadersgetImplementedSchemaVersion, setRevision, toJsontoJson, toJsonString, toJsonStringprotected AbstractThingEvent(String type, String thingId, long revision, @Nullable Instant timestamp, org.eclipse.ditto.model.base.headers.DittoHeaders dittoHeaders)
AbstractThingEvent object.type - the type of this event.thingId - the ID of the Thing with which this event is associated.revision - the revision of the Thing.timestamp - the timestamp of the event.dittoHeaders - the headers of the command which was the cause of this event.NullPointerException - if any argument but timestamp is null.public String getType()
getType in interface org.eclipse.ditto.signals.base.WithTypegetType in interface org.eclipse.ditto.signals.events.base.Event<T extends AbstractThingEvent>public String getThingId()
Thing.getThingId in interface org.eclipse.ditto.signals.base.WithThingIdgetThingId in interface ThingEvent<T extends AbstractThingEvent>public long getRevision()
getRevision in interface org.eclipse.ditto.signals.events.base.Event<T extends AbstractThingEvent>public Optional<Instant> getTimestamp()
getTimestamp in interface org.eclipse.ditto.signals.events.base.Event<T extends AbstractThingEvent>public org.eclipse.ditto.model.base.headers.DittoHeaders getDittoHeaders()
getDittoHeaders in interface org.eclipse.ditto.model.base.headers.WithDittoHeaders<T extends AbstractThingEvent>@Nonnull public String getManifest()
getManifest in interface org.eclipse.ditto.model.base.headers.WithManifestpublic org.eclipse.ditto.json.JsonObject toJson(org.eclipse.ditto.model.base.json.JsonSchemaVersion schemaVersion,
Predicate<org.eclipse.ditto.json.JsonField> thePredicate)
toJson in interface org.eclipse.ditto.model.base.json.Jsonifiable.WithPredicate<org.eclipse.ditto.json.JsonObject,org.eclipse.ditto.json.JsonField>protected abstract void appendPayloadAndBuild(org.eclipse.ditto.json.JsonObjectBuilder jsonObjectBuilder,
org.eclipse.ditto.model.base.json.JsonSchemaVersion schemaVersion,
Predicate<org.eclipse.ditto.json.JsonField> predicate)
jsonObjectBuilder.jsonObjectBuilder - the JsonObjectBuilder to add the custom payload to.schemaVersion - the JsonSchemaVersion used in toJson().predicate - the predicate to evaluate when adding the payload.Copyright © 2017–2019 Eclipse Foundation. All rights reserved.