org.gcube.smartgears.handlers.application
Class RequestEvent

java.lang.Object
  extended by org.gcube.smartgears.handlers.Event<ApplicationContext>
      extended by org.gcube.smartgears.handlers.application.ApplicationEvent<RequestHandler>
          extended by org.gcube.smartgears.handlers.application.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
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
 javax.servlet.http.HttpServletRequest request()
          Returns the client request.
 javax.servlet.http.HttpServletResponse response()
          Returns the response.
 String servlet()
          Returns the name of the target servlet.
 String toString()
           
 String 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 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 application
servlet - the name of the target servlet
request - 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:
toString in class Event<ApplicationContext>


Copyright © 2014. All Rights Reserved.