1 /* 2 * Copyright (c) 2003, Inversoft 3 * 4 * This software is distribuable under the GNU Lesser General Public License. 5 * For more information visit gnu.org. 6 */ 7 package com.inversoft.verge.repository; 8 9 10 import javax.servlet.ServletException; 11 12 13 /** 14 * This interface should be implemented by classes that are going 15 * to be used as services of the web application. Services differ 16 * from beans in that certain methods are called during their life 17 * time. All those methods are members of this interface 18 * 19 * @author Brian Pontarelli 20 */ 21 public interface Service { 22 23 /** 24 * This method is called by the application when the service is created 25 * so that the service can initialize itself. 26 * 27 * @throws ServletException If any errors occur during initialization 28 */ 29 public void init() throws ServletException; 30 31 /** 32 * This method is called by the application when the service is being 33 * remove from service. 34 * 35 * @throws ServletException If any errors occurred during destruction 36 */ 37 public void destroy() throws ServletException; 38 } 39