org.neo4j.server
Class WrappingNeoServerBootstrapper
java.lang.Object
org.neo4j.server.Bootstrapper
org.neo4j.server.WrappingNeoServerBootstrapper
public class WrappingNeoServerBootstrapper
- extends Bootstrapper
A bootstrapper for the Neo4j Server that takes an already instantiated
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.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
WrappingNeoServerBootstrapper
public WrappingNeoServerBootstrapper(org.neo4j.kernel.GraphDatabaseAPI db)
- Create an instance with default settings.
- Parameters:
db -
WrappingNeoServerBootstrapper
public WrappingNeoServerBootstrapper(org.neo4j.kernel.GraphDatabaseAPI db,
Configurator configurator)
- Create an instance with custom documentation.
ServerConfigurator is written to fit well here, see its'
documentation.
- Parameters:
db - configurator -
createConfigurator
protected Configurator createConfigurator()
- Overrides:
createConfigurator in class Bootstrapper
createNeoServer
protected NeoServer createNeoServer()
- Specified by:
createNeoServer in class Bootstrapper
Copyright © 2002-2013 The Neo4j Graph Database Project. All Rights Reserved.