Interface DtlsConnection.Builder<B extends Builder<B>>
-
Method Summary
Modifier and TypeMethodDescriptiondefault BsetAdvertisedProtocols(String[] advertisedProtocols) The list of application-layer protocols that the connection advertises that it is willing to speak.default BsetBaseSocket(DatagramBased baseSocket) TheGDatagramBasedthat the connection wraps.default BsetCertificate(TlsCertificate certificate) The connection's certificate; see g_dtls_connection_set_certificate().default BsetDatabase(TlsDatabase database) The certificate database to use when verifying this TLS connection.default BsetInteraction(TlsInteraction interaction) AGTlsInteractionobject to be used when the connection or certificate database need to interact with the user.default BsetRehandshakeMode(TlsRehandshakeMode rehandshakeMode) Deprecated.The rehandshake mode is ignored.default BsetRequireCloseNotify(boolean requireCloseNotify) Whether or not proper TLS close notification is required.Methods inherited from interface org.javagi.gobject.BuilderInterface
addBuilderProperty, connect, connect, getArena
-
Method Details
-
setAdvertisedProtocols
The list of application-layer protocols that the connection advertises that it is willing to speak. See g_dtls_connection_set_advertised_protocols().- Parameters:
advertisedProtocols- the value for theadvertised-protocolsproperty- Returns:
- the
Builderinstance is returned, to allow method chaining - Since:
- 2.60
-
setBaseSocket
TheGDatagramBasedthat the connection wraps. Note that this may be any implementation ofGDatagramBased, not just aGSocket.- Parameters:
baseSocket- the value for thebase-socketproperty- Returns:
- the
Builderinstance is returned, to allow method chaining - Since:
- 2.48
-
setCertificate
The connection's certificate; see g_dtls_connection_set_certificate().- Parameters:
certificate- the value for thecertificateproperty- Returns:
- the
Builderinstance is returned, to allow method chaining - Since:
- 2.48
-
setDatabase
The certificate database to use when verifying this TLS connection. If no certificate database is set, then the default database will be used. See g_tls_backend_get_default_database().When using a non-default database,
GDtlsConnectionmust fall back to using theGTlsDatabaseto perform certificate verification using g_tls_database_verify_chain(), which means certificate verification will not be able to make use of TLS session context. This may be less secure. For example, if you create your ownGTlsDatabasethat just wraps the defaultGTlsDatabase, you might expect that you have not changed anything, but this is not true because you may have altered the behavior ofGDtlsConnectionby causing it to use g_tls_database_verify_chain(). See the documentation of g_tls_database_verify_chain() for more details on specific security checks that may not be performed. Accordingly, setting a non-default database is discouraged except for specialty applications with unusual security requirements.- Parameters:
database- the value for thedatabaseproperty- Returns:
- the
Builderinstance is returned, to allow method chaining - Since:
- 2.48
-
setInteraction
AGTlsInteractionobject to be used when the connection or certificate database need to interact with the user. This will be used to prompt the user for passwords where necessary.- Parameters:
interaction- the value for theinteractionproperty- Returns:
- the
Builderinstance is returned, to allow method chaining - Since:
- 2.48
-
setRehandshakeMode
Deprecated.The rehandshake mode is ignored.The rehandshaking mode. See g_dtls_connection_set_rehandshake_mode().- Parameters:
rehandshakeMode- the value for therehandshake-modeproperty- Returns:
- the
Builderinstance is returned, to allow method chaining - Since:
- 2.48
-
setRequireCloseNotify
Whether or not proper TLS close notification is required. See g_dtls_connection_set_require_close_notify().- Parameters:
requireCloseNotify- the value for therequire-close-notifyproperty- Returns:
- the
Builderinstance is returned, to allow method chaining - Since:
- 2.48
-