예제 #1
0
파일: SearchJob.java 프로젝트: hilbix/i2p
 /**
  * Build the database search message
  *
  * @param replyTunnelId tunnel to receive replies through
  * @param replyGateway gateway for the reply tunnel
  * @param expiration when the search should stop
  */
 protected DatabaseLookupMessage buildMessage(
     TunnelId replyTunnelId, Hash replyGateway, long expiration) {
   DatabaseLookupMessage msg = new DatabaseLookupMessage(getContext(), true);
   msg.setSearchKey(_state.getTarget());
   // msg.setFrom(replyGateway.getIdentity().getHash());
   msg.setFrom(replyGateway);
   msg.setDontIncludePeers(_state.getClosestAttempted(MAX_CLOSEST));
   msg.setMessageExpiration(expiration);
   msg.setReplyTunnel(replyTunnelId);
   return msg;
 }