com.limegroup.gnutella
Class PushManager

java.lang.Object
  extended bycom.limegroup.gnutella.PushManager

public final class PushManager
extends java.lang.Object

Manages state for push upload requests.


Constructor Summary
PushManager()
           
 
Method Summary
 void acceptPushUpload(java.lang.String file, java.lang.String host, int port, int index, java.lang.String guid, boolean forceAllow)
          Accepts a new push upload.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PushManager

public PushManager()
Method Detail

acceptPushUpload

public void acceptPushUpload(java.lang.String file,
                             java.lang.String host,
                             int port,
                             int index,
                             java.lang.String guid,
                             boolean forceAllow)
Accepts a new push upload. NON-BLOCKING: creates a new thread to transfer the file.

The thread connects to the other side, waits for a GET/HEAD, and delegates to the UploaderManager.acceptUpload method with the socket it created. Essentially, this is a reverse-Acceptor.

Parameters:
file - the fully qualified pathname of the file to upload
host - the ip address of the host to upload to
port - the port over which the transfer will occur
index - the index of the file in FileManager
guid - the unique identifying client guid of the uploading client
forceAllow - whether or not to force the UploadManager to send accept this request when it comes back.