public class MonitorCommand extends Command
Modifier and Type | Class and Description |
---|---|
static class |
MonitorCommand.Action
Describes an action to take with the MONITOR command.
|
Constructor and Description |
---|
MonitorCommand(Client client)
Constructs the command.
|
Modifier and Type | Method and Description |
---|---|
MonitorCommand |
action(MonitorCommand.Action action)
Sets the action for the command.
|
void |
execute()
Executes the command.
|
MonitorCommand |
target(Collection<String> targets)
Sets the target(s) for the command, assuming
MonitorCommand.Action.ADD_TARGET
or MonitorCommand.Action.REMOVE_TARGET . |
MonitorCommand |
target(String... targets)
Sets the target(s) for the command, assuming
MonitorCommand.Action.ADD_TARGET
or MonitorCommand.Action.REMOVE_TARGET . |
protected ToStringer |
toStringer()
Generates a partial
ToStringer for the command. |
public MonitorCommand(@Nonnull Client client)
client
- the clientIllegalArgumentException
- if client is null@Nonnull public MonitorCommand action(@Nonnull MonitorCommand.Action action)
action
- action to takeIllegalArgumentException
- for null action@Nonnull public MonitorCommand target(@Nonnull 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 target@Nonnull public 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()
Command
@Nonnull protected ToStringer toStringer()
Command
ToStringer
for the command.toStringer
in class Command
Copyright © 2013–2019 Kitteh. All rights reserved.