public class PlatformComponent
extends java.lang.Object
implements jadex.bridge.service.types.factory.IPlatformComponentAccess, jadex.bridge.IInternalAccess
Modifier and Type | Field and Description |
---|---|
protected java.lang.Exception |
exception
The failure reason (if any).
|
protected java.util.Map<java.lang.Class<?>,jadex.bridge.component.IComponentFeature> |
features
The features.
|
protected jadex.commons.IValueFetcher |
fetcher
The combined value fetcher (cached for speed).
|
protected java.util.List<jadex.bridge.component.IComponentFeature> |
ifeatures
The inited feature instances as list (for shutdown after failed init).
|
protected jadex.bridge.component.ComponentCreationInfo |
info
The creation info.
|
protected java.util.List<jadex.bridge.component.IComponentFeature> |
lfeatures
The feature instances as list (for reverse execution, cached for speed).
|
protected java.util.logging.Logger |
logger
The logger.
|
Constructor and Description |
---|
PlatformComponent() |
Modifier and Type | Method and Description |
---|---|
jadex.commons.future.IFuture<java.lang.Void> |
body()
Perform the main execution of the component (if any).
|
void |
create(jadex.bridge.component.ComponentCreationInfo info,
java.util.Collection<jadex.bridge.component.IComponentFeatureFactory> facs)
Create the component, i.e.
|
protected jadex.commons.future.IFuture<java.lang.Void> |
executeBodyOnFeatures(java.util.Iterator<jadex.bridge.component.IComponentFeature> features)
Execute feature bodies in parallel.
|
protected jadex.commons.future.IFuture<java.lang.Void> |
executeInitOnFeatures(java.util.Iterator<jadex.bridge.component.IComponentFeature> features)
Recursively init the features.
|
protected jadex.commons.future.IFuture<java.lang.Void> |
executeShutdownOnFeatures(java.util.List<jadex.bridge.component.IComponentFeature> features,
int cnt)
Recursively shutdown the features in inverse order.
|
jadex.commons.future.IFuture<jadex.bridge.IComponentIdentifier[]> |
getChildren(java.lang.String type)
Get the children (if any).
|
java.lang.ClassLoader |
getClassLoader()
Get the class loader of the component.
|
jadex.bridge.service.types.cms.IComponentDescription |
getComponentDescription()
Get the component description.
|
<T> T |
getComponentFeature(java.lang.Class<? extends T> type)
Get a feature of the component.
|
<T> T |
getComponentFeature0(java.lang.Class<? extends T> type)
Get a feature of the component.
|
java.lang.String |
getComponentFilename(java.lang.String type)
Get the file name for a logical type name of a subcomponent of this application.
|
jadex.bridge.IComponentIdentifier |
getComponentIdentifier()
Get the id of the component.
|
java.lang.String |
getConfiguration()
Get the start configuration or the default configuration if any.
|
int |
getEndstateStart()
Get the step number when endstate began.
|
java.lang.Exception |
getException()
Get the exception, if any.
|
jadex.bridge.IExternalAccess |
getExternalAccess()
Get the external access.
|
jadex.commons.IValueFetcher |
getFetcher()
Get the fetcher.
|
jadex.bridge.IInternalAccess |
getInternalAccess()
Get the user view of this platform component.
|
java.util.logging.Logger |
getLogger()
Get the logger.
|
static java.lang.String |
getLoggerName(jadex.bridge.IComponentIdentifier cid)
Get the logger name.
|
jadex.bridge.modelinfo.IModelInfo |
getModel()
Get the model of the component.
|
jadex.commons.IParameterGuesser |
getParameterGuesser()
Get the parameter guesser.
|
jadex.commons.future.IFuture<java.lang.Void> |
init()
Perform the initialization of the component.
|
protected void |
initLogger(java.util.logging.Logger logger)
Init the logger with capability settings.
|
jadex.commons.future.IFuture<java.util.Map<java.lang.String,java.lang.Object>> |
killComponent()
Kill the component.
|
jadex.commons.future.IFuture<java.util.Map<java.lang.String,java.lang.Object>> |
killComponent(java.lang.Exception e)
Kill the component.
|
jadex.commons.future.IFuture<java.lang.Void> |
shutdown()
Perform the shutdown of the component (if any).
|
java.lang.String |
toString()
Get a string representation.
|
protected jadex.bridge.component.ComponentCreationInfo info
protected java.util.Map<java.lang.Class<?>,jadex.bridge.component.IComponentFeature> features
protected java.util.List<jadex.bridge.component.IComponentFeature> lfeatures
protected java.util.List<jadex.bridge.component.IComponentFeature> ifeatures
protected java.util.logging.Logger logger
protected java.lang.Exception exception
protected jadex.commons.IValueFetcher fetcher
public void create(jadex.bridge.component.ComponentCreationInfo info, java.util.Collection<jadex.bridge.component.IComponentFeatureFactory> facs)
create
in interface jadex.bridge.service.types.factory.IPlatformComponentAccess
info
- The component creation info.platformdata
- The shared objects for all components of the same platform (registry etc.). See starter for available data.facs
- The factories for component features to be instantiated for this component.public jadex.commons.future.IFuture<java.lang.Void> init()
init
in interface jadex.bridge.service.types.factory.IPlatformComponentAccess
public jadex.commons.future.IFuture<java.lang.Void> body()
body
in interface jadex.bridge.service.types.factory.IPlatformComponentAccess
public jadex.commons.future.IFuture<java.lang.Void> shutdown()
shutdown
in interface jadex.bridge.service.types.factory.IPlatformComponentAccess
protected jadex.commons.future.IFuture<java.lang.Void> executeInitOnFeatures(java.util.Iterator<jadex.bridge.component.IComponentFeature> features)
protected jadex.commons.future.IFuture<java.lang.Void> executeBodyOnFeatures(java.util.Iterator<jadex.bridge.component.IComponentFeature> features)
protected jadex.commons.future.IFuture<java.lang.Void> executeShutdownOnFeatures(java.util.List<jadex.bridge.component.IComponentFeature> features, int cnt)
public jadex.bridge.IInternalAccess getInternalAccess()
getInternalAccess
in interface jadex.bridge.service.types.factory.IPlatformComponentAccess
public java.lang.Exception getException()
getException
in interface jadex.bridge.IInternalAccess
public jadex.bridge.modelinfo.IModelInfo getModel()
getModel
in interface jadex.bridge.IInternalAccess
public java.lang.String getConfiguration()
getConfiguration
in interface jadex.bridge.IInternalAccess
public jadex.bridge.IComponentIdentifier getComponentIdentifier()
getComponentIdentifier
in interface jadex.bridge.IInternalAccess
public jadex.bridge.service.types.cms.IComponentDescription getComponentDescription()
getComponentDescription
in interface jadex.bridge.IInternalAccess
public <T> T getComponentFeature(java.lang.Class<? extends T> type)
getComponentFeature
in interface jadex.bridge.IInternalAccess
feature
- The type of the feature.public <T> T getComponentFeature0(java.lang.Class<? extends T> type)
getComponentFeature0
in interface jadex.bridge.IInternalAccess
feature
- The type of the feature.public jadex.commons.future.IFuture<java.util.Map<java.lang.String,java.lang.Object>> killComponent()
killComponent
in interface jadex.bridge.IInternalAccess
public jadex.commons.future.IFuture<java.util.Map<java.lang.String,java.lang.Object>> killComponent(java.lang.Exception e)
killComponent
in interface jadex.bridge.IInternalAccess
e
- The failure reason, if any.public jadex.bridge.IExternalAccess getExternalAccess()
getExternalAccess
in interface jadex.bridge.IInternalAccess
public java.util.logging.Logger getLogger()
getLogger
in interface jadex.bridge.IInternalAccess
public static java.lang.String getLoggerName(jadex.bridge.IComponentIdentifier cid)
cid
- The component identifier.protected void initLogger(java.util.logging.Logger logger)
logger
- The logger.public jadex.commons.IValueFetcher getFetcher()
getFetcher
in interface jadex.bridge.IInternalAccess
public jadex.commons.IParameterGuesser getParameterGuesser()
getParameterGuesser
in interface jadex.bridge.IInternalAccess
public java.lang.ClassLoader getClassLoader()
getClassLoader
in interface jadex.bridge.IInternalAccess
public jadex.commons.future.IFuture<jadex.bridge.IComponentIdentifier[]> getChildren(java.lang.String type)
getChildren
in interface jadex.bridge.IInternalAccess
public java.lang.String getComponentFilename(java.lang.String type)
public int getEndstateStart()
public java.lang.String toString()
toString
in class java.lang.Object