@Singleton @Requires(classes=org.neo4j.harness.ServerControls.class) public class EmbeddedNeo4jServer extends Object implements io.micronaut.context.event.BeanCreatedEventListener<Neo4jBoltConfiguration>, Closeable
Constructor and Description |
---|
EmbeddedNeo4jServer() |
Modifier and Type | Method and Description |
---|---|
void |
close() |
Neo4jBoltConfiguration |
onCreated(io.micronaut.context.event.BeanCreatedEvent<Neo4jBoltConfiguration> event) |
static org.neo4j.harness.ServerControls |
start(File dataLocation)
Start a server on a random free port.
|
static org.neo4j.harness.ServerControls |
start(File dataLocation,
Map<String,Object> options)
Start a server on a random free port.
|
static org.neo4j.harness.ServerControls |
start(InetSocketAddress inetAddr)
Start a server on the given address.
|
static org.neo4j.harness.ServerControls |
start(InetSocketAddress inetAddr,
File dataLocation)
Start a server on the given address.
|
static org.neo4j.harness.ServerControls |
start(InetSocketAddress inetAddr,
File dataLocation,
Map<String,Object> options)
Start a server on the given address.
|
static org.neo4j.harness.ServerControls |
start(String address)
Start a server on the given address.
|
static org.neo4j.harness.ServerControls |
start(String address,
File dataLocation)
Start a server on the given address.
|
static org.neo4j.harness.ServerControls |
start(String address,
File dataLocation,
Map<String,Object> options)
Start a server on the given address.
|
static org.neo4j.harness.ServerControls |
start(String host,
int port)
Start a server on the given address.
|
static org.neo4j.harness.ServerControls |
start(String host,
int port,
File dataLocation)
Start a server on the given address.
|
static org.neo4j.harness.ServerControls |
start(String host,
int port,
File dataLocation,
Map<String,Object> options)
Start a server on the given address.
|
public Neo4jBoltConfiguration onCreated(io.micronaut.context.event.BeanCreatedEvent<Neo4jBoltConfiguration> event)
onCreated
in interface io.micronaut.context.event.BeanCreatedEventListener<Neo4jBoltConfiguration>
public static org.neo4j.harness.ServerControls start(File dataLocation) throws IOException
dataLocation
- The data locationIOException
- i/o exceptionpublic static org.neo4j.harness.ServerControls start(File dataLocation, Map<String,Object> options) throws IOException
dataLocation
- The data locationoptions
- options for neo4jIOException
- i/o exceptionpublic static org.neo4j.harness.ServerControls start(InetSocketAddress inetAddr)
inetAddr
- The inet addressServerControls
public static org.neo4j.harness.ServerControls start(InetSocketAddress inetAddr, File dataLocation)
inetAddr
- The inet addressdataLocation
- dataLocation fileServerControls
public static org.neo4j.harness.ServerControls start(InetSocketAddress inetAddr, File dataLocation, Map<String,Object> options)
inetAddr
- The inet addressdataLocation
- dataLocation fileoptions
- options for neo4jServerControls
public static org.neo4j.harness.ServerControls start(String address)
address
- The addressServerControls
public static org.neo4j.harness.ServerControls start(String address, File dataLocation)
address
- The addressdataLocation
- dataLocation fileServerControls
public static org.neo4j.harness.ServerControls start(String address, File dataLocation, Map<String,Object> options)
address
- The addressoptions
- options for neo4jdataLocation
- dataLocation fileServerControls
public static org.neo4j.harness.ServerControls start(String host, int port)
host
- The hostport
- The portServerControls
public static org.neo4j.harness.ServerControls start(String host, int port, File dataLocation)
host
- The hostport
- The portdataLocation
- dataLocation fileServerControls
public static org.neo4j.harness.ServerControls start(String host, int port, File dataLocation, Map<String,Object> options)
host
- The hostport
- The portdataLocation
- dataLocation fileoptions
- options for neo4jServerControls
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
IOException