aerogear-controller 1.0.1

org.jboss.aerogear.controller.router
Class RouteContext

java.lang.Object
  extended by org.jboss.aerogear.controller.router.RouteContext

public class RouteContext
extends Object

RouteContext holds information related to processing of a Route.


Field Summary
private  javax.servlet.http.HttpServletRequest request
           
private  String requestPath
           
private  javax.servlet.http.HttpServletResponse response
           
private  Route route
           
private  Routes routes
           
 
Constructor Summary
RouteContext(Route route, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, Routes routes)
          Constructor.
RouteContext(Route route, String requestPath, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, Routes routes)
           
 
Method Summary
 javax.servlet.http.HttpServletRequest getRequest()
          Returns the current HttpServletRequest.
 String getRequestPath()
          Returns the request path minus the context path (suffix) for the current request.
 javax.servlet.http.HttpServletResponse getResponse()
          Returns the current HttpServletResponse.
 Route getRoute()
          Returns the current Route
 Routes getRoutes()
          Returns the Routes instance for the current application.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

route

private final Route route

requestPath

private final String requestPath

request

private final javax.servlet.http.HttpServletRequest request

response

private final javax.servlet.http.HttpServletResponse response

routes

private final Routes routes
Constructor Detail

RouteContext

public RouteContext(Route route,
                    javax.servlet.http.HttpServletRequest request,
                    javax.servlet.http.HttpServletResponse response,
                    Routes routes)
Constructor.

Parameters:
route - the HttpServletRequest.
request - the HttpServletRequest.
response - the HttpServletRequest.
routes - the Routes to enables querying of information about configured routes.

RouteContext

public RouteContext(Route route,
                    String requestPath,
                    javax.servlet.http.HttpServletRequest request,
                    javax.servlet.http.HttpServletResponse response,
                    Routes routes)
Method Detail

getRoute

public Route getRoute()
Returns the current Route

Returns:
Route the current route.

getRequestPath

public String getRequestPath()
Returns the request path minus the context path (suffix) for the current request.

Returns:
String the request path minus the context path (suffix) for the current request.

getRequest

public javax.servlet.http.HttpServletRequest getRequest()
Returns the current HttpServletRequest.

Returns:
HttpServletRequest the current HttpServletRequest.

getResponse

public javax.servlet.http.HttpServletResponse getResponse()
Returns the current HttpServletResponse.

Returns:
HttpServletResponse the current HttpServletResponse.

getRoutes

public Routes getRoutes()
Returns the Routes instance for the current application.

Returns:
Routes instance which contains all of the routes of the current application.

aerogear-controller 1.0.1

Copyright © 2013 JBoss, a division of Red Hat, Inc.. All Rights Reserved.