|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.xnap.plugin.gift.net.GiFTDaemon
public class GiFTDaemon
Handles a connection to a single giFT daemon.
Field Summary | |
---|---|
static int |
NETWORK_STATS_INTERVAL
The poll intervall for network stats. |
Constructor Summary | |
---|---|
GiFTDaemon(java.lang.String host,
int port,
java.lang.String user)
|
Method Summary | |
---|---|
void |
addDaemonListener(GiFTDaemonListener listener)
Adds an event listener. |
void |
addDownload(GiFTSearchResult sr)
|
void |
changeDownload(GiFTDownloadContainer dc,
java.lang.String action)
|
void |
changeSearch(GiFTSearch s,
java.lang.String action)
|
void |
changeUpload(GiFTUpload u,
java.lang.String action)
|
void |
deleteSource(GiFTDownloadContainer dc,
java.lang.String url)
|
protected GiFTDownloadContainer |
getDownloadContainer(java.lang.String filename,
java.lang.String hash,
long size)
|
java.lang.String |
getHost()
|
java.lang.String |
getMessage()
|
int |
getPort()
|
java.lang.String |
getServerInfo()
Returns giFT server's name and version as String |
java.lang.String |
getStats()
|
java.lang.String |
getStatus()
|
java.lang.String |
getUsername()
|
java.lang.String |
getVerboseMessage()
|
boolean |
isConnected()
|
boolean |
isDisconnected()
|
void |
locate(GiFTDownloadContainer dc)
Searches for more sources for dc. |
protected void |
queueCommand(Command cmd)
|
void |
removeDaemonListener(GiFTDaemonListener listener)
Removes an event listener. |
void |
search(GiFTSearch s)
Adds a new search |
void |
setHost(java.lang.String host)
Sets giFT host |
void |
setPort(int port)
Sets giFT port |
void |
setUsername(java.lang.String username)
Sets giFT user name |
void |
setVerboseMessage(java.lang.Exception e)
|
void |
start()
Connects to the daemon. |
void |
stop(boolean killGiFT)
Disconnects the daemon. |
void |
syncShares()
Forces giFT to sync its shares index |
void |
updateNetworkStats()
Forces giFT to send network stats |
void |
updateShareListing()
Forces giFT to list its shares |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int NETWORK_STATS_INTERVAL
Constructor Detail |
---|
public GiFTDaemon(java.lang.String host, int port, java.lang.String user)
Method Detail |
---|
public void addDaemonListener(GiFTDaemonListener listener)
listener
- the listenerpublic void addDownload(GiFTSearchResult sr)
public void changeDownload(GiFTDownloadContainer dc, java.lang.String action)
public void changeSearch(GiFTSearch s, java.lang.String action)
public void changeUpload(GiFTUpload u, java.lang.String action)
public void deleteSource(GiFTDownloadContainer dc, java.lang.String url)
protected GiFTDownloadContainer getDownloadContainer(java.lang.String filename, java.lang.String hash, long size)
public java.lang.String getHost()
public java.lang.String getMessage()
public int getPort()
public java.lang.String getUsername()
public java.lang.String getStats()
public java.lang.String getStatus()
public java.lang.String getServerInfo()
public java.lang.String getVerboseMessage()
public boolean isConnected()
public boolean isDisconnected()
public void locate(GiFTDownloadContainer dc)
protected void queueCommand(Command cmd)
public void removeDaemonListener(GiFTDaemonListener listener)
listener
- public void updateNetworkStats()
public void updateShareListing()
public void search(GiFTSearch s)
sf
- SearchFilterpublic void setHost(java.lang.String host)
host
- public void setPort(int port)
port
- public void setUsername(java.lang.String username)
user
- public void setVerboseMessage(java.lang.Exception e)
public void start()
public void stop(boolean killGiFT)
public void syncShares()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |