public class URLEndpointListenerConfiguration extends Object
Modifier and Type | Field and Description |
---|---|
static int |
MAX_PORT |
static int |
MIN_PORT |
Constructor and Description |
---|
URLEndpointListenerConfiguration(Database database)
Create a listener configuration, for the specified database, with default values.
|
Modifier and Type | Method and Description |
---|---|
ListenerAuthenticator |
getAuthenticator()
Get the configured authenticator.
|
Database |
getDatabase()
Get the configured database.
|
String |
getNetworkInterface()
Get the configured network interface.
|
int |
getPort()
Get the configured port.
|
TLSIdentity |
getTlsIdentity()
Get the configured TLS identity.
|
boolean |
isDeltaSyncEnabled()
Is delta sync enabled.
|
boolean |
isReadOnly()
Is connection read-only.
|
boolean |
isTlsDisabled()
Get configured connection type.
|
void |
setAuthenticator(ListenerAuthenticator authenticator)
Set the authenticator.
|
void |
setDisableTls(boolean disableTls)
Set the configured security protocol.
|
void |
setEnableDeltaSync(boolean enableDeltaSync)
Set delta sync enabled.
|
void |
setNetworkInterface(String networkInterface)
Set the configured network interface.
|
void |
setPort(int port)
Set the configured port.
|
void |
setReadOnly(boolean readOnly)
Set the connection read-only.
|
void |
setTlsIdentity(TLSIdentity identity)
Set the certificates and keys for the associated listener.
|
public static final int MIN_PORT
public static final int MAX_PORT
public URLEndpointListenerConfiguration(@NonNull Database database)
database
- the database to which the listener is attached@NonNull public Database getDatabase()
@Nullable public String getNetworkInterface()
public void setNetworkInterface(@Nullable String networkInterface)
networkInterface
- the name of the interface on which to configure the listener (e.g. "en0")public int getPort()
public void setPort(int port)
port
- the port number on which to configure the listener (between 0 and 65535, inclusive)public boolean isTlsDisabled()
public void setDisableTls(boolean disableTls)
disableTls
- true to disable TLS security.@Nullable public TLSIdentity getTlsIdentity()
public void setTlsIdentity(@Nullable TLSIdentity identity)
identity
- a TLSIdentity that the listener will supply to authenticate itself.@Nullable public ListenerAuthenticator getAuthenticator()
public void setAuthenticator(@Nullable ListenerAuthenticator authenticator)
ListenerCertificateAuthenticator
When TLS is disabled, a null authenticator (the default) will allow all clients.
A non-null authenticator will be passed the client's credentials
and is completely responsible for authenticating them.
See ListenerPasswordAuthenticator
authenticator
- the client authenticatorpublic boolean isReadOnly()
public void setReadOnly(boolean readOnly)
readOnly
- set true to make the configured listener read-onlypublic boolean isDeltaSyncEnabled()
public void setEnableDeltaSync(boolean enableDeltaSync)
enableDeltaSync
- set true to enable delta sync