Class RequestEvent
- java.lang.Object
-
- org.gcube.smartgears.handlers.Event<ApplicationContext>
-
- org.gcube.smartgears.handlers.application.ApplicationEvent<RequestHandler>
-
- org.gcube.smartgears.handlers.application.RequestEvent
-
- Direct Known Subclasses:
ResponseEvent
public class RequestEvent extends ApplicationEvent<RequestHandler>
AnApplicationEventthat occurs when an application receives a request.- Author:
- Fabio Simeoni
-
-
Constructor Summary
Constructors Constructor Description RequestEvent(String servlet, ApplicationContext context, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)Creates an instance with the application context, the client request, and the name of the target servlet.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description javax.servlet.http.HttpServletRequestrequest()Returns the client request.javax.servlet.http.HttpServletResponseresponse()Returns the response.Stringservlet()Returns the name of the target servlet.StringtoString()Stringuri()
-
-
-
Constructor Detail
-
RequestEvent
public RequestEvent(String servlet, ApplicationContext context, javax.servlet.http.HttpServletRequest request, javax.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 applicationservlet- the name of the target servletrequest- the client request
-
-
Method Detail
-
servlet
public String servlet()
Returns the name of the target servlet.- Returns:
- the name of the servlet.
-
uri
public String uri()
-
request
public javax.servlet.http.HttpServletRequest request()
Returns the client request.- Returns:
- the request
-
response
public javax.servlet.http.HttpServletResponse response()
Returns the response.- Returns:
- the response
-
toString
public String toString()
- Overrides:
toStringin classEvent<ApplicationContext>
-
-