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
018 package org.apache.commons.daemon;
019
020
021 /**
022 * Interface which defines methods needed by the DaemonLoader.
023 *
024 * @author Pier Fumagalli
025 * @version 1.0 <i>(SVN $Revision: 925054 $)</i>
026 */
027 public interface DaemonController
028 {
029
030 /**
031 * Shutdown the daemon.
032 */
033 public void shutdown()
034 throws IllegalStateException;
035
036 /**
037 * Reload daemon
038 */
039 public void reload()
040 throws IllegalStateException;
041
042 /**
043 * Shudown daemon and log failed message.
044 */
045 public void fail()
046 throws IllegalStateException;
047
048 /**
049 * Shudown daemon and log failed message.
050 */
051 public void fail(String message)
052 throws IllegalStateException;
053
054 /**
055 * Shudown daemon and log failed message.
056 */
057 public void fail(Exception exception)
058 throws IllegalStateException;
059
060 /**
061 * Shudown daemon and log failed message.
062 */
063 public void fail(String message, Exception exception)
064 throws IllegalStateException;
065
066 }
067