Package org.neo4j.server.configuration

Examples of org.neo4j.server.configuration.ServerConfigurator.configuration()


    }

    public static NeoServer startWebServer(
      ImpermanentGraphDatabase gdb, int port) {
      Configurator configurator = new ServerConfigurator(gdb);
      configurator.configuration().setProperty(Configurator.WEBSERVER_PORT_PROPERTY_KEY,  port);
    NeoServer server = new WrappingNeoServer(gdb, configurator );
    server.start();
        tryConnect();
    return server;
  }
View Full Code Here


    @BeforeClass
    public static void startServerWithACleanDb() {
        graphDatabase = new EmbeddedGraphDatabase("target/db1");

        ServerConfigurator config = new ServerConfigurator(graphDatabase);
        config.configuration().setProperty("org.neo4j.server.thirdparty.delete.key", "secret-key");
        config.getThirdpartyJaxRsClasses().add(new ThirdPartyJaxRsPackage("org.neo4j.server.extension.test.delete", "/cleandb"));

        WrappingNeoServerBootstrapper bootstrapper = new WrappingNeoServerBootstrapper(graphDatabase, config);
        bootstrapper.start();
        neoServer = bootstrapper.getServer();
View Full Code Here

    public void setUp() throws Exception {

        ImpermanentGraphDatabase db = new ImpermanentGraphDatabase();

        ServerConfigurator config = new ServerConfigurator(db);
        config.configuration().setProperty("org.neo4j.server.credentials", "neo4j:master");
        config.getThirdpartyJaxRsPackages().add(new ThirdPartyJaxRsPackage("org.neo4j.server.extension.auth", "/admin"));
        testBootstrapper = new WrappingNeoServerBootstrapper(db, config);
        testBootstrapper.start();
    }
View Full Code Here

    try {
      GraphDatabaseAPI api = (GraphDatabaseAPI) StructrApp.getInstance().getGraphDatabaseService();

      ServerConfigurator config = new ServerConfigurator(api);

      config.configuration()
        .addProperty(Configurator.WEBSERVER_ADDRESS_PROPERTY_KEY, host);

      config.configuration()
        .addProperty(Configurator.WEBSERVER_PORT_PROPERTY_KEY, port);
     
View Full Code Here

      ServerConfigurator config = new ServerConfigurator(api);

      config.configuration()
        .addProperty(Configurator.WEBSERVER_ADDRESS_PROPERTY_KEY, host);

      config.configuration()
        .addProperty(Configurator.WEBSERVER_PORT_PROPERTY_KEY, port);
     
      logger.log(Level.INFO, "Starting Neo4j server on port {0}", new Object[] { String.valueOf(port) });

      neoServerBootstrapper = new WrappingNeoServerBootstrapper(api, config);
View Full Code Here

            @Override
            public List<ThirdPartyJaxRsPackage> getThirdpartyJaxRsPackages() {
                return Collections.singletonList(new ThirdPartyJaxRsPackage("org.springframework.data.neo4j.rest.support","/test"));
            }
        };
        final Configuration configuration = configurator.configuration();
        configuration.setProperty(Configurator.WEBSERVER_PORT_PROPERTY_KEY, PORT);
        final WrappingNeoServerBootstrapper bootstrapper = new WrappingNeoServerBootstrapper(db, configurator);
        touched=0;
        bootstrapper.start();
        neoServer = bootstrapper.getServer();
View Full Code Here

    @BeforeClass
    public static void startDb() throws Exception {
        db = new ImpermanentGraphDatabase();
        final ServerConfigurator configurator = new ServerConfigurator(db);
        configurator.configuration().setProperty(Configurator.WEBSERVER_PORT_PROPERTY_KEY,PORT);
        final WrappingNeoServerBootstrapper bootstrapper = new WrappingNeoServerBootstrapper(db, configurator);
        int exit = bootstrapper.start();
        if (exit != 0 ) throw new IllegalStateException("Server not started correctly.");
        neoServer = bootstrapper.getServer();
View Full Code Here

    private static ImpermanentGraphDatabase db;

    public void startServer() throws Exception {
        db = new ImpermanentGraphDatabase();
        final ServerConfigurator configurator = new ServerConfigurator(db);
        configurator.configuration().setProperty(Configurator.WEBSERVER_PORT_PROPERTY_KEY,PORT);
        final WrappingNeoServerBootstrapper bootstrapper = new WrappingNeoServerBootstrapper(db, configurator);
        bootstrapper.start();
        neoServer = bootstrapper.getServer();
    }
View Full Code Here

    ServerConfigurator config = new ServerConfigurator( graphDb );
    Iterator<String> iterator = serverProperties.keySet().iterator();
    while(iterator.hasNext()) {
      String key = iterator.next();
      config.configuration().setProperty(key, serverProperties.get(key));
    }

    new WrappingNeoServerBootstrapper( graphDb, config ).start();

    return graphDb;
View Full Code Here

    ServerConfigurator config = new ServerConfigurator( graphDb );
    Iterator<String> iterator = serverProperties.keySet().iterator();
    while(iterator.hasNext()) {
      String key = iterator.next();
      config.configuration().setProperty(key, serverProperties.get(key));
    }

    new WrappingNeoServerBootstrapper( graphDb, config ).start();

    return graphDb;
View Full Code Here

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.