Save This Page
Home » org.apache.sling.launchpad.base-2.2.0-source-release » org.apache.sling.launchpad.base.shared » [javadoc | source]
    1   /*
    2    * Licensed to the Apache Software Foundation (ASF) under one
    3    * or more contributor license agreements.  See the NOTICE file
    4    * distributed with this work for additional information
    5    * regarding copyright ownership.  The ASF licenses this file
    6    * to you under the Apache License, Version 2.0 (the
    7    * "License"); you may not use this file except in compliance
    8    * with the License.  You may obtain a copy of the License at
    9    *
   10    *   http://www.apache.org/licenses/LICENSE-2.0
   11    *
   12    * Unless required by applicable law or agreed to in writing,
   13    * software distributed under the License is distributed on an
   14    * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
   15    * KIND, either express or implied.  See the License for the
   16    * specific language governing permissions and limitations
   17    * under the License.
   18    */
   19   package org.apache.sling.launchpad.base.shared;
   20   
   21   import java.util.Map;
   22   
   23   /**
   24    * The <code>Launcher</code> interface is implemented by the delegate classes
   25    * inside the Launcher JAR and are used by the actual Main class or servlet to
   26    * configure and start the framework.
   27    */
   28   public interface Launcher {
   29   
   30       /**
   31        * Sets the sling.home to be used for starting the framework. This method
   32        * must be called with a non-<code>null</code> argument before trying to
   33        * start the framework.
   34        */
   35       public void setSlingHome(String slingHome);
   36   
   37       /**
   38        * The {@link Notifiable} to notify on framework stop or update
   39        */
   40       public void setNotifiable(Notifiable notifiable);
   41   
   42       /**
   43        * The commandline provided from the standalone launch case.
   44        */
   45       public void setCommandLine(Map<String, String> args);
   46   
   47       /**
   48        * Starts the framework and returns <code>true</code> if successfull.
   49        */
   50       public boolean start();
   51   
   52       /**
   53        * Stops the framework. This method only returns when the framework has
   54        * actually been stopped. This method may be used by the main class or
   55        * servlet to initiate a shutdown of the framework.
   56        */
   57       public void stop();
   58   }

Save This Page
Home » org.apache.sling.launchpad.base-2.2.0-source-release » org.apache.sling.launchpad.base.shared » [javadoc | source]