Interface Adaptable
-
- All Superinterfaces:
org.eclipse.ditto.model.base.headers.WithDittoHeaders<Adaptable>
- All Known Subinterfaces:
JsonifiableAdaptable
public interface Adaptable extends org.eclipse.ditto.model.base.headers.WithDittoHeaders<Adaptable>
AnAdaptable
can be mapped to and from aCommand
,CommandResponse
orEvent
.
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
containsHeaderForKey(CharSequence key)
Indicates whether this Adaptable contains a header with the specified key.Optional<org.eclipse.ditto.model.base.headers.DittoHeaders>
getHeaders()
Returns theDittoHeaders
of thisAdaptable
if present.Payload
getPayload()
Returns thePayload
of thisAdaptable
.TopicPath
getTopicPath()
Returns theTopicPath
of thisAdaptable
.static AdaptableBuilder
newBuilder(TopicPath topicPath)
Returns a mutable builder to create immutableAdaptable
instances for a giventopicPath
.
-
-
-
Method Detail
-
newBuilder
static AdaptableBuilder newBuilder(TopicPath topicPath)
Returns a mutable builder to create immutableAdaptable
instances for a giventopicPath
.- Parameters:
topicPath
- the topic path.- Returns:
- the builder.
- Throws:
NullPointerException
- iftopicPath
isnull
.
-
getTopicPath
TopicPath getTopicPath()
Returns theTopicPath
of thisAdaptable
.- Returns:
- the topic path.
-
getPayload
Payload getPayload()
Returns thePayload
of thisAdaptable
.- Returns:
- the payload.
-
getHeaders
Optional<org.eclipse.ditto.model.base.headers.DittoHeaders> getHeaders()
Returns theDittoHeaders
of thisAdaptable
if present.- Returns:
- the optional headers.
-
containsHeaderForKey
boolean containsHeaderForKey(CharSequence key)
Indicates whether this Adaptable contains a header with the specified key.- Parameters:
key
- the key to be looked up.- Returns:
true
if this Adaptable contains a header with keykey
.
-
-