|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--de.knup.jedi.jayshare.Connection
Handles a connection to a conference room
Field Summary | |
protected CommunicationThread |
comm
Provides background communication intelligence. |
protected JID |
confJID
JID of the conference. |
protected ConnectionBean |
connBean
JabberBeans connection bean to control connection to the server. |
protected FileshareListener |
listener
FileshareListener listens to incoming packets and extracts usable input. |
protected Status |
status
Reference to the Status instance. |
Constructor Summary | |
Connection(Status status)
Create a connection instance. |
Method Summary | |
void |
addConnectionListener(ConnectionListener listener)
Add a ConnectionListener (e.g. |
void |
addPacketListener(PacketListener listener)
Add another PacketListener (e.g. |
void |
broadcastListModification(MDate date)
Broadcasts a list modification to the whole conference. |
void |
broadcastMessage(FileshareComponentBuilder builder)
Sends a jayShare packet. |
void |
connect()
Connect to the server and log in. |
void |
disconnect()
Hum, we have to leave now. |
FileshareComponentBuilder |
makeCapability(java.util.Vector versions,
java.lang.String langs,
java.util.Vector xtags)
Create a CapabilityBuilder to send a packet. |
FileshareComponentBuilder |
makeListModification(MDate date)
Create a ListModificationBuilder to send a packet. |
FileshareComponentBuilder |
makeListReply(FileList myList)
Create a ListreplyBuilder to send a packet. |
FileshareComponentBuilder |
makeListRequest()
Create a ListRequestBuilder to send a packet. |
FileshareComponentBuilder |
makeServiceReply(java.lang.String proto,
java.lang.String host,
int port)
Create a ServiceReplyBuilder to send a packet. |
FileshareComponentBuilder |
makeServiceRequest()
Create a ServiceRequestBuilder to send a packet. |
void |
sendMessage(JID toAddress,
FileshareComponentBuilder builder)
Sends a jayShare packet. |
Methods inherited from class java.lang.Object |
|
Field Detail |
protected Status status
protected ConnectionBean connBean
protected FileshareListener listener
protected CommunicationThread comm
protected JID confJID
Constructor Detail |
public Connection(Status status)
user
- User namenick
- Nick namepassword
- Jabber passwordchatroom
- jayShare conference room (e.g. "jayshare")jabberServer
- Jabber server to connect to (e.g. "jabber.org")confServer
- Conference server which provides the group chat (e.g. "conferene.jabber.org")port
- Jabber server port (usually 5222)Method Detail |
public void addPacketListener(PacketListener listener)
public void addConnectionListener(ConnectionListener listener)
public FileshareComponentBuilder makeListModification(MDate date)
date
- Time of the last change of the export list.public FileshareComponentBuilder makeCapability(java.util.Vector versions, java.lang.String langs, java.util.Vector xtags)
versions
- is a Vector of Version objects that define the clients version capabilities.langs
- is a space-seperated String that defines the supported languages.xtags
- is a Vector of XTag objects that contain additional capabilities (e.g. 'public FileshareComponentBuilder makeListRequest()
public FileshareComponentBuilder makeListReply(FileList myList)
myList
- is the export list.public FileshareComponentBuilder makeServiceRequest()
public FileshareComponentBuilder makeServiceReply(java.lang.String proto, java.lang.String host, int port)
proto
- defines the Service protocol (usually "http").host
- defines the DNS server name or IP address of the download server.port
- defines the download server port.public void sendMessage(JID toAddress, FileshareComponentBuilder builder)
toAddress
- is the packets target (either a single user in a conference).builder
- is the packet builder (@see makeListModification (), makeCapability (), makeListRequest (), makeListReply (), makeServiceRequest (), makeServiceReply ()).public void broadcastMessage(FileshareComponentBuilder builder)
builder
- is the packet builder (@see makeListModification ()).public void broadcastListModification(MDate date)
public void disconnect()
public void connect() throws java.net.UnknownHostException, java.io.IOException, NoUserListException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |