1 /* 2 * The contents of this file are subject to the terms 3 * of the Common Development and Distribution License 4 * (the License). You may not use this file except in 5 * compliance with the License. 6 * 7 * You can obtain a copy of the license at 8 * https://glassfish.dev.java.net/public/CDDLv1.0.html or 9 * glassfish/bootstrap/legal/CDDLv1.0.txt. 10 * See the License for the specific language governing 11 * permissions and limitations under the License. 12 * 13 * When distributing Covered Code, include this CDDL 14 * Header Notice in each file and include the License file 15 * at glassfish/bootstrap/legal/CDDLv1.0.txt. 16 * If applicable, add the following below the CDDL Header, 17 * with the fields enclosed by brackets [] replaced by 18 * you own identifying information: 19 * "Portions Copyrighted [year] [name of copyright owner]" 20 * 21 * Copyright 2006 Sun Microsystems, Inc. All rights reserved. 22 */ 23 24 /** 25 * PROPRIETARY/CONFIDENTIAL. Use of this product is subject to license terms. 26 * 27 * Copyright 2000-2001 by iPlanet/Sun Microsystems, Inc., 28 * 901 San Antonio Road, Palo Alto, California, 94303, U.S.A. 29 * All rights reserved. 30 */ 31 32 package com.sun.appserv.server; 33 34 import com.sun.enterprise.server.ServerContext; 35 36 /** 37 * ServerLifecycleImple class a dummmy implementation for ServerLifecycle interface. 38 * 39 * This implementaion stubs out various lifecycle interface methods. 40 */ 41 public class ServerLifecycleImpl implements ServerLifecycle { 42 /** 43 * Server is initializing subsystems and setting up the runtime environment. 44 * Prepare for the beginning of active use of the public methods of this 45 * subsystem. This method is called before any of the public methods of 46 * this subsystem are utilized. 47 * 48 * @param sc ServerContext the server runtime context. 49 * 50 * @exception IllegalStateException if this subsystem has already been 51 * started 52 * @exception ServerLifecycleException if this subsystem detects a fatal 53 * error that prevents this subsystem from being used 54 */ 55 public void onInitialization(ServerContext sc) 56 throws ServerLifecycleException { 57 } 58 59 /** 60 * Server is starting up applications 61 * 62 * @param sc ServerContext the server runtime context. 63 * 64 * @exception ServerLifecycleException if this subsystem detects a fatal 65 * error that prevents this subsystem from being used 66 */ 67 public void onStartup(ServerContext sc) 68 throws ServerLifecycleException { 69 } 70 71 /** 72 * Server has complted loading the applications and is ready to serve requests. 73 * 74 * @param sc ServerContext the server runtime context. 75 * 76 * @exception ServerLifecycleException if this subsystem detects a fatal 77 * error that prevents this subsystem from being used 78 */ 79 public void onReady(ServerContext sc) throws ServerLifecycleException { 80 81 } 82 83 /** 84 * Server is shutting down applications 85 * 86 * @exception ServerLifecycleException if this subsystem detects a fatal 87 * error that prevents this subsystem from being used 88 */ 89 public void onShutdown() 90 throws ServerLifecycleException { 91 } 92 93 /** 94 * Server is terminating the subsystems and the runtime environment. 95 * Gracefully terminate the active use of the public methods of this 96 * subsystem. This method should be the last one called on a given 97 * instance of this subsystem. 98 * 99 * @exception ServerLifecycleException if this subsystem detects a fatal 100 * error that prevents this subsystem from being used 101 */ 102 public void onTermination() 103 throws ServerLifecycleException { 104 } 105 } 106