Tabnine Logo
AnalyticsHandler.errorSendLog
Code IndexAdd Tabnine to your IDE (free)

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

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

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

/**
 * 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

/**
 * 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

/**
 * 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 void run() {
  for (int attemptNumber = 1; attemptNumber <= MAX_ATTEMPTS + 1; attemptNumber++) {
    try {
      analyticsClientResource.postLogs(logsToPost);
      LOGGER.fine(logsToPost.size()
          + " call logs sent to the analytics service.");
      break;
    } catch (Exception e) {
      if (attemptNumber == MAX_ATTEMPTS) {
        LOGGER.severe("Posting " + logsToPost.size()
            + " call logs failed permanently after "
            + MAX_ATTEMPTS + " attempts.");
        errorSendLog(logsToPost);
      } else {
        LOGGER.warning("Error sending "
            + logsToPost.size()
            + " call logs to the analytics service during attempt n°"
            + attemptNumber + " because \""
            + e.getMessage() + "\".");
        try {
          Thread.sleep(getRetryTime(attemptNumber));
        } catch (InterruptedException e1) {
          // ignore
        }
      }
    }
  }
}
origin: org.restlet.osgi/org.restlet.ext.platform

@Override
public void run() {
  for (int attemptNumber = 1; attemptNumber <= MAX_ATTEMPTS + 1; attemptNumber++) {
    try {
      analyticsClientResource.postLogs(logsToPost);
      LOGGER.fine(logsToPost.size()
          + " call logs sent to the analytics service.");
      break;
    } catch (Exception e) {
      if (attemptNumber == MAX_ATTEMPTS) {
        LOGGER.severe("Posting " + logsToPost.size()
            + " call logs failed permanently after "
            + MAX_ATTEMPTS + " attempts.");
        errorSendLog(logsToPost);
      } else {
        LOGGER.warning("Error sending "
            + logsToPost.size()
            + " call logs to the analytics service during attempt n°"
            + attemptNumber + " because \""
            + e.getMessage() + "\".");
        try {
          Thread.sleep(getRetryTime(attemptNumber));
        } catch (InterruptedException e1) {
          // ignore
        }
      }
    }
  }
}
origin: org.restlet.jse/org.restlet.ext.platform

@Override
public void run() {
  for (int attemptNumber = 1; attemptNumber <= MAX_ATTEMPTS + 1; attemptNumber++) {
    try {
      analyticsClientResource.postLogs(logsToPost);
      LOGGER.fine(logsToPost.size()
          + " call logs sent to the analytics service.");
      break;
    } catch (Exception e) {
      if (attemptNumber == MAX_ATTEMPTS) {
        LOGGER.severe("Posting " + logsToPost.size()
            + " call logs failed permanently after "
            + MAX_ATTEMPTS + " attempts.");
        errorSendLog(logsToPost);
      } else {
        LOGGER.warning("Error sending "
            + logsToPost.size()
            + " call logs to the analytics service during attempt n°"
            + attemptNumber + " because \""
            + e.getMessage() + "\".");
        try {
          Thread.sleep(getRetryTime(attemptNumber));
        } catch (InterruptedException e1) {
          // ignore
        }
      }
    }
  }
}
origin: org.restlet.jee/org.restlet.ext.platform

@Override
public void run() {
  for (int attemptNumber = 1; attemptNumber <= MAX_ATTEMPTS + 1; attemptNumber++) {
    try {
      analyticsClientResource.postLogs(logsToPost);
      LOGGER.fine(logsToPost.size()
          + " call logs sent to the analytics service.");
      break;
    } catch (Exception e) {
      if (attemptNumber == MAX_ATTEMPTS) {
        LOGGER.severe("Posting " + logsToPost.size()
            + " call logs failed permanently after "
            + MAX_ATTEMPTS + " attempts.");
        errorSendLog(logsToPost);
      } else {
        LOGGER.warning("Error sending "
            + logsToPost.size()
            + " call logs to the analytics service during attempt n°"
            + attemptNumber + " because \""
            + e.getMessage() + "\".");
        try {
          Thread.sleep(getRetryTime(attemptNumber));
        } catch (InterruptedException e1) {
          // ignore
        }
      }
    }
  }
}
org.restlet.ext.platform.internal.agent.moduleAnalyticsHandlererrorSendLog

Javadoc

Called on permanent errors. Override to add your own behavior.

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.
  • 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

  • Start an intent from android
  • getResourceAsStream (ClassLoader)
  • getApplicationContext (Context)
  • getContentResolver (Context)
  • URLEncoder (java.net)
    This class is used to encode a string using the format required by application/x-www-form-urlencoded
  • Path (java.nio.file)
  • Format (java.text)
    The base class for all formats. This is an abstract base class which specifies the protocol for clas
  • BlockingQueue (java.util.concurrent)
    A java.util.Queue that additionally supports operations that wait for the queue to become non-empty
  • Callable (java.util.concurrent)
    A task that returns a result and may throw an exception. Implementors define a single method with no
  • XPath (javax.xml.xpath)
    XPath provides access to the XPath evaluation environment and expressions. Evaluation of XPath Expr
  • Top PhpStorm 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