public void resend(RetransmissionTask task) {
		Timer timer;
		Message message;
		Member member;
		int sequence;
		byte[] data;
		DatagramPacket sendPacket;
		InetAddress address;
		TimerTask timerTask;

		member = task.getMember();
		sequence = task.getSequence();

		synchronized(_mutex){
			message = _cachedMessages.get(member.getId()).get(sequence);
			timer = _timerTable.get(member.getId()).get(sequence);
            if (timer == null) {
                return;
            }
//			System.out.println("out message: "+message.getSequence() +" source "+message.getId());
			task.cancel();
			timer.cancel();
			timer.purge();
			message.getId();
			timer = new Timer();
			timerTask = new RetransmissionTask(sequence, member, this);
			data =  message.getBytes();
			try {
				address = InetAddress.getByName(member.getIP());
				sendPacket = new DatagramPacket(data, data.length, address,  member.getPort());
				_timerTable.get(member.getId()).remove(sequence);
				_timerTable.get(member.getId()).put(sequence, timer);
				_cachedRetransmissionTask.get(member.getId()).put(sequence, timerTask);
				
				double rate = _rand.nextDouble();
				if (rate >= _profile.getDropRate()) {
					
					int meanDelay = _profile.getDelay();
                    if (meanDelay != 0) {
                        Timer delayTimer = new Timer();
                        TimerTask delaySender = new DelaySender(sendPacket, _socket);
                        delayTimer.schedule(delaySender, getRandomDelay(meanDelay));
                    }else{
                    	_socket.send(sendPacket);
                    }
					//_socket.send(sendPacket);
                    if(_profile.isDetailMode){
                    	System.out.println(message.getContent().getContent() + " resend ");
                    }
				}else{
					if(_profile.isDetailMode){
						System.out.println(message.getContent().getContent() + " resend dropped ");
					}
				}
				timer.schedule(timerTask, EXPIRE_TIME);

			} catch (Exception e) {
				e.printStackTrace();
			}
		}
	}