public interface ServerMessage
Modifier and Type | Interface and Description |
---|---|
static interface |
ServerMessage.NumericCommandServerMessage
Represents a message with a numeric command.
|
static interface |
ServerMessage.StringCommandServerMessage
Represents a message with a String command.
|
Modifier and Type | Method and Description |
---|---|
String |
getMessage()
Gets the full content of the line sent by the server, minus linebreak
characters \r and \n.
|
default Optional<MessageTag> |
getTag(String name)
Gets the named tag if present
|
default <Tag extends MessageTag> |
getTag(String name,
Class<Tag> clazz)
Gets the named message tag if present and if of the specified type.
|
List<MessageTag> |
getTags()
Gets the processed message tags, if any, contained in the message.
|
@Nonnull String getMessage()
@Nonnull List<MessageTag> getTags()
default Optional<MessageTag> getTag(@Nonnull String name)
name
- tag name@Nonnull default <Tag extends MessageTag> Optional<Tag> getTag(@Nonnull String name, @Nonnull Class<Tag> clazz)
Tag
- message tag typename
- message tag nameclazz
- message tag typeCopyright © 2013–2019 Kitteh. All rights reserved.