java.lang.Object
cloud.piranha.embedded.EmbeddedPiranha
- All Implemented Interfaces:
Piranha
- Direct Known Subclasses:
MicroEmbeddedPiranha
The embeddable version of Piranha.
- Author:
- Manfred Riem ([email protected])
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiondestroy()
Destroy the web application.{Initialize the web application.service
(WebApplicationRequest request) This method services a request by dispatching it to the configured Servlet and/or Filters.void
service
(WebApplicationRequest request, WebApplicationResponse response) Service the request and response.This method services a request by dispatching it to the configured Servlet and/or Filters.start()
Start the web application.stop()
Stop the web application.
-
Constructor Details
-
EmbeddedPiranha
public EmbeddedPiranha()Constructor. -
EmbeddedPiranha
Constructor.- Parameters:
webApplication
- the web application to use.
-
-
Method Details
-
destroy
Destroy the web application.- Returns:
- the instance.
-
getWebApplication
{- Returns:
- the web application}
-
initialize
Initialize the web application.- Returns:
- the instance.
-
service
public EmbeddedResponse service(String servletPath, String... parameters) throws IOException, jakarta.servlet.ServletException This method services a request by dispatching it to the configured Servlet and/or Filters.- Parameters:
servletPath
- the request path, e.g./foo/bar
parameters
- the request parameters, with each even parameter the name, and odd parameter the value. e.g./foo, 1, bar, 2
- Returns:
- the response generated by the Servlet and/or Filters
- Throws:
IOException
- when an I/O error occurs.jakarta.servlet.ServletException
- when a Servlet error occurs.
-
service
public EmbeddedResponse service(WebApplicationRequest request) throws IOException, jakarta.servlet.ServletException This method services a request by dispatching it to the configured Servlet and/or Filters.- Parameters:
request
- the request.- Returns:
- the response generated by the Servlet and/or Filters
- Throws:
IOException
- when an I/O error occurs.jakarta.servlet.ServletException
- when a Servlet error occurs.
-
service
public void service(WebApplicationRequest request, WebApplicationResponse response) throws IOException, jakarta.servlet.ServletException Description copied from interface:Piranha
Service the request and response.- Specified by:
service
in interfacePiranha
- Parameters:
request
- the request.response
- the response.- Throws:
IOException
- when an I/O error occurs.jakarta.servlet.ServletException
- when a Servlet error occurs.
-
start
Start the web application.- Returns:
- the instance.
-
stop
Stop the web application.- Returns:
- the instance.
-