}
@Override
public void messageReceived(IoSession session, Object message)
throws Exception {
UrlState state=(UrlState) message;
int index=TaskCenter.urlState.indexOf(state);
if(index!=-1){
UrlState oldState=TaskCenter.urlState.remove(index);
state.setBeginTime(oldState.getBeginTime());
state.setEndTime(DateUtil.formatDateTime());
state.setRuninfo(((InetSocketAddress) session.getRemoteAddress()).getAddress().getHostAddress());
TaskCenter.taskState.get(state.getUrlReq().getTask()).add(state);
TaskCenter.taskCount.put(state.getUrlReq().getTask(),
TaskCenter.taskCount.get(state.getUrlReq().getTask())-1);