|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface PortletServiceProvider
Interface that must be implemented by portlet service providers.
This interface defines lifecycle methods for the intialization
of the portlet service implementation.
All portlet service implementations must implement this interface so that
they can be properly managed by the portlet container. It is the decision
of the portlet container how many service implementations will be instantiated.
All service providers must be programmed in a thread-safe way so that the
same instance can be used by multiple portlets concurrently.
This interface is designed to be implemented by clients. |
Method Summary | |
---|---|
void |
init(java.util.prefs.Preferences servicePreferences)
Initialize the portlet service. |
Method Detail |
---|
void init(java.util.prefs.Preferences servicePreferences) throws PortletServiceUnavailableException
There is no corresponding destroy
method in the lifecycle
of the portlet service, because there is nothing that a portlet service
could reasonably do in this method. It is not appropriate to free up
resources only in such a method, because portlet service providers will
typically live until the portal is shut down, therefore resources would
be consumed for the entire lifetime of the portal.
If a portlet service needs to acquire resources that it keeps for longer
than a single method call, then it is recommended to use
resource pools managed by the application server, like data sources,
or to have explicit release
methods in the service API
so that the client using the portlet service can manage the resource
consumption.
servicePreferences
- The configuration information for the portlet service.
This object is read-only; all modifying operations throw a
BackendStoreException
if such an exception is declared and do
nothing otherwise.
PortletServiceUnavailableException
- Service providers may throw
an exception of this type if they encounter a problem during intialization
(e.g a missing configuration parameter) that prevents the service from operating.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |