com.mooapi.common.command.client
Class AbstractClientCommand

java.lang.Object
  extended by com.mooapi.common.command.client.AbstractClientCommand
All Implemented Interfaces:
Command
Direct Known Subclasses:
ChannelJoin, ChannelLeave, MessageToChannel, MessageToConnection, MessageToServer, NameChange, NameSet, UnknownClientCommand

public abstract class AbstractClientCommand
extends java.lang.Object
implements Command

Common base of all MooAPI input commands.

Author:
Steve Taylor

Constructor Summary
AbstractClientCommand(ClientCommandType type)
          Initialize.
 
Method Summary
abstract  org.apache.mina.common.ByteBuffer encode()
          Encode this command to a new byte buffer.
abstract  boolean equals(java.lang.Object obj)
           
 ClientCommandType getType()
          Get this input command's type.
abstract  int hashCode()
           
abstract  java.lang.String toString()
          Ensure concrete descendants implement toString().
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AbstractClientCommand

public AbstractClientCommand(ClientCommandType type)
Initialize.

Parameters:
type - This input command's type.
Method Detail

getType

public ClientCommandType getType()
Get this input command's type.

Returns:
The input type.

encode

public abstract org.apache.mina.common.ByteBuffer encode()
Encode this command to a new byte buffer.

Parameters:
buffer -

toString

public abstract java.lang.String toString()
Ensure concrete descendants implement toString().

Overrides:
toString in class java.lang.Object
Returns:
The string describing this command.

equals

public abstract boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

hashCode

public abstract int hashCode()
Overrides:
hashCode in class java.lang.Object


Copyright © 2009. All Rights Reserved.