Package energy.eddie.api.agnostic
Record Class RawDataMessage
java.lang.Object
java.lang.Record
energy.eddie.api.agnostic.RawDataMessage
- Record Components:
permissionId- ID of the permission to which this record belongs to.connectionId- ConnectionId of the permission this record belongs to.dataNeedId- DataNeedId of the permission this record belongs to.dataSourceInformation- Metadata about the region connector that produced this message.timestamp- Timestamp when this message was created.rawPayload- Raw data as received from the MDA.
- All Implemented Interfaces:
MessageWithHeaders
public record RawDataMessage(String permissionId, String connectionId, String dataNeedId, DataSourceInformation dataSourceInformation, ZonedDateTime timestamp, String rawPayload)
extends Record
implements MessageWithHeaders
A record that holds the raw data as directly received from the MDA and some metadata information.
-
Constructor Summary
ConstructorsConstructorDescriptionRawDataMessage(PermissionRequest permissionRequest, String rawPayload) Utility constructor to create a RawDataMessage from a permission request and payload.RawDataMessage(String permissionId, String connectionId, String dataNeedId, DataSourceInformation dataSourceInformation, ZonedDateTime timestamp, String rawPayload) Creates an instance of aRawDataMessagerecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theconnectionIdrecord component.Returns the value of thedataNeedIdrecord component.Returns the value of thedataSourceInformationrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of thepermissionIdrecord component.Returns the value of therawPayloadrecord component.Returns the value of thetimestamprecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
RawDataMessage
Utility constructor to create a RawDataMessage from a permission request and payload. Will always use the current ZonedDateTime fortimestamp.- Parameters:
permissionRequest- used to populate all fields except timestamp and rawPayloadrawPayload- the payload
-
RawDataMessage
public RawDataMessage(String permissionId, String connectionId, String dataNeedId, DataSourceInformation dataSourceInformation, ZonedDateTime timestamp, String rawPayload) Creates an instance of aRawDataMessagerecord class.- Parameters:
permissionId- the value for thepermissionIdrecord componentconnectionId- the value for theconnectionIdrecord componentdataNeedId- the value for thedataNeedIdrecord componentdataSourceInformation- the value for thedataSourceInformationrecord componenttimestamp- the value for thetimestamprecord componentrawPayload- the value for therawPayloadrecord component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
permissionId
Returns the value of thepermissionIdrecord component.- Specified by:
permissionIdin interfaceMessageWithHeaders- Returns:
- the value of the
permissionIdrecord component
-
connectionId
Returns the value of theconnectionIdrecord component.- Specified by:
connectionIdin interfaceMessageWithHeaders- Returns:
- the value of the
connectionIdrecord component
-
dataNeedId
Returns the value of thedataNeedIdrecord component.- Specified by:
dataNeedIdin interfaceMessageWithHeaders- Returns:
- the value of the
dataNeedIdrecord component
-
dataSourceInformation
Returns the value of thedataSourceInformationrecord component.- Returns:
- the value of the
dataSourceInformationrecord component
-
timestamp
Returns the value of thetimestamprecord component.- Returns:
- the value of the
timestamprecord component
-
rawPayload
Returns the value of therawPayloadrecord component.- Returns:
- the value of the
rawPayloadrecord component
-