java.lang.Object
cloud.piranha.server.ServerPiranha
- All Implemented Interfaces:
cloud.piranha.core.api.Piranha
,Runnable
The Piranha Server runtime.
- Author:
- Manfred Riem (mriem@manorrock.com)
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
run()
Run method.void
service
(cloud.piranha.core.api.WebApplicationRequest request, cloud.piranha.core.api.WebApplicationResponse response) void
setDefaultExtensionClass
(Class<? extends cloud.piranha.core.api.WebApplicationExtension> defaultExtensionClass) Set the default extension class.void
setExitOnStop
(boolean exitOnStop) Set the exit on stop flag.void
setHttpPort
(int httpPort) Set the HTTP server port.void
setHttpsPort
(int httpsPort) Set the HTTPS server port.void
setJpmsEnabled
(boolean jpmsEnabled) Enable/disable JPMS.void
setSslKeystoreFile
(String sslKeystoreFile) Set the SSL keystore file.void
setSslTruststoreFile
(String sslTruststoreFile) Set the SSL truststore file.void
setWebAppsDir
(File webAppsDir) Set the web applications directory.void
start()
Start the server.void
Start the HTTP server (if requested).void
stop()
Stop the server.
-
Constructor Details
-
ServerPiranha
public ServerPiranha()
-
-
Method Details
-
run
public void run()Run method. -
service
public void service(cloud.piranha.core.api.WebApplicationRequest request, cloud.piranha.core.api.WebApplicationResponse response) throws IOException, jakarta.servlet.ServletException - Specified by:
service
in interfacecloud.piranha.core.api.Piranha
- Throws:
IOException
jakarta.servlet.ServletException
-
setDefaultExtensionClass
public void setDefaultExtensionClass(Class<? extends cloud.piranha.core.api.WebApplicationExtension> defaultExtensionClass) Set the default extension class.- Parameters:
defaultExtensionClass
- the default extension class.
-
setExitOnStop
public void setExitOnStop(boolean exitOnStop) Set the exit on stop flag.- Parameters:
exitOnStop
- the exit on stop flag.
-
setHttpPort
public void setHttpPort(int httpPort) Set the HTTP server port.- Parameters:
httpPort
- the HTTP server port.
-
setHttpsPort
public void setHttpsPort(int httpsPort) Set the HTTPS server port.- Parameters:
httpsPort
- the HTTPS server port.
-
setJpmsEnabled
public void setJpmsEnabled(boolean jpmsEnabled) Enable/disable JPMS.- Parameters:
jpmsEnabled
- the JPMS enabled flag.
-
setSslKeystoreFile
Set the SSL keystore file.Convenience wrapper around the
javax.net.ssl.keyStore
system property. Note using this method sets the property for the entire JVM.- Parameters:
sslKeystoreFile
- the SSL keystore file.
-
setSslTruststoreFile
Set the SSL truststore file.Convenience wrapper around the
javax.net.ssl.trustStore
system property. Note using this method sets the property for the entire JVM.- Parameters:
sslTruststoreFile
- the SSL truststore file.
-
setWebAppsDir
Set the web applications directory.- Parameters:
webAppsDir
- the web applications directory.
-
start
public void start()Start the server. -
startHttpServer
public void startHttpServer()Start the HTTP server (if requested). -
stop
public void stop()Stop the server.
-