public static interface Client.Builder.Server
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)
Sets the server port to which the client will connect.
|
@NonNull Client.Builder.Server |
secure(boolean secure)
Sets whether the client connects via TLS.
|
@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@NonNull Client.Builder.Server port(int port)
By default, the port is 6697.
port
- IRC server port@NonNull Client.Builder.Server password(@Nullable String password)
If not set, no password is sent
password
- server password or null to not send one@NonNull Client.Builder.Server secure(boolean secure)
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–2019 Kitteh. All rights reserved.