Package ej.wasi
Interface WasiSSLRegistry
-
- All Superinterfaces:
WasiIORegistry
public interface WasiSSLRegistry extends WasiIORegistry
Provides per-module SSL context and SSL connection registration and resolution.Extends
WasiIORegistryso a single cast onWasmModule.getHostInfo()grants access to both file-descriptor and SSL state.Implemented by
WasiContext(package-private).
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description WasiSSLgetSSL(int id)Returns theWasiSSLregistered under the given identifier, ornullif not found.SSLContextgetSSLContext(int id)Returns the SSL context registered under the given identifier, ornullif not found.intregisterSSL(WasiSSL ssl)Registers the givenWasiSSLand returns its identifier.intregisterSSLContext(SSLContext ctx)Registers the given SSL context and returns its identifier.voidunregisterSSL(int id)Unregisters theWasiSSLidentified by the given identifier.voidunregisterSSLContext(int id)Unregisters the SSL context identified by the given identifier.-
Methods inherited from interface ej.wasi.WasiIORegistry
getIO, registerIO
-
-
-
-
Method Detail
-
registerSSLContext
int registerSSLContext(SSLContext ctx)
Registers the given SSL context and returns its identifier.- Parameters:
ctx- the SSL context to register.- Returns:
- the identifier of the registered SSL context.
-
getSSLContext
@Nullable SSLContext getSSLContext(int id)
Returns the SSL context registered under the given identifier, ornullif not found.- Parameters:
id- the SSL context identifier.- Returns:
- the
SSLContext, ornull.
-
unregisterSSLContext
void unregisterSSLContext(int id)
Unregisters the SSL context identified by the given identifier.- Parameters:
id- the SSL context identifier to unregister.
-
getSSL
@Nullable WasiSSL getSSL(int id)
Returns theWasiSSLregistered under the given identifier, ornullif not found.- Parameters:
id- the SSL identifier.- Returns:
- the
WasiSSL, ornull.
-
unregisterSSL
void unregisterSSL(int id)
Unregisters theWasiSSLidentified by the given identifier.- Parameters:
id- the SSL identifier to unregister.
-
-