code: private AccessLogRecordData toAccessLogRecordData(final HttpRequestMessage request, final HttpResponseMessage response, final String version, final String userId,
                                                        final String remoteAddr, final long numBytes) {
          final HttpRequestMessage request2 = request; // request.duplicate();
          final HttpResponseMessage response2 = response; // response.duplicate();
  
          final long timestamp;
          final long startTime;
          final long elapsedTime;
          final String localIP;
          final String localPort;
  
          // ** timestamp
          timestamp = System.currentTimeMillis();
  
          // ** Request Start Time
          startTime = AccessLogStartTime.getStartTime(response2, request2, null);
  
          // ** Elapsed Request Time
          elapsedTime = AccessLogElapsedRequestTime.getElapsedRequestTime(response2, request2, null);
  
          // ** LocalIP
          localIP = AccessLogLocalIP.getLocalIP(response2, request2, null);
  
          // ** LocalPort
          localPort = AccessLogLocalPort.getLocalPort(response2, request2, null);
  
          // ** AccessLogRecordData
          AccessLogRecordData recordData = new AccessLogRecordData() {
  
              @Override
              public long getTimestamp() {
                  return timestamp;
              }
  
              @Override
              public String getVersion() {
                  return version;
              }
  
              @Override
              public String getUserId() {
                  return userId;
              }
  
              @Override
              public HttpResponseMessage getResponse() {
                  return response2;
              }
  
              @Override
              public HttpRequestMessage getRequest() {
                  return request2;
              }
  
              @Override
              public String getRemoteAddress() {
                  return remoteAddr;
              }
  
              @Override
              public long getBytesWritten() {
                  return numBytes;
              }
  
              @Override
              public long getStartTime() {
                  return startTime;
              }
  
              @Override
              public long getElapsedTime() {
                  return elapsedTime;
              }
  
              @Override
              public String getLocalIP() {
                  return localIP;
              }
  
              @Override
              public String getLocalPort() {
                  return localPort;
              }
          };
          return recordData;
      }
docs: Return a AccessLogRecordData instance
  
  @param request
  @param response
  @param version
  @param userId
  @param remoteAddr
  @param numBytes
  @return