Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow disabling HTTP in Neo4j harness
Before this change, it wasn't possible to start a database using `Neo4jRule` with HTTP turned off. Every started database needed to have HTTP enabled and started an embedded Jetty on the default/configured HTTP port. This commit allows disabling the HTTP connector via: ``` new Neo4jRule().withConfig( "dbms.connector.http.enabled", "false" ); ``` It is also possible to disable both HTTP and HTTPS making the database only accessible via Bolt: ``` new Neo4jRule().withConfig( "dbms.connector.http.enabled", "false" ) .withConfig( "dbms.connector.https.enabled", "false" ); ``` Such configuration will make Neo4j not start an embedded Jetty server. Neo4j browser and REST endpoints will thus not be accessible. HTTP connector was mandatory because server builder was only able to instantiate Neo4j server, which created the database. So lifecycle of the core database was managed entirely by the server. This commit makes the in-process server builder able to create core database separately from a server component. Based on connector configuration it can then decide if server component is needed or not. Dummy `DisabledNeoServer` is instantiated when HTTP and HTTPS are turned off.
- Loading branch information
Showing
8 changed files
with
222 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.