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 * @(#) MonitorListener.java 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 * This software is the confidential and proprietary information 32 * of iPlanet/Sun Microsystems, Inc. ("Confidential Information"). 33 * You shall not disclose such Confidential Information and shall 34 * use it only in accordance with the terms of the license 35 * agreement you entered into with iPlanet/Sun Microsystems. 36 */ 37 package com.sun.enterprise.server; 38 39 import java.io.File; 40 41 /** 42 * This interface defines the methods that must be implemented by objects 43 * that are interested in call backs from server runtime monitors. 44 * 45 * @author Nazrul Islam 46 */ 47 interface MonitorListener { 48 49 /** 50 * Callback from the reload monitor for this given entry. 51 * This is done when user updates the $APP_ROOT/.reload file 52 * indicating the server runtime for a dynamic reload. 53 * 54 * @param entry entry thats being monitored 55 * 56 * @return true if application was reloaded successfully 57 */ 58 boolean reload(MonitorableEntry entry); 59 60 /** 61 * Callback from the auto deploy monitor when a new archive is detected. 62 * 63 * @param entry entry thats being monitored 64 * @param archive newly detected archive under the auto deploy directory 65 * 66 * @return true if archive was deployed successfully 67 */ 68 boolean deploy(MonitorableEntry entry, File archive); 69 } 70