java.lang.Object
java.lang.Record
ch.rasc.jcentserverclient.models.Reply
public record Reply(Error error, PublishResult publish, BroadcastResult broadcast, SubscribeResult subscribe, UnsubscribeResult unsubscribe, DisconnectResult disconnect, PresenceResult presence, PresenceStatsResult presenceStats, HistoryResult history, HistoryRemoveResult historyRemove, InfoResult info, RefreshResult refresh, ChannelsResult channels)
extends Record
Reply object for batch operations.
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionReply(Error error, PublishResult publish, BroadcastResult broadcast, SubscribeResult subscribe, UnsubscribeResult unsubscribe, DisconnectResult disconnect, PresenceResult presence, PresenceStatsResult presenceStats, HistoryResult history, HistoryRemoveResult historyRemove, InfoResult info, RefreshResult refresh, ChannelsResult channels) Creates an instance of aReplyrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thebroadcastrecord component.static Reply.Builderbuilder()channels()Returns the value of thechannelsrecord component.Returns the value of thedisconnectrecord component.final booleanIndicates whether some other object is "equal to" this one.error()Returns the value of theerrorrecord component.booleanhasError()Check if the reply has an error.final inthashCode()Returns a hash code value for this object.history()Returns the value of thehistoryrecord component.Returns the value of thehistoryRemoverecord component.info()Returns the value of theinforecord component.presence()Returns the value of thepresencerecord component.Returns the value of thepresenceStatsrecord component.publish()Returns the value of thepublishrecord component.refresh()Returns the value of therefreshrecord component.Returns the value of thesubscriberecord component.final StringtoString()Returns a string representation of this record class.Returns the value of theunsubscriberecord component.
-
Constructor Details
-
Reply
public Reply(Error error, PublishResult publish, BroadcastResult broadcast, SubscribeResult subscribe, UnsubscribeResult unsubscribe, DisconnectResult disconnect, PresenceResult presence, PresenceStatsResult presenceStats, HistoryResult history, HistoryRemoveResult historyRemove, InfoResult info, RefreshResult refresh, ChannelsResult channels) Creates an instance of aReplyrecord class.- Parameters:
error- the value for theerrorrecord componentpublish- the value for thepublishrecord componentbroadcast- the value for thebroadcastrecord componentsubscribe- the value for thesubscriberecord componentunsubscribe- the value for theunsubscriberecord componentdisconnect- the value for thedisconnectrecord componentpresence- the value for thepresencerecord componentpresenceStats- the value for thepresenceStatsrecord componenthistory- the value for thehistoryrecord componenthistoryRemove- the value for thehistoryRemoverecord componentinfo- the value for theinforecord componentrefresh- the value for therefreshrecord componentchannels- the value for thechannelsrecord component
-
-
Method Details
-
builder
-
hasError
public boolean hasError()Check if the reply has an error.- Returns:
- true if there is an error, false otherwise
-
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). -
error
Returns the value of theerrorrecord component.- Returns:
- the value of the
errorrecord component
-
publish
Returns the value of thepublishrecord component.- Returns:
- the value of the
publishrecord component
-
broadcast
Returns the value of thebroadcastrecord component.- Returns:
- the value of the
broadcastrecord component
-
subscribe
Returns the value of thesubscriberecord component.- Returns:
- the value of the
subscriberecord component
-
unsubscribe
Returns the value of theunsubscriberecord component.- Returns:
- the value of the
unsubscriberecord component
-
disconnect
Returns the value of thedisconnectrecord component.- Returns:
- the value of the
disconnectrecord component
-
presence
Returns the value of thepresencerecord component.- Returns:
- the value of the
presencerecord component
-
presenceStats
Returns the value of thepresenceStatsrecord component.- Returns:
- the value of the
presenceStatsrecord component
-
history
Returns the value of thehistoryrecord component.- Returns:
- the value of the
historyrecord component
-
historyRemove
Returns the value of thehistoryRemoverecord component.- Returns:
- the value of the
historyRemoverecord component
-
info
Returns the value of theinforecord component.- Returns:
- the value of the
inforecord component
-
refresh
Returns the value of therefreshrecord component.- Returns:
- the value of the
refreshrecord component
-
channels
Returns the value of thechannelsrecord component.- Returns:
- the value of the
channelsrecord component
-