Package org.hcjf.io.net.http
Class HttpsServer
- java.lang.Object
-
- org.hcjf.io.net.NetServiceConsumer<S,D>
-
- org.hcjf.io.net.NetServer<HttpSession,HttpPackage>
-
- org.hcjf.io.net.http.HttpServer
-
- org.hcjf.io.net.http.HttpsServer
-
- All Implemented Interfaces:
ServiceConsumer
public class HttpsServer extends HttpServer
- Author:
- javaito.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.hcjf.io.net.http.HttpServer
HttpServer.AccessControl, HttpServer.ContextMatcher
-
Nested classes/interfaces inherited from class org.hcjf.io.net.NetServiceConsumer
NetServiceConsumer.DecoupledAction
-
-
Constructor Summary
Constructors Constructor Description HttpsServer()HttpsServer(java.lang.Integer port)
-
Method Summary
Modifier and Type Method Description static voidcreate(java.lang.Integer port, Context... contexts)protected javax.net.ssl.KeyManager[]createKeyManagers()Creates the key managers required to initiate theSSLContext.protected javax.net.ssl.TrustManager[]createTrustManagers()Creates the trust managers required to initiate theSSLContext, using a JKS keystore as an input.java.lang.StringgetKeyPassword()Return the key password.java.nio.file.PathgetKeystoreFilePath()Return the path where the key store file is.java.lang.StringgetKeystorePassword()Return the key store password.java.lang.StringgetKeyType()Return the key type.java.security.ProvidergetProvider()Return the java security provider.protected javax.net.ssl.SSLEnginegetSSLEngine()Creates the SSL engine.java.lang.StringgetSslProtocol()Return the ssl protocol.java.nio.file.PathgetTrustedCertsFilePath()Return the path where trusted certs file is.voidsetKeyPassword(java.lang.String keyPassword)Set the kwy password.voidsetKeystoreFilePath(java.nio.file.Path keystoreFilePath)Set the path where the key store file is.voidsetKeystorePassword(java.lang.String keystorePassword)Set the key store password.voidsetKeyType(java.lang.String keyType)Set the key type.voidsetProvider(java.security.Provider provider)Set the java security provider.voidsetSslProtocol(java.lang.String sslProtocol)Set the ssl protocol.voidsetTrustedCertsFilePath(java.nio.file.Path trustedCertsFilePath)Set the path where trusted certs file is.-
Methods inherited from class org.hcjf.io.net.http.HttpServer
addAccessControl, addContext, checkSession, createSession, decode, destroySession, encode, findContext, getSessionManager, isCreationTimeoutAvailable, onCheckSessionError, onContextNotFound, onDisconnect, onNotCheckedSession, onRead, onStart, onStop, onUnresponsiveContext, onWrite, setSessionManager
-
Methods inherited from class org.hcjf.io.net.NetServer
isDisconnectAndRemove, isMultiSession, start, stop
-
Methods inherited from class org.hcjf.io.net.NetServiceConsumer
addDecoupledAction, decoupleIoAction, disconnect, getName, getPort, getProtocol, getService, getShutdownFrame, getShutdownPackage, getSocketOptions, getWriteWaitForTimeout, isDecoupledIoAction, onConnect, onConnect, onDisconnect, onRead, onWrite, setService, setWriteWaitForTimeout, write, write
-
-
-
-
Method Detail
-
create
public static void create(java.lang.Integer port, Context... contexts)
-
getSSLEngine
protected javax.net.ssl.SSLEngine getSSLEngine()
Creates the SSL engine.- Overrides:
getSSLEnginein classNetServiceConsumer<HttpSession,HttpPackage>- Returns:
- SSL engine instance.
-
getKeystorePassword
public final java.lang.String getKeystorePassword()
Return the key store password.- Returns:
- Key store password.
-
setKeystorePassword
public final void setKeystorePassword(java.lang.String keystorePassword)
Set the key store password.- Parameters:
keystorePassword- Key store password.
-
getKeyPassword
public final java.lang.String getKeyPassword()
Return the key password.- Returns:
- Key password.
-
setKeyPassword
public final void setKeyPassword(java.lang.String keyPassword)
Set the kwy password.- Parameters:
keyPassword- Key password.
-
getKeystoreFilePath
public final java.nio.file.Path getKeystoreFilePath()
Return the path where the key store file is.- Returns:
- Key store file path.
-
setKeystoreFilePath
public final void setKeystoreFilePath(java.nio.file.Path keystoreFilePath)
Set the path where the key store file is.- Parameters:
keystoreFilePath- Key store file path.
-
getTrustedCertsFilePath
public final java.nio.file.Path getTrustedCertsFilePath()
Return the path where trusted certs file is.- Returns:
- Trusted certs file path.
-
setTrustedCertsFilePath
public final void setTrustedCertsFilePath(java.nio.file.Path trustedCertsFilePath)
Set the path where trusted certs file is.- Parameters:
trustedCertsFilePath- Trusted certs file path.
-
getKeyType
public final java.lang.String getKeyType()
Return the key type.- Returns:
- Key type.
-
setKeyType
public final void setKeyType(java.lang.String keyType)
Set the key type.- Parameters:
keyType- Key type.
-
getSslProtocol
public final java.lang.String getSslProtocol()
Return the ssl protocol.- Returns:
- Ssl protocol.
-
setSslProtocol
public final void setSslProtocol(java.lang.String sslProtocol)
Set the ssl protocol.- Parameters:
sslProtocol- Ssl protocol.
-
getProvider
public final java.security.Provider getProvider()
Return the java security provider.- Returns:
- Java security provider implementation.
-
setProvider
public final void setProvider(java.security.Provider provider)
Set the java security provider.- Parameters:
provider- Java security provider implementation.
-
createKeyManagers
protected javax.net.ssl.KeyManager[] createKeyManagers() throws java.lang.ExceptionCreates the key managers required to initiate theSSLContext.- Returns:
KeyManagerarray that will be used to initiate theSSLContext.- Throws:
java.lang.Exception- Key managers creation exception
-
createTrustManagers
protected javax.net.ssl.TrustManager[] createTrustManagers() throws java.lang.ExceptionCreates the trust managers required to initiate theSSLContext, using a JKS keystore as an input.- Returns:
TrustManagerarray, that will be used to initiate theSSLContext.- Throws:
java.lang.Exception- Trust manager creation exception
-
-