Tabnine Logo
CallLog.setUserAgent
Code IndexAdd Tabnine to your IDE (free)

How to use
setUserAgent
method
in
org.restlet.ext.platform.internal.agent.bean.CallLog

Best Java code snippets using org.restlet.ext.platform.internal.agent.bean.CallLog.setUserAgent (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.beanCallLogsetUserAgent

Popular methods of CallLog

  • <init>
  • setDate
  • setDuration
  • setMethod
  • setPath
  • setRemoteIp
  • setStatusCode
  • setUserToken

Popular in Java

  • Reactive rest calls using spring rest template
  • requestLocationUpdates (LocationManager)
  • getResourceAsStream (ClassLoader)
  • setContentView (Activity)
  • Point (java.awt)
    A point representing a location in (x,y) coordinate space, specified in integer precision.
  • BufferedInputStream (java.io)
    A BufferedInputStream adds functionality to another input stream-namely, the ability to buffer the i
  • BufferedWriter (java.io)
    Wraps an existing Writer and buffers the output. Expensive interaction with the underlying reader is
  • MessageFormat (java.text)
    Produces concatenated messages in language-neutral way. New code should probably use java.util.Forma
  • Queue (java.util)
    A collection designed for holding elements prior to processing. Besides basic java.util.Collection o
  • Option (scala)
  • Top 17 Free Sublime Text Plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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