Record Class ChallengeResponse
java.lang.Object
java.lang.Record
org.apache.pulsar.client.api.v5.auth.ChallengeResponse
- Record Components:
bytes- the bytes to send in the nextCommandAuthResponse
The reply from
BinaryAuthChallengeHandler.respondToChallengeAsync(AuthenticationCallContext, AuthChallenge) — the bytes for the next
CommandAuthResponse (PIP-478).
There is no completion flag: the broker decides when the handshake is finished (it sends
CommandConnected); the implementation tracks any cross-round state of its own in the call
context's state slot. Kept as a record rather than a bare byte[] so fields can be added later
without an API break.
Ownership: the array is handed off, not copied. The handler transfers ownership of
bytes to this value on construction and the framework reads it without copying;
neither side may mutate the array afterwards. Because the component is an array, the record's
generated equals/hashCode are reference-based, not value-based; do not compare
ChallengeResponse instances for value equality.
-
Constructor Summary
ConstructorsConstructorDescriptionChallengeResponse(byte[] bytes) Creates an instance of aChallengeResponserecord class. -
Method Summary
Modifier and TypeMethodDescriptionbyte[]bytes()Returns the value of thebytesrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ChallengeResponse
public ChallengeResponse(byte[] bytes) Creates an instance of aChallengeResponserecord class.- Parameters:
bytes- the value for thebytesrecord component
-
-
Method Details
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
bytes
-