public enum ServerResponse extends java.lang.Enum<ServerResponse>
ServerResponse
is an enumerated type that lists all possible
response codes a server can send to a client. Each response has
both a string and integer representation.
You do not need to modify this file.Enum Constant | Description |
---|---|
CHANNEL_ALREADY_EXISTS |
Response by the server when a client attempts to create a
channel whose name is already used by another channel on the
server.
|
INVALID_NAME |
Response by the server when a user tries to change his/her
nickname to an invalid string.
|
INVITE_TO_PUBLIC_CHANNEL |
Response by the server when a client attempts to issue an
invite to a channel that is not invite-only.
|
JOIN_PRIVATE_CHANNEL |
Response by the server when a client attempts to join a channel
to which he or she has not been invited.
|
NAME_ALREADY_IN_USE |
Response by the server when a client attempts to change his or
her nick to a nickname that is already in use by another user.
|
NO_SUCH_CHANNEL |
Response by the server when the channel specified in a command
is not recognized by the server.
|
NO_SUCH_USER |
Response by the server when the target specified in the command
is not registered on the server.
|
OKAY |
Response indicating no error has occurred.
|
USER_NOT_IN_CHANNEL |
Response by the server when a client attempts to send a command
requiring the sender to be in the specified channel to a
channel in which he or she is not a member.
|
USER_NOT_OWNER |
Response by the server when a client which does not own a
channel attempts to send a command that is restricted to the
owner; currently, the only such command is KICK.
|
Modifier and Type | Method | Description |
---|---|---|
int |
getCode() |
|
static ServerResponse |
valueOf(java.lang.String name) |
Returns the enum constant of this type with the specified name.
|
static ServerResponse[] |
values() |
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ServerResponse OKAY
public static final ServerResponse INVALID_NAME
public static final ServerResponse NO_SUCH_CHANNEL
public static final ServerResponse NO_SUCH_USER
public static final ServerResponse USER_NOT_IN_CHANNEL
public static final ServerResponse USER_NOT_OWNER
public static final ServerResponse JOIN_PRIVATE_CHANNEL
public static final ServerResponse INVITE_TO_PUBLIC_CHANNEL
public static final ServerResponse NAME_ALREADY_IN_USE
public static final ServerResponse CHANNEL_ALREADY_EXISTS
public static ServerResponse[] values()
for (ServerResponse c : ServerResponse.values()) System.out.println(c);
public static ServerResponse valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic int getCode()