public class WrappingNeoServerBootstrapper extends Bootstrapper
GraphDatabaseAPI, and optional configuration, and launches a
server using that database.
Use this to start up a full Neo4j server from within an application that
already uses the EmbeddedGraphDatabase or the
HighlyAvailableGraphDatabase. This gives your application the full
benefits of the server's REST API, the Web administration interface and
statistics tracking.
Example:
{
@code WrappingNeoServerBootstrapper srv = new WrappingNeoServerBootstrapper( myDatabase );
srv.start(); // Launches the server at default URL, http://localhost:7474
// Run your application as long as you please
srv.stop();
}
If you want to change configuration, pass in the optional Configurator arg to
the constructor. You can write your own implementation or use
ServerConfigurator.GRAPH_DATABASE_STARTUP_ERROR_CODE, OK, server, WEB_SERVER_STARTUP_ERROR_CODE| Constructor and Description |
|---|
WrappingNeoServerBootstrapper(org.neo4j.kernel.GraphDatabaseAPI db)
Create an instance with default settings.
|
WrappingNeoServerBootstrapper(org.neo4j.kernel.GraphDatabaseAPI db,
Configurator configurator)
Create an instance with custom documentation.
|
| Modifier and Type | Method and Description |
|---|---|
protected Configurator |
createConfigurator() |
protected NeoServer |
createNeoServer() |
addShutdownHook, controlEvent, getServer, isMoreDerivedThan, loadMostDerivedBootstrapper, main, start, start, stop, stoppublic WrappingNeoServerBootstrapper(org.neo4j.kernel.GraphDatabaseAPI db)
db - public WrappingNeoServerBootstrapper(org.neo4j.kernel.GraphDatabaseAPI db,
Configurator configurator)
ServerConfigurator is written to fit well here, see its'
documentation.db - configurator - protected Configurator createConfigurator()
createConfigurator in class Bootstrapperprotected NeoServer createNeoServer()
createNeoServer in class BootstrapperCopyright © 2002-2013 The Neo4j Graph Database Project. All Rights Reserved.