com.mooapi.common.command.server
Enum ServerCommandType

java.lang.Object
  extended by java.lang.Enum<ServerCommandType>
      extended by com.mooapi.common.command.server.ServerCommandType
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<ServerCommandType>

public enum ServerCommandType
extends java.lang.Enum<ServerCommandType>

MooAPI server output command type.

Author:
Steve Taylor

Enum Constant Summary
CHANNEL_JOIN_DETAILS
           
CONNECTION_DETAILS
           
CONNECTION_ID_ASSIGNED
           
CONNECTION_JOINED
           
CONNECTION_LEFT
           
CONNECTION_NAME_CHANGED
           
MESSAGE
           
MOTD
           
 
Method Summary
static ServerCommandType decode(byte encoding)
          Decode an output command type as found in a byte stream.
 byte encode()
          Encode the output command type.
static ServerCommandType valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static ServerCommandType[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

MESSAGE

public static final ServerCommandType MESSAGE

CONNECTION_LEFT

public static final ServerCommandType CONNECTION_LEFT

CONNECTION_JOINED

public static final ServerCommandType CONNECTION_JOINED

CONNECTION_DETAILS

public static final ServerCommandType CONNECTION_DETAILS

CHANNEL_JOIN_DETAILS

public static final ServerCommandType CHANNEL_JOIN_DETAILS

MOTD

public static final ServerCommandType MOTD

CONNECTION_NAME_CHANGED

public static final ServerCommandType CONNECTION_NAME_CHANGED

CONNECTION_ID_ASSIGNED

public static final ServerCommandType CONNECTION_ID_ASSIGNED
Method Detail

values

public static ServerCommandType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (ServerCommandType c : ServerCommandType.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static ServerCommandType valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null

encode

public byte encode()
Encode the output command type.

Returns:
The encoded version of this output command type.

decode

public static ServerCommandType decode(byte encoding)
Decode an output command type as found in a byte stream.

Parameters:
encoding - The encoded version of the output command type.
Returns:
The associated output command type.


Copyright © 2009. All Rights Reserved.