|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--de.knup.jedi.jayshare.CommunicationThread
CommunicationThread handles all the background communication of the client. It implements recommended behavoir of a jayShare client:
Field Summary | |
private Connection |
conn
Reference to the connection instance |
private MDate |
modDate
Modification date of the export list |
private Status |
status
Reference to the status instance |
Constructor Summary | |
CommunicationThread(Connection connection,
Status status)
Create a CommunicationThread instance. |
Method Summary | |
private boolean |
addUser(java.lang.String hashedID,
java.lang.String nick)
Add a user to the lookup list. |
void |
getAvailable(JID from)
A new user is available. |
void |
getCapability(JID from,
Capability packet)
A client sent its capabilities. |
void |
getListModification(JID from,
ListModification packet)
A user sent a list modification. |
void |
getListReply(JID from,
ListReply packet)
A user sent its export list. |
void |
getListRequest(JID from,
ListRequest packet)
A user wants our export list. |
void |
getServiceReply(JID from,
ServiceReply packet)
A user sent its service information. |
void |
getServiceRequest(JID from,
ServiceRequest packet)
A user wants to know our download server information. |
void |
getUnavailable(JID from)
A user leaves the conference. |
Methods inherited from class java.lang.Object |
|
Field Detail |
private MDate modDate
private Connection conn
private Status status
Constructor Detail |
public CommunicationThread(Connection connection, Status status)
connection
- is the Connection instance.status
- is the Status instance.Method Detail |
private boolean addUser(java.lang.String hashedID, java.lang.String nick)
hashedID
- is the hashed Jabber ID.nick
- is the nickname the user currently uses.public void getAvailable(JID from)
from
- is the Jabber ID of the user in the conference room (e.g. "jayshare@jabber.org/nick").
Send her/him the list modification time of the export list.public void getUnavailable(JID from)
from
- is the Jabber ID of the user in the conference room (e.g. "jayshare@jabber.org/nick").public void getListModification(JID from, ListModification packet)
from
- is the Jabber ID.packet
- is the ListModification information.
If the timestamp is newer than the one in our own list, then we will request the list.public void getCapability(JID from, Capability packet)
from
- is the Jabber ID.packet
- is the Capability information.
This is right now ignored.public void getListRequest(JID from, ListRequest packet)
from
- is the Jabber ID.packet
- is the ListRequest information (empty).
We will send our export list to her/him.public void getListReply(JID from, ListReply packet)
from
- is the Jabber ID.packet
- is the export list.
Update/Insert the list into the public void getServiceRequest(JID from, ServiceRequest packet)
from
- is the Jabber ID.packet
- is the ServiceRequest information (empty).
Send protocol, host and port of our download server, if we have one.public void getServiceReply(JID from, ServiceReply packet)
from
- is the Jabber ID.packet
- is the ServiceReply information.
Insert the download server information into the ServiceLookupList.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |