Codota Logo
CallLog.setDuration
Code IndexAdd Codota to your IDE (free)

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

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

  • Common ways to obtain CallLog
private void myMethod () {
CallLog c =
  • Codota Iconnew CallLog()
  • Smart code suggestions by Codota
}
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.beanCallLogsetDuration

Popular methods of CallLog

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

Popular in Java

  • Finding current android device location
  • requestLocationUpdates (LocationManager)
  • notifyDataSetChanged (ArrayAdapter)
  • getResourceAsStream (ClassLoader)
    Returns a stream for the resource with the specified name. See #getResource(String) for a descriptio
  • Graphics2D (java.awt)
    This Graphics2D class extends the Graphics class to provide more sophisticated control overgraphics
  • Proxy (java.net)
    This class represents proxy server settings. A created instance of Proxy stores a type and an addres
  • URLConnection (java.net)
    The abstract class URLConnection is the superclass of all classes that represent a communications li
  • StringTokenizer (java.util)
    The string tokenizer class allows an application to break a string into tokens. The tokenization met
  • Executor (java.util.concurrent)
    An object that executes submitted Runnable tasks. This interface provides a way of decoupling task s
  • JButton (javax.swing)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now