java.lang.Object
java.lang.Record
nl.andrewl.concord_core.msg.types.ServerMetaData
- All Implemented Interfaces:
Message
public record ServerMetaData(String name, ServerMetaData.ChannelData[] channels)
extends Record
implements Message
Metadata is sent by the server to clients to inform them of the structure of
the server. This includes basic information about the server's own properties
as well as information about all top-level channels.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final record
Metadata about a top-level channel in the server which is visible and joinable for a user. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ServerMetaData.ChannelData[]
The field for thechannels
record component.private final String
The field for thename
record component. -
Constructor Summary
ConstructorsConstructorDescriptionServerMetaData
(String name, ServerMetaData.ChannelData[] channels) Creates an instance of aServerMetaData
record class. -
Method Summary
Modifier and TypeMethodDescriptionchannels()
Returns the value of thechannels
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.name()
Returns the value of thename
record component.final String
toString()
Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface nl.andrewl.concord_core.msg.Message
byteSize, getTypeSerializer
-
Field Details
-
name
The field for thename
record component. -
channels
The field for thechannels
record component.
-
-
Constructor Details
-
ServerMetaData
Creates an instance of aServerMetaData
record class.- Parameters:
name
- the value for thename
record componentchannels
- the value for thechannels
record 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)
. -
name
Returns the value of thename
record component.- Returns:
- the value of the
name
record component
-
channels
Returns the value of thechannels
record component.- Returns:
- the value of the
channels
record component
-