net.sourceforge.mflow.impl
Class ComponentManagerImpl

java.lang.Object
  extended bynet.sourceforge.mflow.impl.ComponentManagerImpl
All Implemented Interfaces:
ComponentManager

public class ComponentManagerImpl
extends java.lang.Object
implements ComponentManager

A class for managing instances of MsgFlowComponent

Version:
$Revision: 1.4 $
Author:
David Carr

Method Summary
 void addComponentType(java.lang.Class ct)
          Adds a new type of component
 java.lang.Class[] getComponentTypes()
          Gets the registered component types
 MsgFlowComponent[] getInstances()
          Gets an array of the current instances of MsgFlowComponent
 MsgFolder[] getRootFolders()
          Gets the root MsgFolders
 SendFolder[] getSendFolders()
          Gets the active instances of SendFolder
 MsgFlowComponent newInstance(java.lang.Class c)
          Creates an instance of an MsgFlowComponent.
 void removeInstance(MsgFlowComponent comp)
          Removes an instance of MsgFlowComponent
 void send()
          Sends all queued messages
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

addComponentType

public void addComponentType(java.lang.Class ct)
                      throws java.lang.ClassCastException
Description copied from interface: ComponentManager
Adds a new type of component

Specified by:
addComponentType in interface ComponentManager
Parameters:
ct - the Class object for the MsgFlowComponent implementation
Throws:
java.lang.ClassCastException

newInstance

public MsgFlowComponent newInstance(java.lang.Class c)
Description copied from interface: ComponentManager
Creates an instance of an MsgFlowComponent.

Specified by:
newInstance in interface ComponentManager
Parameters:
c - the Class object for the component type
Returns:
an MsgFlowComponent of the specified type, or null on error
See Also:
ComponentManager.getComponentTypes()

getComponentTypes

public java.lang.Class[] getComponentTypes()
Description copied from interface: ComponentManager
Gets the registered component types

Specified by:
getComponentTypes in interface ComponentManager
Returns:
an array of Class objects for all known implementations of MsgFlowComponent

getInstances

public MsgFlowComponent[] getInstances()
Description copied from interface: ComponentManager
Gets an array of the current instances of MsgFlowComponent

Specified by:
getInstances in interface ComponentManager
Returns:
an array of MsgFlowComponents

removeInstance

public void removeInstance(MsgFlowComponent comp)
Description copied from interface: ComponentManager
Removes an instance of MsgFlowComponent

Specified by:
removeInstance in interface ComponentManager
Parameters:
comp - the instance to remove

getRootFolders

public MsgFolder[] getRootFolders()
Description copied from interface: ComponentManager
Gets the root MsgFolders

Specified by:
getRootFolders in interface ComponentManager
Returns:
the root MsgFolders

getSendFolders

public SendFolder[] getSendFolders()
Description copied from interface: ComponentManager
Gets the active instances of SendFolder

Specified by:
getSendFolders in interface ComponentManager
Returns:
an array of SendFolder instances

send

public void send()
Description copied from interface: ComponentManager
Sends all queued messages

Specified by:
send in interface ComponentManager


Copyright © 2002-2004 MFlow Group. All Rights Reserved.