|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectSnacCmdFactoryList
Provides an interface for grouping a set of SNAC command factories into a
list. I can't quite remember why I didn't just use a List
or
something. :) See DefaultSnacCmdFactoryList
for a simpler way to
use SnacCmdFactoryList
s.
Constructor Summary | |
SnacCmdFactoryList()
|
Method Summary | |
SnacCmdFactory |
getFactory(CmdType type)
Returns an the SnacCmdFactory registered for the given
CmdType . |
protected void |
register(CmdType type,
SnacCmdFactory factory)
Registers the given command factory for the given command type. |
protected void |
registerAll(SnacCmdFactory factory)
Registers the given factory for all command types provided by its getSupportedTypes method. |
protected void |
unregister(CmdType type,
SnacCmdFactory factory)
Unregisters the given factory for the given SNAC command type. |
protected void |
unregisterAll()
Unregisters all SNAC factories from all registered command types. |
protected void |
unregisterAll(SnacCmdFactory factory)
Unregisters the given factory for all types for which it is currently registered. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public SnacCmdFactoryList()
Method Detail |
protected final void register(CmdType type, SnacCmdFactory factory)
getFactory(type) ==
factory
.
getSupportedTypes
method.
type
- the command type to registerfactory
- the factory to be registered with the given command typeprotected final void registerAll(SnacCmdFactory factory)
getSupportedTypes
method.
factory
- the factory to registerprotected final void unregister(CmdType type, SnacCmdFactory factory)
type
- the command type for which the given factory should be
unregisteredfactory
- the factory to unregister for the given typeprotected final void unregisterAll(SnacCmdFactory factory)
factory
- the factory to completely unregisterprotected final void unregisterAll()
public final SnacCmdFactory getFactory(CmdType type)
SnacCmdFactory
registered for the given
CmdType
. Note that this only returns exact matches, so
getFactory(new CmdType(CmdType.ALL, CmdType.ALL))
will
return null
if no factory has been registered specifically
for that command type, even though, according to the CmdType
specification, CmdType
matches
all possible command types.
type
- the command type whose associated command factory will be
returned
null
if none exists
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |