public abstract class AbstractService extends Object implements IService, IComponent, IConfigurable, IStartable, IComponentInfo, ILifecycleInfo, com.sap.netweaver.km.monitor.IMonitorInfoProvider
Copyright (c) SAP AG 2001 - 2002
| Modifier and Type | Class and Description |
|---|---|
static interface |
AbstractService.CONFIG_ATTRIBUTE_NAME
TBD: Description of the class.
|
| Modifier and Type | Field and Description |
|---|---|
protected IConfiguration |
config
This service's configuration
|
protected Properties |
properties
This service's configuration converted to a Properties object.
|
protected ComponentStateHandler |
stateHandler |
| Constructor and Description |
|---|
AbstractService()
The default constructor
|
AbstractService(Properties properties)
Deprecated.
As of EP 5.0 SP5, replaced by default (public, no arguments)
constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
configure(IConfiguration config)
Passes the configuration data to the configurable.
|
static com.sap.netweaver.km.monitor.data.ConfigData |
convertConfigData(IConfiguration cfg)
Convert a CRT configuration data object to the monitor format.
|
static Properties |
convertConfigToProperties(IConfiguration config)
Helper method for conversion of configuration data into properties.
|
protected static Properties |
convertConfigToProperties(IConfiguration config,
String prefix)
Helper method for conversion of configuration data into properties.
|
static com.sap.netweaver.km.monitor.data.StatusInfo |
convertStatus(ComponentStateHandler sh)
Convert the CRT status information to the generic monitor status.
|
static com.sap.netweaver.km.monitor.data.StructuredData |
createPropertyList(ComponentStateHandler sh)
Create a list of properties for CRT lifecycle information.
|
Date |
getCreationDate()
Returns the date and time of the creation of the component instance.
|
String |
getDescription()
Get a description for this service.
|
String |
getDescription(Locale locale)
Get a description for this service.
|
String |
getID()
Get a service identifier, unique for this instance.
|
ConfigurationException |
getLastConfigurationException()
Returns the exception thrown in the last call to
IConfigurable.configure(IConfiguration),
or IReconfigurable.reconfigure(IConfiguration). |
Date |
getLastReconfigurationDate()
Returns the date and time of the last reconfiguration of this component.
|
String |
getName()
Returns the component's human-readable name or
null . |
Date |
getNextAutoRestartDate()
Returns the date and time of the next automatic restart of the component.
|
Properties |
getProperties()
Returns some arbitrary properties with information about the component or
null . |
StartupException |
getStartupException()
Returns the exception thrown in the last call to
IStartable.start(),
Can be null . |
ComponentState |
getState()
Returns the current life-cycle state of the component.
|
String |
getType()
Deprecated.
As of EP 5.0 SP5, The "service type" is the name of the
configurable class.
|
protected void |
postService() |
protected void |
preService() |
com.sap.netweaver.km.monitor.data.MonitorData |
retrieveMonitorData()
Default implementation - should be overwritten by a service to manage the status during runtime.
|
protected void |
shutDown()
Deprecated.
As of EP 5.0 SP5, replaced by
startUpImpl(). |
protected void |
shutDownImpl()
The implementation must overwrite this method if it has to release
resources acquired during shutdown.
|
void |
start()
A component must implement this method if it has initial startup handling
to do before being accessible (acquire resources, open connections to
remote systems, etc).
|
protected void |
startUp()
Deprecated.
As of EP 5.0 SP5, replaced by
shutDownImpl(). |
protected void |
startUpImpl()
The implementation must overwrite this method if it has initial startup
handling to do (acquire resources, open connections to remote systems,
etc).
|
void |
stop()
This method is only called once during the life-time of a component.
|
protected IConfiguration config
protected Properties properties
protected final ComponentStateHandler stateHandler
public AbstractService()
public AbstractService(Properties properties) throws WcmException
properties - TBD: Description of the incoming method parameterWcmException - Exception raised in failure situationpublic final String getID()
IServicepublic String getDescription()
IServicegetDescription in interface IServicepublic String getType()
public final void configure(IConfiguration config) throws ConfigurationException
IConfigurableconfigure in interface IConfigurableconfig - the component's configuration data.ConfigurationException - Exception raised in failure situationpublic final void start()
throws StartupException
IStartableAutoRestartException was thrown.start in interface IStartableStartupException - If the initialization failed because neccessary
resources could not be allocated.public final void stop()
IStartablestop in interface IStartablepublic String getName()
IComponentInfonull .getName in interface IComponentInfonull .public String getDescription(Locale locale)
IServicegetDescription in interface IComponentInfogetDescription in interface IServicelocale - TBD: Description of the incoming method parameterpublic Properties getProperties()
IComponentInfonull .getProperties in interface IComponentInfonull .public ComponentState getState()
ILifecycleInfonull
.getState in interface ILifecycleInfonull
.public ConfigurationException getLastConfigurationException()
ILifecycleInfoIConfigurable.configure(IConfiguration),
or IReconfigurable.reconfigure(IConfiguration). Can be
null .getLastConfigurationException in interface ILifecycleInfonull.public StartupException getStartupException()
ILifecycleInfoIStartable.start(),
Can be null .getStartupException in interface ILifecycleInfonull.public final Date getCreationDate()
ILifecycleInfonull . This property usually makes sense only for components
that implement the IThreadSafe interface.getCreationDate in interface ILifecycleInfonull .public Date getLastReconfigurationDate()
ILifecycleInfonull .getLastReconfigurationDate in interface ILifecycleInfonull .public Date getNextAutoRestartDate()
ILifecycleInfonull .getNextAutoRestartDate in interface ILifecycleInfonull .AutoRestartExceptionprotected void preService()
throws WcmException
WcmExceptionprotected void postService()
protected void startUpImpl()
throws ConfigurationException,
StartupException
IStartable interface of the CRT this
method will be called only once. It will be called on systen start up or
when a new instance of this component is added to the persistence
configuration.ConfigurationException - Exception raised in failure situationStartupException - Exception raised in failure situationprotected void shutDownImpl()
IStartable interface of the CRT this
method will be called only once. It will be called when the component is
removed from the persistent configuration or when the system shuts down.protected void startUp()
throws WcmException
shutDownImpl().WcmException - Exception raised in failure situationprotected void shutDown()
throws WcmException
startUpImpl().WcmException - Exception raised in failure situationpublic static final Properties convertConfigToProperties(IConfiguration config)
config - which attributes should be converted to propertiesprotected static final Properties convertConfigToProperties(IConfiguration config, String prefix)
config - which attributes should be converted to propertiesprefix - to prepend to config attribute namespublic com.sap.netweaver.km.monitor.data.MonitorData retrieveMonitorData()
retrieveMonitorData in interface com.sap.netweaver.km.monitor.IMonitorInfoProviderpublic static com.sap.netweaver.km.monitor.data.ConfigData convertConfigData(IConfiguration cfg)
cfg - CRT configuration.ConfigData.public static com.sap.netweaver.km.monitor.data.StatusInfo convertStatus(ComponentStateHandler sh)
sh - component state handlerpublic static com.sap.netweaver.km.monitor.data.StructuredData createPropertyList(ComponentStateHandler sh)
sh - component state handlerStructuredData that keep a list of properties for CRT lifecycle information.| Access Rights |
|---|
| SC | DC | Public Part | ACH |
|---|---|---|---|
[sap.com] KMC-CM
|
[sap.com] tc/km/frwk
|
api
|
EP-KM-CM
|
[sap.com] KMC-WPC
|
[sap.com] tc/kmc/wpc/wpcfacade
|
api
|
EP-PIN-WPC-WCM
|
Copyright 2021 SAP SE Complete Copyright Notice