Code example for ScheduledExecutorService

Methods: shutdownNow

0
		 
	} 
 
	public void shutdown() { 
		this.shutdown = true;
		this.scheduler.shutdownNow();
		try { 
			this.sched.shutdown();
		} catch (SchedulerException e) {
			e.printStackTrace();
		} 
	} 
 
 
	@Override 
	public void scheduleOnce(ScheduledMessage msg, long delay) {
		if (logger.isDebugEnabled()) {
			logger.debug("scheduleOnce delay:" + delay + " msg:" + msg);
		} 
		msg.setState(ScheduledMessage.MESSAGE_STATE_WAITING);
		MessageCarrier carrier = new MessageCarrier(msg);