|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.pluto.portalImpl.services.Service
public abstract class Service
This is the base class for all services of the system. It prototypes
only two methods: init()
and destroy()
, both
of which are optional to override by a service. However, it is
recommended to implement at least init()
. The
destroy()
method only serves as a hook to release any
resources that the service may have cached or opened for its life-time.
To be more precise, this class prototypes three different
init()
methods. Only one of them should be overriden.
The are different with respect to the arguments they take, but
are otherwise identical.
ServiceManager
Constructor Summary | |
---|---|
protected |
Service()
Constructs the service. |
Method Summary | |
---|---|
protected void |
destroy()
Destroys the services. |
protected void |
destroy(ServletConfig aConfig)
Destroys the services. |
protected void |
init(Properties aProperties)
Initializes the service using the service properties. |
protected void |
init(ServletConfig aConfig,
Properties aProperties)
Initializes the service using the servlet configuration and the service properties. |
protected void |
init(ServletContext aContext,
Properties aProperties)
Initializes the service using the servlet context and the service properties. |
protected void |
postInit()
This methods can be used to setup things after the services has been initialized via init. |
protected void |
postInit(ServletConfig aConfig)
This methods can be used to setup things after the services has been initialized via init. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected Service()
Method Detail |
---|
protected void init(ServletConfig aConfig, Properties aProperties) throws java.lang.Exception
aConfig
- the servlet configurationaProperties
- the service properties
java.lang.Exception
- if the initialization failsprotected void init(ServletContext aContext, Properties aProperties) throws java.lang.Exception
aContext
- the servlet contextaProperties
- the service properties
java.lang.Exception
- if the initialization failsprotected void init(Properties aProperties) throws java.lang.Exception
aProperties
- the service properties
java.lang.Exception
- if the initialization failsprotected void postInit(ServletConfig aConfig) throws java.lang.Exception
java.lang.Exception
- if the postInit fails for any reasonprotected void postInit() throws java.lang.Exception
java.lang.Exception
- if the postInit fails for any reasonprotected void destroy(ServletConfig aConfig) throws java.lang.Exception
aConfig
- the servlet configuration
java.lang.Exception
- if the destruction failsprotected void destroy() throws java.lang.Exception
java.lang.Exception
- if the destruction fails
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |