Package com.buschmais.jqassistant.core.store.impl

Source Code of com.buschmais.jqassistant.core.store.impl.Server

package com.buschmais.jqassistant.core.store.impl;

import org.neo4j.kernel.GraphDatabaseAPI;
import org.neo4j.server.WrappingNeoServerBootstrapper;

/**
* Web server implementation wrapping an {@link EmbeddedGraphStore}.
*/
public class Server {

    /**
     * The {@link EmbeddedGraphStore}.
     */
    private final EmbeddedGraphStore graphStore;

    /**
     * The {@link WrappingNeoServerBootstrapper}.
     */
    private WrappingNeoServerBootstrapper server;

    /**
     * Constructor.
     *
     * @param graphStore The {@link EmbeddedGraphStore}.
     */
    public Server(EmbeddedGraphStore graphStore) {
        this.graphStore = graphStore;
    }

    /**
     * Start the web server.
     */
    public void start() {
        GraphDatabaseAPI databaseAPI = graphStore.getDatabaseAPI();
        this.server = new WrappingNeoServerBootstrapper(databaseAPI);
        this.server.start();
    }

    /**
     * Stop the web server.
     */
    public void stop() {
        this.server.stop();
    }

}
TOP

Related Classes of com.buschmais.jqassistant.core.store.impl.Server

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.