001    /*
002     * $RCSfile: JobInitializer.java,v $ 
003     *
004     * Created on July 12, 2002, 10:39 AM
005     *
006     * This file is part of the STAR Scheduler.
007     * Copyright (c) 2002-2006 STAR Collaboration - Brookhaven National Laboratory
008     *
009     * STAR Scheduler is free software; you can redistribute it and/or modify
010     * it under the terms of the GNU General Public License as published by
011     * the Free Software Foundation; either version 2 of the License, or
012     * (at your option) any later version.
013     *
014     * STAR Scheduler is distributed in the hope that it will be useful,
015     * but WITHOUT ANY WARRANTY; without even the implied warranty of
016     * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
017     * GNU General Public License for more details.
018     *
019     * You should have received a copy of the GNU General Public License
020     * along with STAR Scheduler; if not, write to the Free Software
021     * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
022     */
023    package gov.bnl.star.offline.scheduler;
024    
025    import gov.bnl.star.offline.scheduler.request.Request;
026    
027    /** Analizes a job requests. A JobInitializer should check whether the request
028     * is valid. For example, it can check for privileges, whether the file
029     * requested do exist or whether the file requested from a catalog actually
030     * is on the catalog.
031     *
032     * @author  Gabriele Carcassi
033     * @version $Revision: 1.12 $ $Date: 2006/11/21 00:41:32 $
034     */
035    public interface JobInitializer {
036        /** Analize a job request, and if it's valid returns the description of
037         * such job and its requirements.
038         * @return the job description and requirements as found in the XML file
039         * @param xmlFileName the XML file containing the description of the job
040         * @throws RuntimeException when the job description wasn't valid (the XML file wasn't found, an input file
041         * doesn't exist, the command line wasn't valid...) */
042        Request[] analizeRequest(String xmlFileName);
043    }