Class RequestEvent

Direct Known Subclasses:
ResponseEvent

public class RequestEvent extends ApplicationEvent<RequestHandler>
An ApplicationEvent that occurs when an application receives a request.
Author:
Fabio Simeoni
  • Constructor Summary

    Constructors
    Constructor
    Description
    RequestEvent(String servlet, ApplicationContext context, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response)
    Creates an instance with the application context, the client request, and the name of the target servlet.
  • Method Summary

    Modifier and Type
    Method
    Description
    jakarta.servlet.http.HttpServletRequest
    Returns the client request.
    jakarta.servlet.http.HttpServletResponse
    Returns the response.
    Returns the name of the target servlet.
     
    uri()
     

    Methods inherited from class org.gcube.smartgears.handlers.Event

    context

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • RequestEvent

      public RequestEvent(String servlet, ApplicationContext context, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response)
      Creates an instance with the application context, the client request, and the name of the target servlet.
      Parameters:
      context - the context of the application
      servlet - the name of the target servlet
      request - the client request
  • Method Details

    • servlet

      public String servlet()
      Returns the name of the target servlet.
      Returns:
      the name of the servlet.
    • uri

      public String uri()
    • request

      public jakarta.servlet.http.HttpServletRequest request()
      Returns the client request.
      Returns:
      the request
    • response

      public jakarta.servlet.http.HttpServletResponse response()
      Returns the response.
      Returns:
      the response
    • toString

      public String toString()
      Overrides:
      toString in class Event<ApplicationContext>