private void stopAgentContextAware(Object object) { if (object instanceof AgentContextAware) { try { ((AgentContextAware) object).stop(); } catch (Exception exception) { exception.printStackTrace(); } } }
protected void stopHandler(Object handler) throws Exception { if (handler instanceof AgentContextAware) { ((AgentContextAware) handler).stop(); } }