001/* 002 * Licensed to the Apache Software Foundation (ASF) under one or more 003 * contributor license agreements. See the NOTICE file distributed with 004 * this work for additional information regarding copyright ownership. 005 * The ASF licenses this file to You under the Apache License, Version 2.0 006 * (the "License"); you may not use this file except in compliance with 007 * the License. You may obtain a copy of the License at 008 * 009 * http://www.apache.org/licenses/LICENSE-2.0 010 * 011 * Unless required by applicable law or agreed to in writing, software 012 * distributed under the License is distributed on an "AS IS" BASIS, 013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 014 * See the License for the specific language governing permissions and 015 * limitations under the License. 016 */ 017 018package org.apache.commons.daemon; 019 020 021/** 022 * Defines methods needed by the DaemonLoader. 023 * 024 * @author Pier Fumagalli 025 * @version $Id: DaemonController.java 1204010 2011-11-19 16:15:23Z ggregory $ 026 */ 027public interface DaemonController 028{ 029 030 /** 031 * Shuts down the daemon. 032 */ 033 public void shutdown() 034 throws IllegalStateException; 035 036 /** 037 * Reloads daemon 038 */ 039 public void reload() 040 throws IllegalStateException; 041 042 /** 043 * Shuts down daemon and logs failed message. 044 */ 045 public void fail() 046 throws IllegalStateException; 047 048 /** 049 * Shuts down daemon and logs failed message. 050 */ 051 public void fail(String message) 052 throws IllegalStateException; 053 054 /** 055 * Shuts down daemon and logs failed message. 056 */ 057 public void fail(Exception exception) 058 throws IllegalStateException; 059 060 /** 061 * Shuts down daemon and logs failed message. 062 */ 063 public void fail(String message, Exception exception) 064 throws IllegalStateException; 065 066} 067