|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object ikrs.util.AbstractCommandFactory<Command> ikrs.util.DefaultCommandFactory ikrs.httpd.ModuleCommandFactory
public class ModuleCommandFactory
Problem: the ModuleCommand/~Factory would require an HTTPHandler instance to be passed on system start. But the system instantiates the HTTPHandler at a later point by added a new handler to the yucca server. So the factory requires the handler on instantiation and vice versa. To solve this problem the handler stores the first instance that was created in a static attribute. When called the ModuleCommand tries to access this field. Warning: this only works if HTTP config uses a shared instance for _all_ listening ports. See the 'sharedHandlerInstance' attribute in the ikrs.httpd.conf file (server node). If the 'sharedHandlerInstance' is not set Yucca will create different handler instances for each 'server' tag. In this case the command will only work for the first handler instance created.
Constructor Summary | |
---|---|
ModuleCommandFactory()
|
Method Summary | |
---|---|
ModuleCommand |
make(java.lang.String name,
BasicType[] params)
Make a new Command with the given name and params. |
Methods inherited from class ikrs.util.DefaultCommandFactory |
---|
addSupportedCommand, getSupportedCommands |
Methods inherited from class ikrs.util.AbstractCommandFactory |
---|
getParentFactory, make, make, parse, setParentFactory |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface ikrs.util.CommandFactory |
---|
getParentFactory, make, parse, setParentFactory |
Constructor Detail |
---|
public ModuleCommandFactory()
Method Detail |
---|
public ModuleCommand make(java.lang.String name, BasicType[] params) throws UnknownCommandException, CommandStringIncompleteException
make
in interface CommandFactory<Command>
make
in class DefaultCommandFactory
name
- The command's name.params
- The command's params - in BasicType representation.
UnknownCommandException
CommandStringIncompleteException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |