Class ServletInfo

  • All Implemented Interfaces:
    Comparable<AbstractInfo<jakarta.servlet.Servlet>>

    public class ServletInfo
    extends WhiteboardServiceInfo<jakarta.servlet.Servlet>
    Provides registration information for a Servlet, and is used to programmatically register Servlets.

    This class only provides information used at registration time, and as such differs slightly from DTOs like, ServletDTO.

    • Constructor Detail

      • ServletInfo

        public ServletInfo​(org.osgi.framework.ServiceReference<jakarta.servlet.Servlet> ref)
      • ServletInfo

        public ServletInfo​(ResourceInfo resource)
    • Method Detail

      • getName

        public String getName()
      • getPatterns

        public String[] getPatterns()
      • getErrorPage

        public String[] getErrorPage()
      • isAsyncSupported

        public boolean isAsyncSupported()
      • getInitParameters

        public Map<String,​String> getInitParameters()
        Returns an unmodifiable map of the init parameters.
        Returns:
      • isResource

        public boolean isResource()
      • getPrefix

        public String getPrefix()
      • getType

        @NotNull
        public @NotNull String getType()
        Description copied from class: AbstractInfo
        Get the type represented by this info
        Specified by:
        getType in class AbstractInfo<jakarta.servlet.Servlet>
        Returns:
        The type
      • getClassName

        @NotNull
        public @NotNull String getClassName​(@NotNull
                                            @NotNull jakarta.servlet.Servlet servlet)
        Get the class name of the servlet
        Parameters:
        servlet - The servlet
        Returns:
        The class name