Tabnine Logo
CallLog.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
org.restlet.ext.platform.internal.agent.bean.CallLog
constructor

Best Java code snippets using org.restlet.ext.platform.internal.agent.bean.CallLog.<init> (Showing top 4 results out of 315)

origin: org.restlet.jse/org.restlet.ext.platform

/**
 * Generates a CallLog for the request and adds it to the buffer.
 * 
 * @param request
 *            The Request object associated with the request.
 * @param response
 *            The Response object associated with the request.
 * @param duration
 *            The duration of the request in milliseconds.
 * @param startTime
 *            The time at which the request arrived to the agent as an
 *            epoch.
 */
public void addCallLogToBuffer(Request request, Response response,
    int duration, long startTime) {
  CallLog callLog = new CallLog();
  callLog.setDate(new Date(startTime));
  callLog.setDuration(duration);
  callLog.setMethod(request.getMethod().getName());
  callLog.setPath(request.getResourceRef().getPath());
  callLog.setRemoteIp(request.getClientInfo().getUpstreamAddress());
  callLog.setStatusCode(response.getStatus().getCode());
  callLog.setUserAgent(request.getClientInfo().getAgent());
  callLog.setUserToken((request.getClientInfo().getUser() == null) ? ""
      : request.getClientInfo().getUser().getIdentifier());
  callLogs.add(callLog);
  if (callLogs.size() >= bufferSize) {
    flushLogs();
  }
}
origin: org.restlet.jee/org.restlet.ext.platform

/**
 * Generates a CallLog for the request and adds it to the buffer.
 * 
 * @param request
 *            The Request object associated with the request.
 * @param response
 *            The Response object associated with the request.
 * @param duration
 *            The duration of the request in milliseconds.
 * @param startTime
 *            The time at which the request arrived to the agent as an
 *            epoch.
 */
public void addCallLogToBuffer(Request request, Response response,
    int duration, long startTime) {
  CallLog callLog = new CallLog();
  callLog.setDate(new Date(startTime));
  callLog.setDuration(duration);
  callLog.setMethod(request.getMethod().getName());
  callLog.setPath(request.getResourceRef().getPath());
  callLog.setRemoteIp(request.getClientInfo().getUpstreamAddress());
  callLog.setStatusCode(response.getStatus().getCode());
  callLog.setUserAgent(request.getClientInfo().getAgent());
  callLog.setUserToken((request.getClientInfo().getUser() == null) ? ""
      : request.getClientInfo().getUser().getIdentifier());
  callLogs.add(callLog);
  if (callLogs.size() >= bufferSize) {
    flushLogs();
  }
}
origin: org.restlet.gae/org.restlet.ext.platform

/**
 * Generates a CallLog for the request and adds it to the buffer.
 * 
 * @param request
 *            The Request object associated with the request.
 * @param response
 *            The Response object associated with the request.
 * @param duration
 *            The duration of the request in milliseconds.
 * @param startTime
 *            The time at which the request arrived to the agent as an
 *            epoch.
 */
public void addCallLogToBuffer(Request request, Response response,
    int duration, long startTime) {
  CallLog callLog = new CallLog();
  callLog.setDate(new Date(startTime));
  callLog.setDuration(duration);
  callLog.setMethod(request.getMethod().getName());
  callLog.setPath(request.getResourceRef().getPath());
  callLog.setRemoteIp(request.getClientInfo().getUpstreamAddress());
  callLog.setStatusCode(response.getStatus().getCode());
  callLog.setUserAgent(request.getClientInfo().getAgent());
  callLog.setUserToken((request.getClientInfo().getUser() == null) ? ""
      : request.getClientInfo().getUser().getIdentifier());
  callLogs.add(callLog);
  if (callLogs.size() >= bufferSize) {
    flushLogs();
  }
}
origin: org.restlet.osgi/org.restlet.ext.platform

/**
 * Generates a CallLog for the request and adds it to the buffer.
 * 
 * @param request
 *            The Request object associated with the request.
 * @param response
 *            The Response object associated with the request.
 * @param duration
 *            The duration of the request in milliseconds.
 * @param startTime
 *            The time at which the request arrived to the agent as an
 *            epoch.
 */
public void addCallLogToBuffer(Request request, Response response,
    int duration, long startTime) {
  CallLog callLog = new CallLog();
  callLog.setDate(new Date(startTime));
  callLog.setDuration(duration);
  callLog.setMethod(request.getMethod().getName());
  callLog.setPath(request.getResourceRef().getPath());
  callLog.setRemoteIp(request.getClientInfo().getUpstreamAddress());
  callLog.setStatusCode(response.getStatus().getCode());
  callLog.setUserAgent(request.getClientInfo().getAgent());
  callLog.setUserToken((request.getClientInfo().getUser() == null) ? ""
      : request.getClientInfo().getUser().getIdentifier());
  callLogs.add(callLog);
  if (callLogs.size() >= bufferSize) {
    flushLogs();
  }
}
org.restlet.ext.platform.internal.agent.beanCallLog<init>

Popular methods of CallLog

  • setDate
  • setDuration
  • setMethod
  • setPath
  • setRemoteIp
  • setStatusCode
  • setUserAgent
  • setUserToken

Popular in Java

  • Finding current android device location
  • setScale (BigDecimal)
  • addToBackStack (FragmentTransaction)
  • getExternalFilesDir (Context)
  • InetAddress (java.net)
    An Internet Protocol (IP) address. This can be either an IPv4 address or an IPv6 address, and in pra
  • Time (java.sql)
    Java representation of an SQL TIME value. Provides utilities to format and parse the time's represen
  • Arrays (java.util)
    This class contains various methods for manipulating arrays (such as sorting and searching). This cl
  • Random (java.util)
    This class provides methods that return pseudo-random values.It is dangerous to seed Random with the
  • JList (javax.swing)
  • Location (org.springframework.beans.factory.parsing)
    Class that models an arbitrary location in a Resource.Typically used to track the location of proble
  • Top Vim plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now