@@ -0,0 +1,2640 @@
+package de.hsmainz.pubapp.geocoder;%0A%0Aimport org.apache.logging.log4j.LogManager;%0Aimport org.apache.logging.log4j.Logger;%0Aimport org.glassfish.grizzly.http.server.HttpServer;%0Aimport org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpServerFactory;%0Aimport org.glassfish.jersey.server.ResourceConfig;%0A%0Aimport java.io.IOException;%0Aimport java.net.URI;%0A%0A/**%0A *%0A *%0A * @author Arno%0A * @since 03.12.2016.%0A */%0Apublic class GeocoderServiceMain %7B%0A%0A    //****************************************%0A    // CONSTANTS%0A    //****************************************%0A%0A    private static final String BASE_URI = %22http://localhost%22;%0A    private static final String PATH = %22pubapp/%22;%0A    private static final Logger logger = LogManager.getLogger(GeocoderServiceMain.class);%0A%0A    //****************************************%0A    // VARIABLES%0A    //****************************************%0A%0A    //****************************************%0A    // INIT/CONSTRUCTOR%0A    //****************************************%0A%0A    private GeocoderServiceMain() %7B%0A%0A    %7D%0A%0A    //****************************************%0A    // GETTER/SETTER%0A    //****************************************%0A%0A    //****************************************%0A    // PUBLIC METHODS%0A    //****************************************%0A%0A    /**%0A     * Main server method.%0A     *%0A     * @param args load properties file%0A     * @throws IOException%0A     */%0A    public static void main(String%5B%5D args) throws IOException %7B%0A        if(args.length %3E 0)%7B%0A            MyProperties.setPropertiesFile(args%5B0%5D);%0A        %7D%0A%0A%0A        final HttpServer server = startServer();%0A        logger.trace(%22Geocoder started%22);%0A%0A        System.out.println(String.format(%22Jersey app started with WADL available at %22%0A                + %22%25sapplication.wadl%5CnHit enter to stop it...%22, buildURL()));%0A%0A        System.in.read();%0A%0A        logger.trace(%22Geocoder stoped%22);%0A        server.shutdownNow();%0A    %7D%0A%0A%0A    //****************************************%0A    // PRIVATE METHODS%0A    //****************************************%0A%0A    /**%0A     * Starts Grizzly HTTP server%0A     *%0A     * @return Grizzly HTTP server.%0A     */%0A    private static HttpServer startServer() %7B%0A%0A        final ResourceConfig rc = new ResourceConfig().packages(%22de.hsmainz.pubapp.geocoder.web%22);%0A%0A%0A        return GrizzlyHttpServerFactory.createHttpServer(URI.create(buildURL()), rc);%0A    %7D%0A%0A    private static String buildURL()%7B%0A        String port = MyProperties.getInstance().getProperty(%22geo_port%22);%0A        return BASE_URI + %22:%22 + port + %22/%22 +PATH;%0A    %7D%0A%0A    //****************************************%0A    // INNER CLASSES%0A    //****************************************%0A%0A%7D%0A

Add files via upload