@ParametersAreNonnullByDefault public interface CloudEventContextWriter
CloudEventContextReader to a new representation.| Modifier and Type | Method and Description |
|---|---|
default CloudEventContextWriter |
withContextAttribute(String name,
Boolean value)
Set attribute with type
Boolean attribute. |
default CloudEventContextWriter |
withContextAttribute(String name,
byte[] value)
Set attribute with a binary type.
|
default CloudEventContextWriter |
withContextAttribute(String name,
Integer value)
Set attribute with type
Integer. |
default CloudEventContextWriter |
withContextAttribute(String name,
Number value)
Deprecated.
CloudEvent specification only permits
Integer type as a
numeric value. |
default CloudEventContextWriter |
withContextAttribute(String name,
OffsetDateTime value)
Set attribute with type
OffsetDateTime attribute. |
CloudEventContextWriter |
withContextAttribute(String name,
String value)
Set attribute with type
String. |
default CloudEventContextWriter |
withContextAttribute(String name,
URI value)
Set attribute with type
URI. |
CloudEventContextWriter withContextAttribute(String name, String value) throws CloudEventRWException
String.
This setter should not be invoked for specversion, because the writer should
already know the specversion or because it doesn't need it to correctly write the value.name - name of the attributevalue - value of the attributeCloudEventRWException - if anything goes wrong while writing this attribute.IllegalArgumentException - if you're trying to set the specversion attribute.default CloudEventContextWriter withContextAttribute(String name, URI value) throws CloudEventRWException
URI.
This setter should not be invoked for specversion, because the writer should
already know the specversion or because it doesn't need it to correctly write the value.name - name of the attributevalue - value of the attributeCloudEventRWException - if anything goes wrong while writing this attribute.IllegalArgumentException - if you're trying to set the specversion attribute.default CloudEventContextWriter withContextAttribute(String name, OffsetDateTime value) throws CloudEventRWException
OffsetDateTime attribute.
This setter should not be invoked for specversion, because the writer should
already know the specversion or because it doesn't need it to correctly write the value.name - name of the attributevalue - value of the attributeCloudEventRWException - if anything goes wrong while writing this attribute.IllegalArgumentException - if you're trying to set the specversion attribute.default CloudEventContextWriter withContextAttribute(String name, Number value) throws CloudEventRWException
Integer type as a
numeric value.Number.
This setter should not be invoked for specversion, because the writer should
already know the specversion or because it doesn't need it to correctly write the value.name - name of the attributevalue - value of the attributeCloudEventRWException - if anything goes wrong while writing this extension.IllegalArgumentException - if you're trying to set the specversion attribute.default CloudEventContextWriter withContextAttribute(String name, Integer value) throws CloudEventRWException
Integer.
This setter should not be invoked for specversion, because the writer should
already know the specversion or because it doesn't need it to correctly write the value.name - name of the attributevalue - value of the attributeCloudEventRWException - if anything goes wrong while writing this extension.IllegalArgumentException - if you're trying to set the specversion attribute.default CloudEventContextWriter withContextAttribute(String name, Boolean value) throws CloudEventRWException
Boolean attribute.
This setter should not be invoked for specversion, because the writer should
already know the specversion or because it doesn't need it to correctly write the value.name - name of the attributevalue - value of the attributeCloudEventRWException - if anything goes wrong while writing this extension.IllegalArgumentException - if you're trying to set the specversion attribute.default CloudEventContextWriter withContextAttribute(String name, byte[] value) throws CloudEventRWException
name - name of the attributevalue - value of the attributeCloudEventRWException - if anything goes wrong while writing this extension.IllegalArgumentException - if you're trying to set the specversion attribute.Copyright © 2021. All rights reserved.