| | |
| | | * was set since it is not . |
| | | */ |
| | | private AtomicInteger statusCode = new AtomicInteger(0); |
| | | /** |
| | | * The unique identifier that has been assigned to the client connection for |
| | | * this HTTP request. |
| | | */ |
| | | private long connectionID; |
| | | |
| | | /** |
| | | * Constructor for this class. |
| | | * |
| | | * @param request |
| | | * The {@link HttpServletRequest} for which to log the information |
| | | * @param connectionID |
| | | * The unique identifier that has been assigned to the client |
| | | * connection for this HTTP request |
| | | */ |
| | | public HTTPRequestInfo(HttpServletRequest request) |
| | | public HTTPRequestInfo(HttpServletRequest request, long connectionID) |
| | | { |
| | | this.remoteHost = request.getRemoteHost(); |
| | | this.remoteAddress = request.getRemoteAddr(); |
| | |
| | | this.query = request.getRequestURI() + "/" + request.getQueryString(); |
| | | this.protocol = request.getProtocol(); |
| | | this.userAgent = request.getHeader("User-Agent"); |
| | | this.connectionID = connectionID; |
| | | } |
| | | |
| | | /** |
| | |
| | | } |
| | | |
| | | /** |
| | | * Returns the unique identifier that has been assigned to the client |
| | | * connection for this HTTP request. |
| | | * |
| | | * @return The unique identifier that has been assigned to the client |
| | | * connection for this HTTP request |
| | | */ |
| | | public long getConnectionID() |
| | | { |
| | | return this.connectionID; |
| | | } |
| | | |
| | | /** |
| | | * Logs the current request info in the HTTP access log. |
| | | * |
| | | * @param statusCode |