public enum ServerErrorCode extends Enum<ServerErrorCode>
An enum to represent the various categories of error which are specified
by the protocol. Each enum constant corresponds to a particular error code
which is transmitted to the client as the first parameter of an ERROR
command.
You should not edit this file.
Enum Constant and 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.
|
CHANNEL_DOES_NOT_EXIST
Response by the server when the channel specified in a command is not
recognized by the server.
|
COMMAND_UNSUPPORTED_BY_SERVER
Sent by the server in cases when it receives a command that it should
not received per the protocol specification.
|
INVALID_PARAMETER
Response by the server when it encounters a parameter value that is
illegal for the given command.
|
INVITE_TO_PUBLIC_CHANNEL
Response by the server when a client attempts to issue an invite to a
channel that is not invite-only.
|
NICK_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.
|
SENDER_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.
|
SENDER_NOT_INVITED
Response by the server when a client attempts to join a channel to which
he or she has not been invited.
|
SENDER_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.
|
TARGET_DOES_NOT_EXIST
Response by the server when the target specified in the command is not
registered on the server.
|
TARGET_NOT_IN_CHANNEL
Response by the server when a client attempts to send a command that
requires the target to be in particular channel, but the target is not.
|
Modifier and Type | Method and Description |
---|---|
static int |
getCode(ServerErrorCode errorCode)
Returns the numeric error code corresponding to the specified
ServerErrorCode enum constant. |
static ServerErrorCode |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static ServerErrorCode[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ServerErrorCode COMMAND_UNSUPPORTED_BY_SERVER
public static final ServerErrorCode INVALID_PARAMETER
public static final ServerErrorCode CHANNEL_DOES_NOT_EXIST
public static final ServerErrorCode TARGET_DOES_NOT_EXIST
public static final ServerErrorCode SENDER_NOT_IN_CHANNEL
public static final ServerErrorCode TARGET_NOT_IN_CHANNEL
public static final ServerErrorCode SENDER_NOT_OWNER
public static final ServerErrorCode SENDER_NOT_INVITED
public static final ServerErrorCode INVITE_TO_PUBLIC_CHANNEL
public static final ServerErrorCode NICK_ALREADY_IN_USE
public static final ServerErrorCode CHANNEL_ALREADY_EXISTS
public static ServerErrorCode[] values()
for (ServerErrorCode c : ServerErrorCode.values()) System.out.println(c);
public static ServerErrorCode valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant
with the specified nameNullPointerException
- if the argument is nullpublic static int getCode(ServerErrorCode errorCode)
ServerErrorCode
enum constant.errorCode
- the error code to look up