Code example for ScheduledExecutorService

Methods: shutdownNow

0
    } 
 
    @Override 
    public List<Runnable> shutdownNow() {
        if (ses != null)
            return ses.shutdownNow();
        return null; 
    } 
 
    @Override 
    public <T> Future<T> submit(Callable<T> arg0) {
        try { 
            return new MockFuture<T>(arg0.call());
        } catch (Exception e) {
            return new MockFuture<T>(new ExecutionException(e));
        } 
    } 
 
    @Override 
    public Future<?> submit(Runnable arg0) {
        try {