Code example for ThreadPoolExecutor

Methods: submit

0
	} 
	 
	@Override 
	public int onStartCommand(Intent intent, int flags, int startId) { 
		final Command command = intent.getParcelableExtra(COMMAND); 
		pool.submit(new Runnable() { 
			 
			@Override 
			public void run() { 
				if (null != command) { 
					command.execute(getApplicationContext()); 
				} else { 
					Log.d(Schema.TAG, "Command is not set in intent"); 
				} 
			} 
		}); 
		return START_NOT_STICKY; 
	} 
 
}