private void startAgentContextAware(Object object) { if (object instanceof AgentContextAware) { try { ((AgentContextAware) object).start(this); } catch (Exception exception) { exception.printStackTrace(); } } }
protected void startHandler(Object handler, AgentContext agentContext) throws Exception { if (handler instanceof AgentContextAware) { ((AgentContextAware) handler).start(agentContext); } }