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 TypeMethodDescriptionvoid
addExceptionHandler
(ComponentIdentifier cid, Class<? extends Exception> clazz, boolean exactmatch, BiConsumer<? extends Exception, IComponent> handler) void
addExceptionHandler
(Class<?> type, Class<? extends Exception> clazz, boolean exactmatch, BiConsumer<? extends Exception, IComponent> handler) void
addExceptionHandler
(Class<? extends Exception> clazz, boolean exactmatch, BiConsumer<? extends Exception, IComponent> handler) static IComponentManager
get()
Returns the component manager instance.Get a running component.int
Get the number of current components.void
removeExceptionHandler
(Object key, Class<? extends Exception> clazz) void
setClassLoader
(ClassLoader classloader) Sets the class loader used by components.void
setComponentIdNumberMode
(boolean cidnumbermode) Configure if numbers instead words should be used as automatically generated component names.void
setDebug
(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
-