oogp2p
Class Command

java.lang.Object
  extended byoogp2p.InfoReceived
      extended byoogp2p.Command
Direct Known Subclasses:
BreadthSearchCommand, ChatCommand, ChordCommand, ChordSearchCommand, ChordStatSearchCommand, ConnectCommand, CreateChordCommand, DisplayCommand, ErrorCommand, FindUsersCommand, GetFileCommand, GetFileListingCommand, GetRecordsCommand, LoginCommand, LoginNameCommand, NewMemberCommand, PastryCommand, SearchGetFileCommand

public abstract class Command
extends InfoReceived

Author:
Chris, OogP2P This class is extends from InfoReceived and is the base class for all Commands; Commands are what the user types into the console window, thus they are a "special type" of InfoReceived objects.

Field Summary
 
Fields inherited from class oogp2p.InfoReceived
myNettableReceiver, myNettableSender
 
Constructor Summary
Command()
           
Command(Nettable n)
           
 
Method Summary
abstract  void execute()
           
 java.lang.String getUsername()
           
abstract  boolean isType(Nettable n)
           
abstract  InfoReceived makeType(Nettable n)
           
 java.lang.String recvInfo(java.io.ObjectInputStream in)
           
 void sendInfo(Nettable n, java.io.ObjectOutputStream out)
           
 void sendInfo(java.lang.String s, java.io.ObjectOutputStream out)
           
 
Methods inherited from class oogp2p.InfoReceived
getNettableReceiver, getNettableSender
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Command

public Command()

Command

public Command(Nettable n)
Method Detail

isType

public abstract boolean isType(Nettable n)
Specified by:
isType in class InfoReceived

makeType

public abstract InfoReceived makeType(Nettable n)
Specified by:
makeType in class InfoReceived

getUsername

public java.lang.String getUsername()

execute

public abstract void execute()
Specified by:
execute in class InfoReceived

recvInfo

public java.lang.String recvInfo(java.io.ObjectInputStream in)

sendInfo

public void sendInfo(java.lang.String s,
                     java.io.ObjectOutputStream out)

sendInfo

public void sendInfo(Nettable n,
                     java.io.ObjectOutputStream out)