Package jadex.core
Interface IComponentManager
- All Known Implementing Classes:
ComponentManager
public interface IComponentManager
Interface providing configuration options and general information for supporting components.
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddExceptionHandler(ComponentIdentifier cid, Class<? extends Exception> clazz, boolean exactmatch, BiConsumer<? extends Exception, IComponent> handler) voidaddExceptionHandler(Class<?> type, Class<? extends Exception> clazz, boolean exactmatch, BiConsumer<? extends Exception, IComponent> handler) voidaddExceptionHandler(Class<? extends Exception> clazz, boolean exactmatch, BiConsumer<? extends Exception, IComponent> handler) static IComponentManagerget()Returns the component manager instance.Get a running component.intGet the number of current components.voidremoveExceptionHandler(Object key, Class<? extends Exception> clazz) voidsetClassLoader(ClassLoader classloader) Sets the class loader used by components.voidsetComponentIdNumberMode(boolean cidnumbermode) Configure if numbers instead words should be used as automatically generated component names.voidsetDebug(boolean debug) Turns on debug messages globally.
-
Method Details
-
get
Returns the component manager instance.- Returns:
- The component manager instance.
-
setClassLoader
Sets the class loader used by components.- Parameters:
classloader- The class loader that components should use.
-
setComponentIdNumberMode
void setComponentIdNumberMode(boolean cidnumbermode) Configure if numbers instead words should be used as automatically generated component names.- Parameters:
cidnumbermode- True, if automatically generated names should be numbers.
-
setDebug
void setDebug(boolean debug) Turns on debug messages globally.- Parameters:
debug- If true, debug messages are emitted globally.
-
getComponent
Get a running component.- Throws:
IllegalArgumentException- when the component does not exist.
-
getNumberOfComponents
int getNumberOfComponents()Get the number of current components. -
addExceptionHandler
void addExceptionHandler(ComponentIdentifier cid, Class<? extends Exception> clazz, boolean exactmatch, BiConsumer<? extends Exception, IComponent> handler) -
addExceptionHandler
void addExceptionHandler(Class<?> type, Class<? extends Exception> clazz, boolean exactmatch, BiConsumer<? extends Exception, IComponent> handler) -
addExceptionHandler
void addExceptionHandler(Class<? extends Exception> clazz, boolean exactmatch, BiConsumer<? extends Exception, IComponent> handler) -
removeExceptionHandler
-