/** {@inheritDoc} */ public ScheduledFuture<String> schedule(Command action, long delay, TimeUnit unit) throws RejectedExecutionException, NullPointerException { try { CallableActionWrapper task = new CallableActionWrapper(action); return mThreadPool.schedule(task, delay, unit); } catch (RejectedExecutionException e) { LOG.error("ActionBase.schedule()... RejectedExecutionException:" + e.getLocalizedMessage()); throw e; } catch (NullPointerException e) { LOG.error("ActionBase.schedule()... Exception in schedule:" + e.getLocalizedMessage()); throw e; } }
/** {@inheritDoc} */ public ScheduledFuture<String> scheduleAtFixedRate( Command action, long initialDelay, long period, TimeUnit unit) throws RejectedExecutionException, NullPointerException { try { return this.schedule(action, initialDelay, unit); } catch (RejectedExecutionException e) { LOG.error("ActionBase.schedule()... RejectedExecutionException:" + e.getLocalizedMessage()); throw e; } catch (NullPointerException e) { LOG.error("ActionBase.schedule()... Exception in schedule:" + e.getLocalizedMessage()); throw e; } }
/** {@inheritDoc} */ public Future<String> submit(Command action) throws RejectedExecutionException, NullPointerException { try { return this.schedule(action, 0, TimeUnit.MILLISECONDS); } catch (RejectedExecutionException e) { LOG.error("ActionBase.schedule()... RejectedExecutionException:" + e.getLocalizedMessage()); LOG.error("\tThread Pool Exector Shutdown: " + mThreadPool.isShutdown()); throw e; } catch (NullPointerException e) { LOG.error("ActionBase.schedule()... Exception in schedule:" + e.getLocalizedMessage()); throw e; } }