[ 
https://issues.apache.org/jira/browse/SLING-2225?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13107692#comment-13107692
 ] 

Felix Meschberger commented on SLING-2225:
------------------------------------------

Implemented improvements in Rev. 1172508. The Main class now has an officially 
extensible API:

   Main(Map<String, String> properties) -- creates the Main class with 
configuration properties
   doControlCommand() -- handles the start, stop, and status command line 
options
       (reflected as sling.control.action configuration property in the 
constructor)
   doStart() -- start Sling
   doStop() -- stop Sling

The main(String[] args) method still is present for the Java VM to start Sling. 
It is in this method, that documented command line options are parsed and 
converted into a map of properties to be used for the actual Sling startup.

> Improve support for embedding the Sling Launcher in Java applications
> ---------------------------------------------------------------------
>
>                 Key: SLING-2225
>                 URL: https://issues.apache.org/jira/browse/SLING-2225
>             Project: Sling
>          Issue Type: Improvement
>          Components: Launchpad
>    Affects Versions: Launchpad Base 2.3.0
>            Reporter: Felix Meschberger
>            Assignee: Felix Meschberger
>             Fix For: Launchpad Base 2.4.0
>
>
> The only way to embed the Sling launcher today is to build an array of 
> command line options and call the static Main.main(String[] args) method from 
> the application. This is kind of weird and only allows a small subset of 
> configuration properties to be easily supplied by the calling application.
> In addition the handling of command line options is currently split between 
> the Main and the MainDelagate class: The Main class implements the usage 
> functionality (for the -h command line option) while the MainDelegate class 
> implements the actual conversion of command line options to internal 
> configuration property. This should be improved in that the support for real 
> command lines should be consolidated in the Main class and the map of 
> configuration properties supplied to the MainDelagate class should only 
> contain actual configuration properties.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to