All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.jwall.apache.httpd.Apache Maven / Gradle / Ivy

The newest version!
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 *
 *   Copyright (C) 2010-2014 Christian Bockermann 
 *    
 *   This file is part of the jwall.org apache-config library. The apache-config library is
 *   a parsing library to handle Apache HTTPD configuration files.
 *
 *   More information and documentation for the jwall-tools can be found at
 *   
 *                      http://www.jwall.org/apache-config
 *   
 *   This program is free software; you can redistribute it and/or modify it under
 *   the terms of the GNU General Public License as published by the Free Software
 *   Foundation; either version 3 of the License, or (at your option) any later version.
 *   
 *   This program is distributed in the hope that it will be useful, but WITHOUT ANY
 *   WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 *   FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
 * 
 *   You should have received a copy of the GNU General Public License along with this 
 *   program; if not, see .
 *
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
package org.jwall.apache.httpd;

import java.io.File;

public interface Apache
{

    /**
     * Returns the file containing the main Apache configuration.
     * 
     * @return The main Apache configuration file.
     */
    public abstract File getHttpdConfig();

    /**
     * This method simply starts the Apache web-server.
     * Right now it just calls apachectl start and checks
     * the return-code.
     * 
     * @throws Exception
     */
    public abstract String start() throws ApacheError, Exception;

    /**
     * Stop the Apache web-server. Simply just a wrapper around
     * apachectl stop with a check of the return-code.
     * 
     * @throws Exception
     */
    public abstract String stop() throws Exception;

    /**
     * Forces a restart the the Apache server. Right now it just calls
     * apachectl restart, but could later send a SIGHUP
     * to the apache process.
     * 
     * @throws Exception
     */
    public abstract void restart() throws Exception;

    /**
     * This method calls the apachectl-script referenced within the ApacheLayout
     * instance by using the configtest feature. Usually this will return a
     * constant string Syntax OK if everything worked fine. Otherwise the exact
     * error message is returned.
     * 
     * @return Status message.
     */
    public abstract String configCheck() throws Exception;

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy