Codota Logo
AnalyticsHandler
Code IndexAdd Codota to your IDE (free)

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

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

  • Common ways to obtain AnalyticsHandler
private void myMethod () {
AnalyticsHandler a =
  • Codota IconRestletCloudConfig restletCloudConfig;ModulesSettings modulesSettings;new AnalyticsHandler(restletCloudConfig, modulesSettings)
  • Smart code suggestions by Codota
}
origin: org.restlet.jee/org.restlet.ext.platform

/**
 * Create a new Authentication module with the specified settings.
 * 
 * @param restletCloudConfig
 *            The agent configuration.
 * @param modulesSettings
 *            The modules settings.
 * @param context
 *            The context.
 */
public AnalyticsModule(RestletCloudConfig restletCloudConfig,
    ModulesSettings modulesSettings, Context context) {
  super(context);
  analyticsHandler = new AnalyticsHandler(restletCloudConfig, modulesSettings);
}
origin: org.restlet.jse/org.restlet.ext.platform

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

  @Override
  public synchronized void stop() throws Exception {
    analyticsHandler.stop();
    super.stop();
  }
}
origin: org.restlet.jee/org.restlet.ext.platform

/**
 * Adds a task to the executor service to post call logs to the Restlet Cloud
 * analytics service.
 * 
 * If the executor service cannot satisfy the request, the call logs are
 * lost and an error message is logged with the reason of the failure.
 * 
 * @param logsToPost
 *            The call logs to post to the Restlet Cloud analytics service.
 */
private void postLogs(CallLogs logsToPost) {
  try {
    executorService.execute(new AsyncCallLogsPostTask(logsToPost));
  } catch (RejectedExecutionException e) {
    LOGGER.severe("Posting " + logsToPost.size()
        + " call logs failed permanently due to \""
        + e.getCause().getMessage() + "\".");
    errorSendLog(logsToPost);
  }
}
origin: org.restlet.jse/org.restlet.ext.platform

@Override
protected void afterHandle(Request request, Response response) {
  long startTime = (Long) request.getAttributes().get(
      "org.restlet.startTime");
  int duration = (int) (getTimeMillis() - startTime);
  analyticsHandler.addCallLogToBuffer(request, response, duration,
      startTime);
}
origin: org.restlet.gae/org.restlet.ext.platform

/**
 * Creates a new Thread that asynchronously posts call logs to Restlet Cloud
 */
public void flushLogs() {
  if (callLogs.isEmpty()) {
    return;
  }
  CallLogs logsToPost;
  synchronized (callLogs) {
    if (callLogs.isEmpty()) {
      return;
    }
    logsToPost = new CallLogs(callLogs.size());
    logsToPost.addAll(callLogs);
    callLogs.clear();
  }
  postLogs(logsToPost);
}
origin: org.restlet.gae/org.restlet.ext.platform

/**
 * Adds a task to the executor service to post call logs to the Restlet Cloud
 * analytics service.
 * 
 * If the executor service cannot satisfy the request, the call logs are
 * lost and an error message is logged with the reason of the failure.
 * 
 * @param logsToPost
 *            The call logs to post to the Restlet Cloud analytics service.
 */
private void postLogs(CallLogs logsToPost) {
  try {
    executorService.execute(new AsyncCallLogsPostTask(logsToPost));
  } catch (RejectedExecutionException e) {
    LOGGER.severe("Posting " + logsToPost.size()
        + " call logs failed permanently due to \""
        + e.getCause().getMessage() + "\".");
    errorSendLog(logsToPost);
  }
}
origin: org.restlet.osgi/org.restlet.ext.platform

@Override
protected void afterHandle(Request request, Response response) {
  long startTime = (Long) request.getAttributes().get(
      "org.restlet.startTime");
  int duration = (int) (getTimeMillis() - startTime);
  analyticsHandler.addCallLogToBuffer(request, response, duration,
      startTime);
}
origin: org.restlet.jse/org.restlet.ext.platform

/**
 * Creates a new Thread that asynchronously posts call logs to Restlet Cloud
 */
public void flushLogs() {
  if (callLogs.isEmpty()) {
    return;
  }
  CallLogs logsToPost;
  synchronized (callLogs) {
    if (callLogs.isEmpty()) {
      return;
    }
    logsToPost = new CallLogs(callLogs.size());
    logsToPost.addAll(callLogs);
    callLogs.clear();
  }
  postLogs(logsToPost);
}
origin: org.restlet.gae/org.restlet.ext.platform

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

/**
 * Adds a task to the executor service to post call logs to the Restlet Cloud
 * analytics service.
 * 
 * If the executor service cannot satisfy the request, the call logs are
 * lost and an error message is logged with the reason of the failure.
 * 
 * @param logsToPost
 *            The call logs to post to the Restlet Cloud analytics service.
 */
private void postLogs(CallLogs logsToPost) {
  try {
    executorService.execute(new AsyncCallLogsPostTask(logsToPost));
  } catch (RejectedExecutionException e) {
    LOGGER.severe("Posting " + logsToPost.size()
        + " call logs failed permanently due to \""
        + e.getCause().getMessage() + "\".");
    errorSendLog(logsToPost);
  }
}
origin: org.restlet.gae/org.restlet.ext.platform

  @Override
  public synchronized void stop() throws Exception {
    analyticsHandler.stop();
    super.stop();
  }
}
origin: org.restlet.jee/org.restlet.ext.platform

@Override
protected void afterHandle(Request request, Response response) {
  long startTime = (Long) request.getAttributes().get(
      "org.restlet.startTime");
  int duration = (int) (getTimeMillis() - startTime);
  analyticsHandler.addCallLogToBuffer(request, response, duration,
      startTime);
}
origin: org.restlet.jse/org.restlet.ext.platform

/**
 * Create a new Authentication module with the specified settings.
 * 
 * @param restletCloudConfig
 *            The agent configuration.
 * @param modulesSettings
 *            The modules settings.
 * @param context
 *            The context.
 */
public AnalyticsModule(RestletCloudConfig restletCloudConfig,
    ModulesSettings modulesSettings, Context context) {
  super(context);
  analyticsHandler = new AnalyticsHandler(restletCloudConfig, modulesSettings);
}
origin: org.restlet.jee/org.restlet.ext.platform

/**
 * Creates a new Thread that asynchronously posts call logs to Restlet Cloud
 */
public void flushLogs() {
  if (callLogs.isEmpty()) {
    return;
  }
  CallLogs logsToPost;
  synchronized (callLogs) {
    if (callLogs.isEmpty()) {
      return;
    }
    logsToPost = new CallLogs(callLogs.size());
    logsToPost.addAll(callLogs);
    callLogs.clear();
  }
  postLogs(logsToPost);
}
origin: org.restlet.osgi/org.restlet.ext.platform

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

/**
 * Adds a task to the executor service to post call logs to the Restlet Cloud
 * analytics service.
 * 
 * If the executor service cannot satisfy the request, the call logs are
 * lost and an error message is logged with the reason of the failure.
 * 
 * @param logsToPost
 *            The call logs to post to the Restlet Cloud analytics service.
 */
private void postLogs(CallLogs logsToPost) {
  try {
    executorService.execute(new AsyncCallLogsPostTask(logsToPost));
  } catch (RejectedExecutionException e) {
    LOGGER.severe("Posting " + logsToPost.size()
        + " call logs failed permanently due to \""
        + e.getCause().getMessage() + "\".");
    errorSendLog(logsToPost);
  }
}
origin: org.restlet.jse/org.restlet.ext.platform

  @Override
  public synchronized void stop() throws Exception {
    analyticsHandler.stop();
    super.stop();
  }
}
origin: org.restlet.gae/org.restlet.ext.platform

@Override
protected void afterHandle(Request request, Response response) {
  long startTime = (Long) request.getAttributes().get(
      "org.restlet.startTime");
  int duration = (int) (getTimeMillis() - startTime);
  analyticsHandler.addCallLogToBuffer(request, response, duration,
      startTime);
}
origin: org.restlet.gae/org.restlet.ext.platform

/**
 * Create a new Authentication module with the specified settings.
 * 
 * @param restletCloudConfig
 *            The agent configuration.
 * @param modulesSettings
 *            The modules settings.
 * @param context
 *            The context.
 */
public AnalyticsModule(RestletCloudConfig restletCloudConfig,
    ModulesSettings modulesSettings, Context context) {
  super(context);
  analyticsHandler = new AnalyticsHandler(restletCloudConfig, modulesSettings);
}
org.restlet.ext.platform.internal.agent.moduleAnalyticsHandler

Most used methods

  • <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.
  • flushLogs
    Creates a new Thread that asynchronously posts call logs to Restlet Cloud
  • postLogs
    Adds a task to the executor service to post call logs to the Restlet Cloud analytics service. If the
  • stop

Popular in Java

  • Making http post requests using okhttp
  • scheduleAtFixedRate (Timer)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • startActivity (Activity)
  • GridLayout (java.awt)
    The GridLayout class is a layout manager that lays out a container's components in a rectangular gri
  • FileWriter (java.io)
    Convenience class for writing character files. The constructors of this class assume that the defaul
  • SortedMap (java.util)
    A map that has its keys ordered. The sorting is according to either the natural ordering of its keys
  • ThreadPoolExecutor (java.util.concurrent)
    An ExecutorService that executes each submitted task using one of possibly several pooled threads, n
  • StringUtils (org.apache.commons.lang)
    Operations on java.lang.String that arenull safe. * IsEmpty/IsBlank - checks if a String contains
  • Join (org.hibernate.mapping)
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