public class MonitorCommand extends Command<MonitorCommand>
| Modifier and Type | Class and Description |
|---|---|
static class |
MonitorCommand.Action
Describes an action to take with the MONITOR command.
|
Command.Tags| Constructor and Description |
|---|
MonitorCommand(@NonNull Client client)
Constructs the command.
|
| Modifier and Type | Method and Description |
|---|---|
@NonNull MonitorCommand |
action(@NonNull MonitorCommand.Action action)
Sets the action for the command.
|
void |
execute()
Executes the command.
|
@NonNull MonitorCommand |
target(@NonNull Collection<String> targets)
Sets the target(s) for the command, assuming
MonitorCommand.Action.ADD_TARGET
or MonitorCommand.Action.REMOVE_TARGET. |
@NonNull MonitorCommand |
target(String... targets)
Sets the target(s) for the command, assuming
MonitorCommand.Action.ADD_TARGET
or MonitorCommand.Action.REMOVE_TARGET. |
protected @NonNull ToStringer |
toStringer()
Generates a partial
ToStringer for the command. |
getClient, sendCommandLine, sendCommandLine, tags, toStringpublic MonitorCommand(@NonNull Client client)
client - the clientIllegalArgumentException - if client is nullpublic @NonNull MonitorCommand action(@NonNull MonitorCommand.Action action)
action - action to takeIllegalArgumentException - for null actionpublic @NonNull MonitorCommand target(String... targets)
MonitorCommand.Action.ADD_TARGET
or MonitorCommand.Action.REMOVE_TARGET.targets - targets to add/removeIllegalArgumentException - for \n, \r, \0, or comma in target or
null targetpublic @NonNull MonitorCommand target(@NonNull Collection<String> targets)
MonitorCommand.Action.ADD_TARGET
or MonitorCommand.Action.REMOVE_TARGET.targets - targets to add/removeIllegalArgumentException - for \n, \r, \0, or comma in target or
null targetpublic void execute()
Commandexecute in class Command<MonitorCommand>protected @NonNull ToStringer toStringer()
CommandToStringer for the command.toStringer in class Command<MonitorCommand>Copyright © 2013–2021 Kitteh. All rights reserved.