public class ConnectionFactory
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_PORT |
io.netty.channel.EventLoopGroup |
group |
Constructor and Description |
---|
ConnectionFactory()
Create a new ConnectionFactory using a new
NioEventLoopGroup |
ConnectionFactory(io.netty.channel.EventLoopGroup group)
Create a new ConnectionFactory
|
Modifier and Type | Method and Description |
---|---|
Connection |
connect(Certs certs,
java.lang.String host)
Create and start a connection to a GoshawkDB node using the default port (7894)
|
Connection |
connect(Certs certs,
java.lang.String host,
int port)
Create and start a connection to a GoshawkDB node using the specified port
|
public static final int DEFAULT_PORT
public final io.netty.channel.EventLoopGroup group
public ConnectionFactory()
NioEventLoopGroup
public ConnectionFactory(io.netty.channel.EventLoopGroup group)
group
- the netty EventLoopGroup
to usepublic Connection connect(Certs certs, java.lang.String host) throws java.lang.InterruptedException
certs
- The certificates to use for mutual authenticationhost
- The host to connect to (host name or IP address). This can be in host:port
formatjava.lang.InterruptedException
- if an interruption occurs during connectionpublic Connection connect(Certs certs, java.lang.String host, int port) throws java.lang.InterruptedException
certs
- The certificates to use for mutual authenticationhost
- The host to connect to (host name or IP address)port
- The port to connect tojava.lang.InterruptedException
- if an interruption occurs during connection