public static interface Client.Builder.Server
Modifier and Type | Interface and Description |
---|---|
static class |
Client.Builder.Server.SecurityType
The security type, TLS or no.
|
Modifier and Type | Method and Description |
---|---|
@NonNull Client.Builder.Server |
address(@NonNull HostWithPort hostWithPort)
Sets the server host and port to which the client will connect.
|
@NonNull Client.Builder.Server |
host(@NonNull String host)
Sets the server host to which the client will connect.
|
@NonNull Client.Builder.Server |
password(@Nullable String password)
Sets the server password.
|
@NonNull Client.Builder.Server |
port(int port)
Deprecated.
use
port(int, SecurityType) instead |
@NonNull Client.Builder.Server |
port(int port,
@NonNull Client.Builder.Server.SecurityType security)
Sets the server port to which the client will connect and
determines TLS setting.
|
@NonNull Client.Builder.Server |
secure(boolean secure)
Deprecated.
use
port(int, SecurityType) instead |
@NonNull Client.Builder.Server |
secureKey(@Nullable Path keyFile)
Sets the private key for TLS connection.
|
@NonNull Client.Builder.Server |
secureKeyCertChain(@Nullable Path keyCertChainFile)
Sets the key for TLS connection.
|
@NonNull Client.Builder.Server |
secureKeyPassword(@Nullable String password)
Sets the private key password for TLS connection.
|
@NonNull Client.Builder.Server |
secureTrustManagerFactory(@Nullable TrustManagerFactory factory)
Sets the
TrustManagerFactory for TLS connection. |
@NonNull Client.Builder |
then()
Returns to the root builder.
|
@NonNull Client.Builder.Server address(@NonNull HostWithPort hostWithPort)
By default, the host is localhost and port is 6697.
hostWithPort
- IRC server host and portIllegalArgumentException
- for null parameter@NonNull Client.Builder.Server host(@NonNull String host)
By default, the host is localhost.
host
- IRC server hostIllegalArgumentException
- for null host@Deprecated @NonNull Client.Builder.Server port(int port)
port(int, SecurityType)
insteadBy default, the port is 6697.
port
- IRC server port@NonNull Client.Builder.Server port(int port, @NonNull Client.Builder.Server.SecurityType security)
Client.Builder.Server.SecurityType.SECURE
.port
- IRC server portsecurity
- TLS security setting@NonNull Client.Builder.Server password(@Nullable String password)
If not set, no password is sent
password
- server password or null to not send one@Deprecated @NonNull Client.Builder.Server secure(boolean secure)
port(int, SecurityType)
instead
Note that by default the TrustManager used does not accept the
certificates of many popular networks. You must use secureTrustManagerFactory(TrustManagerFactory)
to set your own
TrustManagerFactory.
secure
- true for TLS@NonNull Client.Builder.Server secureKeyCertChain(@Nullable Path keyCertChainFile)
keyCertChainFile
- X.509 certificate chain file in PEM formatsecure(boolean)
@NonNull Client.Builder.Server secureKey(@Nullable Path keyFile)
keyFile
- PKCS#8 private key file in PEM formatsecure(boolean)
@NonNull Client.Builder.Server secureKeyPassword(@Nullable String password)
password
- password for private keysecure(boolean)
@NonNull Client.Builder.Server secureTrustManagerFactory(@Nullable TrustManagerFactory factory)
TrustManagerFactory
for TLS connection.factory
- trust manager suppliersecure(boolean)
@NonNull Client.Builder then()
Copyright © 2013–2021 Kitteh. All rights reserved.