JML

net.sf.jqql.obsolete
Class FilePacketMonitor

java.lang.Object
  extended by net.sf.jqql.obsolete.FilePacketMonitor

public class FilePacketMonitor
extends Object

 packet monitor, use to checkout reduplicated packet. not every packet needs reduplicated
 checkout, for example file data fragment packet, and so on.
 this monitor use policy as same as packetMonitor to clear buffer. toward reduplicated packet,
 it doesn't ignore, just some handle is no need. but even reduplicated, reply is need.
 包监视器,用于检测重复包。不是每个包都需要进行重复检测,比如文件数据分片的包等等。
 这个monitor采用和PacketMonitor一样的策略清空缓冲区。对于重复的包,并非不理睬,
 只是有些处理就不需要了,但是即使是重复包,回复也是需要的
 

Author:
luma

Constructor Summary
FilePacketMonitor()
           
 
Method Summary
 boolean checkDuplicate(FileAgentPacket fap)
          checkout file control info packet whether is reduplicated, if not ,hash value of this packet will be added in buffer 检查文件中转包是否重复,如果不重复,这个包的哈希值将加入到缓冲区中
 boolean checkDuplicate(FileControlPacket fcp)
          checkout file control info packet whether is reduplicated, if not ,hash value of this packet will be added in buffer 检查文件控制信息包是否重复,如果不重复,这个包的哈希值将加入到缓冲中
 boolean checkDuplicate(FileDataPacket fdp)
          checkout file control info packet whether is reduplicated, if not ,hash value of this packet will be added in buffer 检查文件数据信息包是否重复,如果不重复,这个包的哈希值将加入到缓冲中
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FilePacketMonitor

public FilePacketMonitor()
Method Detail

checkDuplicate

public boolean checkDuplicate(FileControlPacket fcp)
checkout file control info packet whether is reduplicated, if not ,hash value of this packet will be added in buffer 检查文件控制信息包是否重复,如果不重复,这个包的哈希值将加入到缓冲中

Parameters:
fcp -
Returns:
true表示重复 // true means reduplicated

checkDuplicate

public boolean checkDuplicate(FileDataPacket fdp)
checkout file control info packet whether is reduplicated, if not ,hash value of this packet will be added in buffer 检查文件数据信息包是否重复,如果不重复,这个包的哈希值将加入到缓冲中

Parameters:
fdp -
Returns:
true表示重复 // true means reduplicated

checkDuplicate

public boolean checkDuplicate(FileAgentPacket fap)
checkout file control info packet whether is reduplicated, if not ,hash value of this packet will be added in buffer 检查文件中转包是否重复,如果不重复,这个包的哈希值将加入到缓冲区中

Parameters:
fap - 文件中转包对象 // file transfer packet object
Returns:
true表示重复 // true means reduplicated

JML