Class RestletServiceServlet
- java.lang.Object
-
- jakarta.servlet.GenericServlet
-
- jakarta.servlet.http.HttpServlet
-
- org.forgerock.openam.rest.jakarta.servlet.ServerServlet
-
- org.forgerock.openam.rest.service.RestletServiceServlet
-
- All Implemented Interfaces:
jakarta.servlet.Servlet,jakarta.servlet.ServletConfig,Serializable
public class RestletServiceServlet extends ServerServlet
This class is used to create an instance of the Restlet ServerServlet programmatically outside of the Servlet Container.
This enables the creation of an instance as a delegate that can be passed requests from another Java HttpServlet that is created by the Servlet Container.- Since:
- 12.0.0
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description RestletServiceServlet(jakarta.servlet.http.HttpServlet servlet, Class<? extends ServiceEndpointApplication> application, String name)Constructs an instance of the RestletServiceServlet.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetInitParameter(String name)StringgetInitParameter(String name, String defaultValue)Overridden to return the ServiceEndpointApplication class name for the "org.restlet.application" init parameter.EnumerationgetInitParameterNames()Overridden to include the "org.restlet.application" init parameter name.jakarta.servlet.ServletConfiggetServletConfig()jakarta.servlet.ServletContextgetServletContext()StringgetServletInfo()StringgetServletName()voidlog(String msg)voidlog(String message, Throwable t)-
Methods inherited from class org.forgerock.openam.rest.jakarta.servlet.ServerServlet
createApplication, createCall, createComponent, createServer, createWarClient, destroy, getApplication, getComponent, getContextPath, getLocalAddr, getLocalPort, getServer, init, init, init, loadClass, service
-
-
-
-
Constructor Detail
-
RestletServiceServlet
public RestletServiceServlet(jakarta.servlet.http.HttpServlet servlet, Class<? extends ServiceEndpointApplication> application, String name)Constructs an instance of the RestletServiceServlet.- Parameters:
servlet- The underlying container created Java HttpServlet.
-
-
Method Detail
-
getInitParameter
public String getInitParameter(String name, String defaultValue)
Overridden to return the ServiceEndpointApplication class name for the "org.restlet.application" init parameter.
All other parameter requests get passed onto the underlying Java HttpServlet.- Overrides:
getInitParameterin classServerServlet- Parameters:
name- The parameter name.defaultValue- The default to use in case the parameter is not found.- Returns:
- The value of the parameter or null.
-
getServletName
public String getServletName()
- Specified by:
getServletNamein interfacejakarta.servlet.ServletConfig- Overrides:
getServletNamein classjakarta.servlet.GenericServlet
-
getInitParameter
public String getInitParameter(String name)
- Specified by:
getInitParameterin interfacejakarta.servlet.ServletConfig- Overrides:
getInitParameterin classjakarta.servlet.GenericServlet
-
getInitParameterNames
public Enumeration getInitParameterNames()
Overridden to include the "org.restlet.application" init parameter name.- Specified by:
getInitParameterNamesin interfacejakarta.servlet.ServletConfig- Overrides:
getInitParameterNamesin classjakarta.servlet.GenericServlet- Returns:
- an enumeration of the init parameter names, including the "org.restlet.application" parameter
-
getServletConfig
public jakarta.servlet.ServletConfig getServletConfig()
- Specified by:
getServletConfigin interfacejakarta.servlet.Servlet- Overrides:
getServletConfigin classjakarta.servlet.GenericServlet
-
getServletContext
public jakarta.servlet.ServletContext getServletContext()
- Specified by:
getServletContextin interfacejakarta.servlet.ServletConfig- Overrides:
getServletContextin classjakarta.servlet.GenericServlet
-
getServletInfo
public String getServletInfo()
- Specified by:
getServletInfoin interfacejakarta.servlet.Servlet- Overrides:
getServletInfoin classjakarta.servlet.GenericServlet
-
log
public void log(String msg)
- Overrides:
login classjakarta.servlet.GenericServlet
-
-