JML

net.sf.jqql
Class ResendTrigger<T>

java.lang.Object
  extended by net.sf.jqql.ResendTrigger<T>
All Implemented Interfaces:
Callable<T>

public class ResendTrigger<T>
extends Object
implements Callable<T>


Constructor Summary
ResendTrigger(QQClient client)
           
 
Method Summary
 void add(OutPacket packet, String name)
          add a package to timeout queue 添加一个包到超时队列
 T call()
           
 void clear()
          clear the queue which wanna resend 清空重发队列
 OutPacket get()
          get the frist package in the timeout queue and do not delete from queue 得到超时队列的第一个包,不把它从队列中删除
 OutPacket remove()
          get the frist package in the timeout queue and delete it from queue 得到超时队列的第一个包,并把它从队列中删除
 void remove(InPacket ack)
          delete the package which is mapping ack 删除ack对应的请求包
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResendTrigger

public ResendTrigger(QQClient client)
Method Detail

add

public void add(OutPacket packet,
                String name)
add a package to timeout queue 添加一个包到超时队列

Parameters:
packet - send package object 发送包对象
name - port name port名称

clear

public void clear()
clear the queue which wanna resend 清空重发队列


get

public OutPacket get()
get the frist package in the timeout queue and do not delete from queue 得到超时队列的第一个包,不把它从队列中删除

Returns:
the frist package in timeout queue,if no,return null 超时队列的第一个包,如果没有,返回null

remove

public OutPacket remove()
get the frist package in the timeout queue and delete it from queue 得到超时队列的第一个包,并把它从队列中删除

Returns:
the frist package in timeout queue,if no,return null 超时队列的第一个包,如果没有,返回null

remove

public void remove(InPacket ack)
delete the package which is mapping ack 删除ack对应的请求包

Parameters:
ack -

call

public T call()
       throws Exception
Specified by:
call in interface Callable<T>
Throws:
Exception

JML