|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--de.anneck.jcast.sources.SourceController
The SourceController is the central point of reference to all sources. Always use the controller to create, delete, etc. all kinds of sources. The controller is implemented as a Singleton, call getInstance() to get one.
Method Summary | |
java.lang.Object |
createSource(org.apache.avalon.framework.configuration.Configuration conf,
IChannel aChannel)
Will create a new ISourceThread Instance with the Specified name. |
java.lang.Object |
createSource(java.lang.String name,
IChannel aChannel)
Will create a new ISourceThread Instance with the Specified name. |
java.lang.Thread |
createSourceThread(java.lang.String name,
IChannel aChannel)
Will create a new Thread containing an ISourceThread instance with the Specified name. |
boolean |
exists(java.lang.Object obj)
Cheacks if specified object is under my control. |
boolean |
exists(java.lang.String name)
Checks if specified name is under my control |
java.lang.Object |
get(java.lang.String name)
Returns one object, specified by key name. |
java.util.Map |
getAll()
Returns a Hashmap of all sources return All sources. |
static SourceController |
getInstance()
Returns a SourceController. |
void |
remove(ISource source)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static SourceController getInstance()
public java.lang.Thread createSourceThread(java.lang.String name, IChannel aChannel) throws JCastException
aChannel
- The IChannel
.name
- The name the ISourceThread
, and the xml-tag. Both need to be equal!public java.lang.Object createSource(org.apache.avalon.framework.configuration.Configuration conf, IChannel aChannel) throws JCastException, org.apache.avalon.framework.configuration.ConfigurationException
conf
- A configuration object, needs to contain aChannel
- The IChannel
.ISourceThread
you wanted.public java.lang.Object createSource(java.lang.String name, IChannel aChannel) throws JCastException
name
- The name the SourceThread, and the xml-tag. Both need to be equal!aChannel
- The IChannel
.ISourceThread
you wanted.public java.util.Map getAll()
getAll
in interface IController
public boolean exists(java.lang.String name)
exists
in interface IController
name
- The name of the ISourceThread
.public boolean exists(java.lang.Object obj)
exists
in interface IController
obj
- The instance of ISourceThread
you want to check.public java.lang.Object get(java.lang.String name)
get
in interface IController
name
- Key to search for. (Keys are String objects).public void remove(ISource source)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |