Interface WebService

All Superinterfaces:
CoreService
All Known Implementing Classes:
AbstractWebService, DefaultWebService

public interface WebService extends CoreService
The Interface WebService.

Created: 2017. 10. 28.

  • Field Details

    • ROOT_WEB_SERVICE_ATTR_NAME

      static final String ROOT_WEB_SERVICE_ATTR_NAME
      ServletContext attribute name used to obtain the root WebService object.
    • DERIVED_WEB_SERVICE_ATTR_NAME

      static final String DERIVED_WEB_SERVICE_ATTR_NAME
      ServletRequest attribute name used to obtain the derived WebService object.
  • Method Details

    • getServletContext

      jakarta.servlet.ServletContext getServletContext()
      Returns a reference to the ServletContext in which this WebService is running.
      Returns:
      a ServletContext object, used by this WebService to interact with its servlet container
    • isSessionAdaptable

      boolean isSessionAdaptable()
    • service

      void service(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) throws IOException
      Executes web activity.
      Parameters:
      request - current HTTP servlet request
      response - current HTTP servlet response
      Throws:
      IOException - If an error occurs during Activity execution
    • bind

      static void bind(jakarta.servlet.ServletContext servletContext, WebService service)
    • bind

      static void bind(WebActivity activity, WebService service)
    • findWebService

      @NonNull static DefaultWebService findWebService(jakarta.servlet.ServletContext servletContext)
      Find the root web service from ServletContext.
      Parameters:
      servletContext - ServletContext to find the root web service for
      Returns:
      the root web service
    • findWebService

      @NonNull static DefaultWebService findWebService(jakarta.servlet.ServletRequest servletRequest)
    • findActivityContext

      @NonNull static ActivityContext findActivityContext(jakarta.servlet.ServletContext servletContext)
      Finds the root web service from the ServletContext and returns its ActivityContext.
      Parameters:
      servletContext - ServletContext to find the root web service for
      Returns:
      ActivityContext of root web service
    • findActivityContext

      static ActivityContext findActivityContext(jakarta.servlet.ServletRequest servletRequest)
      Finds the derived web service from the ServletRequest and returns its ActivityContext.
      Parameters:
      servletRequest - ServletRequest to find the derived web service for
      Returns:
      ActivityContext of derived web service