@Test public void contextThreadpoolIsDaemonized() throws InterruptedException { ExecutorService execSvc = context.getExecutorService(); final ArrayList<Thread> executingThreads = new ArrayList<Thread>(); execSvc.execute(new Runnable() { @Override public void run() { synchronized (executingThreads) { executingThreads.add(Thread.currentThread()); executingThreads.notifyAll(); } } }); synchronized (executingThreads) { while (executingThreads.isEmpty()) { executingThreads.wait(); } } assertTrue("executing thread should be a daemon thread.", executingThreads.get(0).isDaemon()); }
@Override public synchronized ExecutorService getExecutorService() { return getScheduledExecutorService(); }
ContextBase implements Context, LifeCycle { @Override public synchronized ExecutorService getExecutorService() { return getScheduledExecutorService(); } }
ContextBase implements Context, LifeCycle { @Override public synchronized ExecutorService getExecutorService() { return getScheduledExecutorService(); } ContextBase(); }
ContextBase implements Context, LifeCycle { @Override public synchronized ExecutorService getExecutorService() { return getScheduledExecutorService(); } ContextBase(); StatusManager getStatusManager(); void setStatusManager(StatusManager statusManager); Map<String, String> getCopyOfPropertyMap(); void putProperty(String key, String val); String getProperty(String key); Object getObject(String key); void putObject(String key, Object value); void removeObject(String key); String getName(); void start(); void stop(); boolean isStarted(); void reset(); void setName(String name); long getBirthTime(); Object getConfigurationLock(); @Override /** * @deprecated */ synchronized ExecutorService getExecutorService(); @Override synchronized ScheduledExecutorService getScheduledExecutorService(); void register(LifeCycle component); @Override String toString(); @Override void addScheduledFuture(ScheduledFuture<?> scheduledFuture); List<ScheduledFuture<?>> getScheduledFutures(); SequenceNumberGenerator getSequenceNumberGenerator(); void setSequenceNumberGenerator(SequenceNumberGenerator sequenceNumberGenerator); }
ContextBase implements Context, LifeCycle { @Override public synchronized ExecutorService getExecutorService() { return getScheduledExecutorService(); } ContextBase(); StatusManager getStatusManager(); void setStatusManager(StatusManager statusManager); Map<String, String> getCopyOfPropertyMap(); void putProperty(String key, String val); String getProperty(String key); Object getObject(String key); void putObject(String key, Object value); void removeObject(String key); String getName(); void start(); void stop(); boolean isStarted(); void reset(); void setName(String name); long getBirthTime(); Object getConfigurationLock(); @Override /** * @deprecated */ synchronized ExecutorService getExecutorService(); @Override synchronized ScheduledExecutorService getScheduledExecutorService(); void register(LifeCycle component); @Override String toString(); @Override void addScheduledFuture(ScheduledFuture<?> scheduledFuture); List<ScheduledFuture<?>> getScheduledFutures(); SequenceNumberGenerator getSequenceNumberGenerator(); void setSequenceNumberGenerator(SequenceNumberGenerator sequenceNumberGenerator);  }