Beispiel #1
0
  @Override
  public void postToFeed(final User user, final Throwable ex) {
    LogHelper.logException(this.getClass(), ex);
    try {
      postToFeed(user, ExceptionUtils.getStackTrace(ex), FeedType.error);

    } catch (NimbitsException e) {
      LogHelper.logException(this.getClass(), e);
    }
  }
 @Override
 @SuppressWarnings(Const.WARNING_UNCHECKED)
 public void doGet(final HttpServletRequest req, final HttpServletResponse resp)
     throws IOException {
   // PrintWriter out;
   // out = resp.getWriter();
   try {
     processGet();
   } catch (NimbitsException e) {
     LogHelper.logException(IdlePointCron.class, e);
   }
 }
  protected static int processGet() throws NimbitsException {
    final List<Entity> points = EntityServiceFactory.getInstance().getIdleEntities();
    log.info("Processing " + points.size() + " potentially idle points");
    for (final Entity p : points) {
      try {
        checkIdle((Point) p);
      } catch (NimbitsException e) {

        LogHelper.logException(IdlePointCron.class, e);
      }
    }
    return points.size();
  }