// for simulator use only
public Agent(IAgentShell shell) {
_shell = shell;
_link = null;
_connection = new NioClient("Agent", _shell.getHost(), _shell.getPort(), _shell.getWorkers(), this);
Runtime.getRuntime().addShutdownHook(new ShutdownThread(this));
_ugentTaskPool = new ThreadPoolExecutor(shell.getPingRetries(), 2 * shell.getPingRetries(), 10, TimeUnit.MINUTES,
new SynchronousQueue<Runnable>(), new NamedThreadFactory("UgentTask")