com.mooapi.common.command.server
Class AbstractServerCommand

java.lang.Object
  extended by com.mooapi.common.command.server.AbstractServerCommand
All Implemented Interfaces:
Command
Direct Known Subclasses:
ChannelDetails, ConnectionDetails, ConnectionIdAssigned, ConnectionJoined, ConnectionLeft, ConnectionNameChanged, MessageFromConnection, MessageOfTheDay

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

Common base of all MooAPI output commands.

Author:
Steve Taylor

Constructor Summary
AbstractServerCommand(ServerCommandType type)
          Initialize.
 
Method Summary
abstract  org.apache.mina.common.ByteBuffer encode()
          Encode this output command into a byte buffer.
abstract  boolean equals(java.lang.Object obj)
           
 ServerCommandType getType()
          Get this output command's type.
abstract  int hashCode()
           
abstract  java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AbstractServerCommand

public AbstractServerCommand(ServerCommandType type)
Initialize.

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

getType

public ServerCommandType getType()
Get this output command's type.

Returns:

encode

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

Returns:
The encoded buffer.

toString

public abstract java.lang.String toString()
Overrides:
toString in class java.lang.Object

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.