1 /** 2 This file is part of Waarp Project. 3 4 Copyright 2009, Frederic Bregier, and individual contributors by the @author 5 tags. See the COPYRIGHT.txt in the distribution for a full listing of 6 individual contributors. 7 8 All Waarp Project is free software: you can redistribute it and/or 9 modify it under the terms of the GNU General Public License as published 10 by the Free Software Foundation, either version 3 of the License, or 11 (at your option) any later version. 12 13 Waarp is distributed in the hope that it will be useful, 14 but WITHOUT ANY WARRANTY; without even the implied warranty of 15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 GNU General Public License for more details. 17 18 You should have received a copy of the GNU General Public License 19 along with Waarp . If not, see <http://www.gnu.org/licenses/>. 20 */ 21 package org.waarp.ftp.core.utils; 22 23 import org.waarp.common.utility.WaarpShutdownHook; 24 import org.waarp.ftp.core.config.FtpConfiguration; 25 26 /** 27 * @author "Frederic Bregier" 28 * 29 */ 30 public class FtpShutdownHook extends WaarpShutdownHook { 31 32 protected static FtpConfiguration configuration; 33 34 /** 35 * @param configuration 36 */ 37 public FtpShutdownHook(ShutdownConfiguration configuration, FtpConfiguration ftpconfiguration) { 38 super(configuration); 39 FtpShutdownHook.configuration = ftpconfiguration; 40 } 41 42 @Override 43 protected void exit() { 44 FtpChannelUtils.exit(FtpShutdownHook.configuration); 45 } 46 47 }