/**
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *    http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.deephacks.westty;

public class Westty {
    private static final String WESTTY_CORE = "org.deephacks.westty.internal.core.WesttyCore";
    private final static Object WESTTY;
    static {
        ClassLoader cl = Thread.currentThread().getContextClassLoader();
        try {
            WESTTY = cl.loadClass(WESTTY_CORE).newInstance();
        } catch (Exception e) {
            throw new RuntimeException();
        }
    }

    public static void main(String[] args) {
        Westty westty = new Westty();
        westty.start();
    }

    public void start() {
        try {
            WESTTY.getClass().getMethod("start").invoke(WESTTY);
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
    }

    public void stop() {
        try {
            WESTTY.getClass().getMethod("stop").invoke(WESTTY);
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
    }

}

@@ -590,29 +590,164 @@
 y;%0A%0A
-public class Westty %7B
+import org.slf4j.Logger;%0Aimport org.slf4j.LoggerFactory;%0A%0Apublic class Westty %7B%0A    private static final Logger log = LoggerFactory.getLogger(Westty.class);
 %0A   
@@ -850,22 +850,16 @@
 private 
-final 
 static O
@@ -876,21 +876,237 @@
 TY;%0A
+%0A
     
+public 
 static 
-%7B%0A
+void main(String%5B%5D args) %7B%0A        Westty westty = new Westty();%0A        westty.startup();%0A    %7D%0A%0A    public synchronized void startup() %7B%0A        log.info(%22Westty startup.%22);%0A        if (WESTTY == null) %7B%0A    
     
@@ -1174,32 +1174,36 @@
 ader();%0A        
+    
 try %7B%0A          
@@ -1200,24 +1200,28 @@
             
+   
+ 
 WESTTY = cl.
@@ -1254,24 +1254,28 @@
 Instance();%0A
+    
         %7D ca
@@ -1298,32 +1298,36 @@
 ) %7B%0A            
+    
 throw new Runtim
@@ -1352,156 +1352,24 @@
     
-%7D%0A
     %7D%0A
-%0A
     
-public static void main(String%5B%5D args) %7B%0A        Westty westty = new Westty();%0A        westty.start();%0A    %7D%0A%0A    public void start() %7B
+    %7D%0A
 %0A   
@@ -1425,16 +1425,18 @@
 d(%22start
+up
 %22).invok
@@ -1527,24 +1527,59 @@
 ;%0A        %7D%0A
+        log.info(%22Westty ready.%22);%0A
     %7D%0A%0A    p
@@ -1584,16 +1584,29 @@
  public 
+synchronized 
 void sto
@@ -1607,24 +1607,62 @@
 id stop() %7B%0A
+        log.info(%22Westty shutdown.%22);%0A
         try 
@@ -1705,19 +1705,23 @@
 ethod(%22s
-top
+hutdown
 %22).invok
@@ -1798,32 +1798,79 @@
 meException(e);%0A
+        %7D finally %7B%0A            WESTTY = null;%0A
         %7D%0A    %7D%0A

Change name of start and stop methods