congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
AnalyticsHandler.flushLogs
Code IndexAdd Tabnine to your IDE (free)

How to use
flushLogs
method
in
org.restlet.ext.platform.internal.agent.module.AnalyticsHandler

Best Java code snippets using org.restlet.ext.platform.internal.agent.module.AnalyticsHandler.flushLogs (Showing top 8 results out of 315)

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

  @Override
  public void run() {
    flushLogs();
  }
}, postPeriodInMs, postPeriodInMs);
origin: org.restlet.jse/org.restlet.ext.platform

  @Override
  public void run() {
    flushLogs();
  }
}, postPeriodInMs, postPeriodInMs);
origin: org.restlet.gae/org.restlet.ext.platform

  @Override
  public void run() {
    flushLogs();
  }
}, postPeriodInMs, postPeriodInMs);
origin: org.restlet.osgi/org.restlet.ext.platform

  @Override
  public void run() {
    flushLogs();
  }
}, postPeriodInMs, postPeriodInMs);
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.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();
  }
}
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();
  }
}
org.restlet.ext.platform.internal.agent.moduleAnalyticsHandlerflushLogs

Javadoc

Creates a new Thread that asynchronously posts call logs to Restlet Cloud

Popular methods of AnalyticsHandler

  • <init>
    Create a new analytics handler with the specified settings.
  • addCallLogToBuffer
    Generates a CallLog for the request and adds it to the buffer.
  • errorSendLog
    Called on permanent errors. Override to add your own behavior.
  • postLogs
    Adds a task to the executor service to post call logs to the Restlet Cloud analytics service. If the
  • stop

Popular in Java

  • Reading from database using SQL prepared statement
  • putExtra (Intent)
  • findViewById (Activity)
  • setScale (BigDecimal)
  • BorderLayout (java.awt)
    A border layout lays out a container, arranging and resizing its components to fit in five regions:
  • Color (java.awt)
    The Color class is used to encapsulate colors in the default sRGB color space or colors in arbitrary
  • Runnable (java.lang)
    Represents a command that can be executed. Often used to run code in a different Thread.
  • MessageFormat (java.text)
    Produces concatenated messages in language-neutral way. New code should probably use java.util.Forma
  • Arrays (java.util)
    This class contains various methods for manipulating arrays (such as sorting and searching). This cl
  • SortedMap (java.util)
    A map that has its keys ordered. The sorting is according to either the natural ordering of its keys
  • 14 Best Plugins for Eclipse
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