KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > web > loadbalancer > util > Request


1 /*
2  * JBoss, the OpenSource WebOS
3  *
4  * Distributable under LGPL license.
5  * See terms of license at gnu.org.
6  */

7 package org.jboss.web.loadbalancer.util;
8
9 import javax.servlet.http.HttpServletRequest JavaDoc;
10 import javax.servlet.http.HttpServletResponse JavaDoc;
11
12 import org.apache.commons.httpclient.HttpClient;
13 import org.apache.commons.httpclient.HttpMethod;
14 import org.jboss.web.loadbalancer.scheduler.Host;
15
16 /**
17  * A class that holds all information about a request.
18  *
19  * @author Thomas Peuss <jboss@peuss.de>
20  * @version $Revision: 1.2 $
21  */

22 public class Request
23 {
24   private HttpServletRequest JavaDoc request;
25   private HttpServletResponse JavaDoc response;
26   private int requestMethod;
27   private HttpMethod method;
28   private Host host;
29   private HttpClient client;
30
31   public Request(HttpServletRequest JavaDoc request,
32                  HttpServletResponse JavaDoc response, int requestMethod)
33   {
34     this.request=request;
35     this.response=response;
36     this.requestMethod=requestMethod;
37   }
38
39   public HttpServletRequest JavaDoc getRequest()
40   {
41     return request;
42   }
43
44   public int getRequestMethod()
45   {
46     return requestMethod;
47   }
48
49   public HttpServletResponse JavaDoc getResponse()
50   {
51     return response;
52   }
53
54   public HttpMethod getMethod()
55   {
56     return method;
57   }
58
59   public void setMethod(HttpMethod method)
60   {
61     this.method = method;
62   }
63
64   public Host getHost()
65   {
66     return host;
67   }
68
69   public void setHost(Host host)
70   {
71     this.host = host;
72   }
73
74   public HttpClient getClient()
75   {
76     return client;
77   }
78
79   public void setClient(HttpClient client)
80   {
81     this.client = client;
82   }
83 }
Popular Tags