1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.esigate.servlet;
17
18 import javax.servlet.FilterChain;
19 import javax.servlet.ServletContext;
20 import javax.servlet.http.HttpServletRequest;
21 import javax.servlet.http.HttpServletResponse;
22
23 import org.esigate.api.ContainerRequestContext;
24
25
26
27
28
29
30
31
32 public class HttpServletRequestContext implements ContainerRequestContext {
33
34 private final HttpServletRequest request;
35 private final HttpServletResponse response;
36 private final ServletContext servletContext;
37 private final FilterChain filterChain;
38
39 public HttpServletRequestContext(HttpServletRequest request, HttpServletResponse response,
40 ServletContext servletContext) {
41 this(request, response, servletContext, null);
42 }
43
44 public HttpServletRequestContext(HttpServletRequest request, HttpServletResponse response,
45 ServletContext servletContext, FilterChain filterChain) {
46 this.request = request;
47 this.response = response;
48 this.servletContext = servletContext;
49 this.filterChain = filterChain;
50 }
51
52 HttpServletResponse getResponse() {
53 return response;
54 }
55
56 HttpServletRequest getRequest() {
57 return request;
58 }
59
60 FilterChain getFilterChain() {
61 return filterChain;
62 }
63
64 ServletContext getServletContext() {
65 return servletContext;
66 }
67
68 }