java.lang.Object
|
+--java.lang.Thread
|
+--DonkeyCore
This class implements mlDonkey Core/GUI protocol. This is a part of jMoule. This project is licenced under GPL.
| Field Summary | |
javax.swing.JTextArea |
console
This is a text panel containing console messages... |
java.util.Hashtable |
fileInfos
This contains the informations about the files being downloaded. |
java.util.Hashtable |
resultInfos
This contains the informations about the results of searches. |
java.util.Vector |
searchResults
This contains all the searches results. |
java.util.Hashtable |
serverInfos
This contains the informations about the donkey servers. |
java.util.Hashtable |
statInfos
This contains statistics informations. |
| Fields inherited from class java.lang.Thread |
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
| Constructor Summary | |
DonkeyCore()
Constructs an unconnected DonkeyCore. |
|
DonkeyCore(java.lang.String host,
int port,
java.lang.String password)
Constructs a connected DonkeyCore. |
|
| Method Summary | |
void |
cleanOld()
Asks the mlDonkey core to clean old servers. |
boolean |
connect(java.lang.String host,
int port,
java.lang.String password)
Connects an unconnected DonkeyCore. |
void |
connectMore()
Asks the mlDonkey core to connect more servers. |
void |
connectServer(java.lang.Long serverID)
Asks mlDonkey to connect to a new server. |
void |
disconnect()
Disconnects this DonkeyCore. |
void |
disconnectServer(java.lang.Long serverID)
Asks mlDonkey to disconnect from a server. |
void |
download(java.lang.Long fileID)
Start a new download. |
void |
extend()
Extends (redo) the last search. |
boolean |
isConnected()
Tests if this DonkeyCore is already connected. |
void |
kill()
Asks the mlDonkey core to kill (terminate) itself. |
void |
run()
This class is a thread. |
java.util.Vector |
search(java.lang.String query)
Start a new search. |
void |
switchDownload(java.lang.Long fileID,
boolean bool)
Pause/Resume a download. |
| Methods inherited from class java.lang.Thread |
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public java.util.Hashtable fileInfos
public java.util.Hashtable resultInfos
public java.util.Hashtable serverInfos
public java.util.Vector searchResults
public java.util.Hashtable statInfos
public javax.swing.JTextArea console
| Constructor Detail |
public DonkeyCore()
public DonkeyCore(java.lang.String host,
int port,
java.lang.String password)
| Method Detail |
public boolean connect(java.lang.String host,
int port,
java.lang.String password)
host - mlDonkey host you wish to connect to.port - mlDonkey core port.password - Password if needed.public void disconnect()
public boolean isConnected()
public void connectMore()
public void cleanOld()
public void kill()
public void extend()
public void download(java.lang.Long fileID)
fileID - ID of the file to download (found in resultInfos key).
public void switchDownload(java.lang.Long fileID,
boolean bool)
fileID - ID of the file to switch (found in resultInfos key).bool - true = resume, false = pause.public void connectServer(java.lang.Long serverID)
serverID - ID of the server to connect to (found in serverInfos key).public void disconnectServer(java.lang.Long serverID)
serverID - ID of the server to disconnect (found in serverInfos key).public java.util.Vector search(java.lang.String query)
query - A simple string to describe what you want to search.public void run()
run in class java.lang.Thread