|
SAP NetWeaver '04 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--com.sapportals.wcm.service.AbstractService
The abstract base class for global Services.
Copyright (c) SAP AG 2001 - 2002
| Inner Class Summary | |
static interface |
AbstractService.CONFIG_ATTRIBUTE_NAME
TBD: Description of the class. |
| Field Summary | |
protected IConfiguration |
config
This service's configuration |
protected java.util.Properties |
properties
This service's configuration converted to a Properties object. |
protected ComponentStateHandler |
stateHandler
|
| Constructor Summary | |
AbstractService()
The default constructor |
|
AbstractService(java.util.Properties properties)
Deprecated. As of EP 5.0 SP5, replaced by default (public, no arguments) constructor. |
|
| Method Summary | |
void |
configure(IConfiguration config)
Passes the configuration data to the configurable. |
static java.util.Properties |
convertConfigToProperties(IConfiguration config)
Helper method for conversion of configuration data into properties. |
protected static java.util.Properties |
convertConfigToProperties(IConfiguration config,
java.lang.String prefix)
Helper method for conversion of configuration data into properties. |
java.util.Date |
getCreationDate()
Returns the date and time of the creation of the component instance. |
java.lang.String |
getDescription()
Get a description for this service. |
java.lang.String |
getDescription(java.util.Locale locale)
Get a description for this service. |
java.lang.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). |
java.util.Date |
getLastReconfigurationDate()
Returns the date and time of the last reconfiguration of this component. |
java.lang.String |
getName()
Returns the component's human-readable name or null . |
java.util.Date |
getNextAutoRestartDate()
Returns the date and time of the next automatic restart of the component. |
java.util.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. |
java.lang.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()
|
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. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected IConfiguration config
protected java.util.Properties properties
protected final ComponentStateHandler stateHandler
| Constructor Detail |
public AbstractService()
public AbstractService(java.util.Properties properties)
throws WcmException
properties - TBD: Description of the incoming method parameterWcmException - Exception raised in failure situation| Method Detail |
public final java.lang.String getID()
IServicegetID in interface IServicecom.sapportals.wcm.service.IServicepublic java.lang.String getDescription()
IServicegetDescription in interface IServicecom.sapportals.wcm.service.IServicepublic java.lang.String getType()
public final void configure(IConfiguration config)
throws ConfigurationException
IConfigurableconfigure in interface IConfigurablecom.sapportals.wcm.crt.component.IConfigurableconfiguration - the component's configuration data.ConfigurationException - Exception raised in failure situation
public final void start()
throws StartupException
IStartableAutoRestartException was thrown.start in interface IStartablecom.sapportals.wcm.crt.component.IStartableStartupException - If the initialization failed because neccessary
resources could not be allocated.public final void stop()
IStartablestop in interface IStartablepublic java.lang.String getName()
IComponentInfonull .getName in interface IComponentInfocom.sapportals.wcm.crt.component.IComponentInfonull .public java.lang.String getDescription(java.util.Locale locale)
IServicegetDescription in interface IServicecom.sapportals.wcm.service.IServicelocale - TBD: Description of the incoming method parameterpublic java.util.Properties getProperties()
IComponentInfonull .getProperties in interface IComponentInfocom.sapportals.wcm.crt.component.IComponentInfonull .public ComponentState getState()
ILifecycleInfonull
.
- Specified by:
getState in interface ILifecycleInfo
- Following copied from interface:
com.sapportals.wcm.crt.component.ILifecycleInfo
- Returns:
- the current life-cycle state of the component. Can be
null
.
public ConfigurationException getLastConfigurationException()
ILifecycleInfoIConfigurable.configure(IConfiguration),
or IReconfigurable.reconfigure(IConfiguration). Can be
null .getLastConfigurationException in interface ILifecycleInfocom.sapportals.wcm.crt.component.ILifecycleInfopublic StartupException getStartupException()
ILifecycleInfoIStartable.start(),
Can be null .getStartupException in interface ILifecycleInfocom.sapportals.wcm.crt.component.ILifecycleInfopublic final java.util.Date getCreationDate()
ILifecycleInfonull . This property usually makes sense only for components
that implement the IThreadSafe interface.
- Specified by:
getCreationDate in interface ILifecycleInfo
- Following copied from interface:
com.sapportals.wcm.crt.component.ILifecycleInfo
- Returns:
- the date and time of the creation of the component instance. Can be
null .
public java.util.Date getLastReconfigurationDate()
ILifecycleInfonull .
- Specified by:
getLastReconfigurationDate in interface ILifecycleInfo
- Following copied from interface:
com.sapportals.wcm.crt.component.ILifecycleInfo
- Returns:
- the date and time of the last reconfiguration of this component.
Can be
null .
public java.util.Date getNextAutoRestartDate()
ILifecycleInfonull .
- Specified by:
getNextAutoRestartDate in interface ILifecycleInfo
- Following copied from interface:
com.sapportals.wcm.crt.component.ILifecycleInfo
- Returns:
- the date and time of the next automatic restart of the component.
Can be
null .- See Also:
AutoRestartException
protected void preService()
throws WcmException
protected 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 situation
protected void shutDown()
throws WcmException
startUpImpl().
WcmException - Exception raised in failure situationpublic static final java.util.Properties convertConfigToProperties(IConfiguration config)
config - which attributes should be converted to properties
protected static final java.util.Properties convertConfigToProperties(IConfiguration config,
java.lang.String prefix)
config - which attributes should be converted to propertiesprefix - to prepend to config attribute names
|
SAP NetWeaver '04 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||