Code example for ScheduledExecutorService

Methods: submit

0
	private	long	lastHeartbeatToEsbTime = 0;
	private	long	esbHeartbeatTimeout = 10 * 1000;
	private	int		reHeartbeatCount = 0;
	 
	private void doSendPending() { 
		exec.submit(new Runnable() {
 
			public void run() { 
				sendPending(); 
			}} ); 
    } 
     
    private	boolean isESBConnectionValid() { 
    	return	( (null != session) && (CONN_STATE_ONLINE == esbConnectionState) );
    } 
     
    private	void sendPending() { 
    	if ( isESBConnectionValid() ) { 
			try { 
				Object bean = pendings.poll(fetchSignalTimeout, TimeUnit.MILLISECONDS);
	    		if ( null != bean ) {