01: /*
02: * @author <a href="mailto:novotny@gridsphere.org">Jason Novotny</a>
03: * @version $Id: PortletServiceProvider.java 6385 2007-10-25 14:02:26Z wehrens $
04: */
05: package org.gridsphere.portlet.service.spi;
06:
07: import org.gridsphere.portlet.service.PortletService;
08: import org.gridsphere.portlet.service.PortletServiceUnavailableException;
09:
10: /**
11: * The <code>PortletServiceProvider</code> interface must be implemented by
12: * all portlet service implementations, so that it can be instantiated and
13: * destroyed by the appropriate service factory.
14: */
15: public interface PortletServiceProvider extends PortletService {
16:
17: /**
18: * Initializes the portlet service.
19: * <p/>
20: * The init method is invoked by the portlet container immediately after a
21: * portlet service has been instantiated and before it is passed to the requestor.
22: *
23: * @param config the service configuration
24: * @throws PortletServiceUnavailableException
25: * if an error occurs during initialization
26: */
27: public void init(PortletServiceConfig config)
28: throws PortletServiceUnavailableException;
29:
30: /**
31: * Destroys the portlet service.
32: * <p/>
33: * The destroy method is invoked by the portlet container to destroy a portlet service.
34: * This method must free all resources allocated to the portlet service.
35: */
36: public void destroy();
37:
38: }
|