Class Server
-
- All Implemented Interfaces:
-
java.lang.AutoCloseable
public final class Server implements AutoCloseable
Server proxies Bolt data to a Neo4j (5+ compatible) database and performs dynamic message transformation through the plugin.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interfaceServer.PluginServer.Plugin enables Server functionality to be augmented and/or observed.
Server.Plugin function execution is non-blocking, but occurs synchronously within Server proxy operations. Therefore, implement Server.Plugin functions judiciously, considering that long suspension time will impact Server throughput.
Server.Plugin function invocation is not thread-safe. Thus, perform any necessary synchronization in the Server.Plugin implementation.
public interfaceServer.EventA Server event.
public classServer.StartedThe Server has started.
public final classServer.ConnectedThe Server established a connection.
public final classServer.DisconnectedThe Server closed the connection.
public interfaceServer.ConnectionA proxy connection.
public final classServer.ProxiedThe Server proxied the intercepted Bolt.Message from the source to the destination.
public classServer.StoppedThe Server has stopped.
-
Field Summary
Fields Modifier and Type Field Description private final URIgraphprivate final InetSocketAddressaddress
-
Constructor Summary
Constructors Constructor Description Server(URI graph, Server.Plugin plugin, InetSocketAddress address, Integer parallelism, TrustManager trustManager)Server(URI graph, Server.Plugin plugin, InetSocketAddress address, Integer parallelism)Server(URI graph, Server.Plugin plugin, InetSocketAddress address)Server(URI graph, Server.Plugin plugin)Server(URI graph)
-
Method Summary
Modifier and Type Method Description final URIgetGraph()the URI of the graph database to proxy data to/from final InetSocketAddressgetAddress()the InetSocketAddress to bind the Server to final Unitstart()Start the proxy Server in a Thread. Unitclose()Stop the Server. -
-
Constructor Detail
-
Server
Server(URI graph, Server.Plugin plugin, InetSocketAddress address, Integer parallelism, TrustManager trustManager)
- Parameters:
plugin- the Server.Plugin to use to intercept proxied messages and observe server events
-
Server
Server(URI graph, Server.Plugin plugin, InetSocketAddress address, Integer parallelism)
- Parameters:
plugin- the Server.Plugin to use to intercept proxied messages and observe server events
-
Server
Server(URI graph, Server.Plugin plugin, InetSocketAddress address)
- Parameters:
plugin- the Server.Plugin to use to intercept proxied messages and observe server events
-
Server
Server(URI graph, Server.Plugin plugin)
- Parameters:
plugin- the Server.Plugin to use to intercept proxied messages and observe server events
-
Server
Server(URI graph)
-
-
Method Detail
-
getAddress
final InetSocketAddress getAddress()
the InetSocketAddress to bind the Server to
-
start
@Synchronized() final Unit start()
Start the proxy Server in a Thread.
The Server is ready to accept client connections after Server.start returns.
-
-
-
-