Record Class TransportState
java.lang.Object
java.lang.Record
com.iizix.server.push.engine.transport.TransportState
- Record Components:
configured- true when a send can be attempted.reason- Why not, whenconfiguredis false; null otherwise.
Whether a transport can send for an application, and when not, why.
There is one "cannot" state. A held transport (APNS) and an application with no key material both report configured=false; only the reason string differs (ruling 1, 2026-09-06).
- Author:
- Christopher Mindus
Field Summary
FieldsConstructor Summary
ConstructorsConstructorDescriptionTransportState(boolean configured, String reason) Creates an instance of aTransportStaterecord class.Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the value of theconfiguredrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.static TransportStatenotConfigured(String reason) Creates a not-configured state.reason()Returns the value of thereasonrecord component.final StringtoString()Returns a string representation of this record class.
Field Details
CONFIGURED
The configured state.
Constructor Details
TransportState
Creates an instance of aTransportStaterecord class.- Parameters:
configured- the value for theconfiguredrecord componentreason- the value for thereasonrecord component
Method Details
notConfigured
Creates a not-configured state.- Parameters:
reason- The reason, never null.- Returns:
- The state.
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.configured
public boolean configured()Returns the value of theconfiguredrecord component.- Returns:
- the value of the
configuredrecord component
reason