|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--ks.server.processor.CommandProcessor
Standard processor of Commands. Provides stub interfaces for all command types. For an entity to process a particular command, subclass this class and provide the implementation.
The CommandProcessor is truly the central place where commands are sent. To process them, each method will speak to various managers in the server, such as the serverPluginManager, tableManager, and userManager.
Full Block component
Field Summary | |
protected IOutput |
output
CommandProcessor knows who can deliver output. |
protected java.util.ArrayList |
processors
Processors currently registered. |
protected java.util.Vector |
provided
provided set of interfaces. |
protected java.util.Vector |
required
required set of interfaces. |
Constructor Summary | |
CommandProcessor()
CommandProcessor constructor must be available for Block. |
Method Summary | |
boolean |
activate()
Activate does nothing. |
boolean |
connect(IBlock block,
java.lang.String interfaceName)
Required interfaces will be ProcessCommand entities and single IOutput We will add to our set of processors, and set Output. |
void |
deactivate()
Not much to do here. |
java.util.Enumeration |
getProvided()
We expose ProcessCommand interface. |
java.util.Enumeration |
getRequired()
We expose ProcessCommand and IOutput required interfaces. |
boolean |
process(java.lang.String userName,
Command c)
Deliver command to appropriate handlers. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected IOutput output
protected java.util.ArrayList processors
protected java.util.Vector provided
protected java.util.Vector required
Constructor Detail |
public CommandProcessor()
Method Detail |
public boolean process(java.lang.String userName, Command c)
If no processor is registered for the specific Command type, then false is returned, otherwise true.
c
- ks.common.command.Commandpublic boolean activate() throws java.lang.Exception
java.lang.Exception
edu.wpi.cs.cs509.cmi.interfaces.IBlock#activate()
public boolean connect(IBlock block, java.lang.String interfaceName) throws java.lang.Exception
java.lang.Exception
edu.wpi.cs.cs509.cmi.interfaces.IBlock#connect(edu.wpi.cs.cs509.cmi.interfaces.IBlock, java.lang.String)
public void deactivate() throws java.lang.Exception
java.lang.Exception
edu.wpi.cs.cs509.cmi.interfaces.IBlock#deactivate()
public java.util.Enumeration getProvided()
edu.wpi.cs.cs509.cmi.interfaces.IBlock#getProvided()
public java.util.Enumeration getRequired()
edu.wpi.cs.cs509.cmi.interfaces.IBlock#getRequired()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |