Record Class WeatherSourceIdentity
java.lang.Object
java.lang.Record
ecmwf.ecpds.master.weather.WeatherSourceIdentity
- All Implemented Interfaces:
Serializable
public record WeatherSourceIdentity(int schemaVersion, String sourceId, UUID sourceEpoch, UUID challenge, long issuedAt, String publicKey, String signature, int collectionVersion)
extends Record
implements Serializable
Challenge-bound public identity obtained only through a subscribe-authenticated Mover callback.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class -
Constructor Summary
ConstructorsConstructorDescriptionWeatherSourceIdentity(int schemaVersion, String sourceId, UUID sourceEpoch, UUID challenge, long issuedAt, String publicKey, String signature) WeatherSourceIdentity(int schemaVersion, String sourceId, UUID sourceEpoch, UUID challenge, long issuedAt, String publicKey, String signature, int collectionVersion) Creates an instance of aWeatherSourceIdentityrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thechallengerecord component.intReturns the value of thecollectionVersionrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.longissuedAt()Returns the value of theissuedAtrecord component.Returns the value of thepublicKeyrecord component.intReturns the value of theschemaVersionrecord component.Returns the value of thesignaturerecord component.Returns the value of thesourceEpochrecord component.sourceId()Returns the value of thesourceIdrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
WeatherSourceIdentity
-
WeatherSourceIdentity
public WeatherSourceIdentity(int schemaVersion, String sourceId, UUID sourceEpoch, UUID challenge, long issuedAt, String publicKey, String signature, int collectionVersion) Creates an instance of aWeatherSourceIdentityrecord class.- Parameters:
schemaVersion- the value for theschemaVersionrecord componentsourceId- the value for thesourceIdrecord componentsourceEpoch- the value for thesourceEpochrecord componentchallenge- the value for thechallengerecord componentissuedAt- the value for theissuedAtrecord componentpublicKey- the value for thepublicKeyrecord componentsignature- the value for thesignaturerecord componentcollectionVersion- the value for thecollectionVersionrecord component
-
-
Method Details
-
verify
public PublicKey verify(String expectedSource, UUID expectedChallenge) throws GeneralSecurityException - Throws:
GeneralSecurityException
-
toString
-
hashCode
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
schemaVersion
public int schemaVersion()Returns the value of theschemaVersionrecord component.- Returns:
- the value of the
schemaVersionrecord component
-
sourceId
Returns the value of thesourceIdrecord component.- Returns:
- the value of the
sourceIdrecord component
-
sourceEpoch
Returns the value of thesourceEpochrecord component.- Returns:
- the value of the
sourceEpochrecord component
-
challenge
Returns the value of thechallengerecord component.- Returns:
- the value of the
challengerecord component
-
issuedAt
public long issuedAt()Returns the value of theissuedAtrecord component.- Returns:
- the value of the
issuedAtrecord component
-
publicKey
Returns the value of thepublicKeyrecord component.- Returns:
- the value of the
publicKeyrecord component
-
signature
Returns the value of thesignaturerecord component.- Returns:
- the value of the
signaturerecord component
-
collectionVersion
public int collectionVersion()Returns the value of thecollectionVersionrecord component.- Returns:
- the value of the
collectionVersionrecord component
-