/*
 * Copyright 2014-2015 the original author or authors.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
 * either express or implied. See the License for the specific language
 * governing permissions and limitations under the License.
 */
package org.lastaflute.web.servlet.filter.accesslog;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * @author jflute
 * @since 0.6.0 (2015/06/03 Wednesday)
 */
public class AccessLogResource {

    protected final HttpServletRequest request;
    protected final HttpServletResponse response;
    protected final Throwable cause;
    protected final long before;

    public AccessLogResource(HttpServletRequest request, HttpServletResponse response, Throwable cause, long before) {
        this.request = request;
        this.response = response;
        this.cause = cause;
        this.before = before;
    }

    public HttpServletRequest getRequest() {
        return request;
    }

    public HttpServletResponse getResponse() {
        return response;
    }

    public Throwable getCause() {
        return cause;
    }

    public long getBefore() {
        return before;
    }
}

@@ -990,24 +990,40 @@
 wable cause;
+ // null allowed
 %0A    protect
@@ -1458,66 +1458,321 @@
     
-public Throwable getCause() %7B%0A        return cause;%0A    %7D%0A
+/**%0A     * Get the cause exception of the request.%0A     * @return The thrown exception in the request. (NullAllowed: when no failure)%0A     */%0A    public Throwable getCause() %7B%0A        return cause;%0A    %7D%0A%0A    /**%0A     * Get the time millisecond before the request.%0A     * @return The value as millisecond.%0A     */
 %0A   

access log resource