View Javadoc

1   /*
2    ~ Copyright 2006-2007 Nicolas De Loof.
3    ~
4    ~ Licensed under the Apache License, Version 2.0 (the "License");
5    ~ you may not use this file except in compliance with the License.
6    ~ You may obtain a copy of the License at
7    ~
8    ~      http://www.apache.org/licenses/LICENSE-2.0
9    ~
10   ~ Unless required by applicable law or agreed to in writing, software
11   ~ distributed under the License is distributed on an "AS IS" BASIS,
12   ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   ~ See the License for the specific language governing permissions and
14   ~ limitations under the License.
15   */
16  package org.jmonit.events;
17  
18  import javax.servlet.http.HttpServletRequest;
19  
20  import org.jmonit.Monitor;
21  
22  /**
23   * @author <a href="mailto:nicolas.deloof@gmail.com">Nicolas De Loof</a>
24   */
25  public class HttpRequestServed
26      extends MonitoringEvent
27  {
28      private HttpServletRequest request;
29  
30      private long time;
31  
32      private int status;
33  
34      private Monitor monitor;
35  
36      public HttpRequestServed( HttpServletRequest request, long time, int status, Monitor monitor )
37      {
38          super();
39          this.request = request;
40          this.time = time;
41          this.status = status;
42          this.monitor = monitor;
43      }
44  
45      public HttpServletRequest getRequest()
46      {
47          return request;
48      }
49  
50      public long getTime()
51      {
52          return time;
53      }
54  
55      public int getHttpStatus()
56      {
57          return status;
58      }
59  
60      public Monitor getMonitor()
61      {
62          return monitor;
63      }
64  
65  }