001 /*
002 * Created on Dec 21, 2009
003 *
004 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
005 * in compliance with the License. You may obtain a copy of the License at
006 *
007 * http://www.apache.org/licenses/LICENSE-2.0
008 *
009 * Unless required by applicable law or agreed to in writing, software distributed under the License
010 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
011 * or implied. See the License for the specific language governing permissions and limitations under
012 * the License.
013 *
014 * Copyright @2009-2010 the original author or authors.
015 */
016 package org.fest.swing.security;
017
018 /**
019 * Understands a hook called by <code>{@link NoExitSecurityManager}</code> when an application tries to terminate the
020 * current JVM. This hook is called before throwing <code>{@link ExitException}</code>.
021 *
022 * @author Alex Ruiz
023 */
024 public interface ExitCallHook {
025
026 /**
027 * Implement this method to do any context-specific cleanup. This hook is provided since it may not always be possible
028 * to catch the <code>{@link ExitException}</code> explicitly (like when it's caught by someone else, or thrown from
029 * the event dispatch thread).
030 * @param status the status the exit status.
031 */
032 void exitCalled(int status);
033 }