Saros
Distributed Collaborative Editing and Distributed Party Programming
de.fu_berlin.inf.dpp.net.internal.XMPPTransmitter Class Reference
Inheritance diagram for de.fu_berlin.inf.dpp.net.internal.XMPPTransmitter:
de.fu_berlin.inf.dpp.net.ITransmitter de.fu_berlin.inf.dpp.net.xmpp.IConnectionListener

List of all members.

Public Member Functions

 XMPPTransmitter (DataTransferManager dataManager, XMPPConnectionService connectionService)
void send (JID recipient, PacketExtension extension) throws IOException
void send (String connectionID, JID recipient, PacketExtension extension) throws IOException
void sendPacketExtension (JID recipient, PacketExtension extension)
synchronized void sendPacket (Packet packet) throws IOException
synchronized void connectionStateChanged (Connection connection, ConnectionState state)

Detailed Description

ITransmitter implementation using XMPP, IBB streams and Socks5 streams for sending packet extensions and packets.


Constructor & Destructor Documentation

de.fu_berlin.inf.dpp.net.internal.XMPPTransmitter.XMPPTransmitter ( DataTransferManager  dataManager,
XMPPConnectionService  connectionService 
)

Member Function Documentation

synchronized void de.fu_berlin.inf.dpp.net.internal.XMPPTransmitter.connectionStateChanged ( Connection  connection,
ConnectionState  state 
)

Is fired when the state of the connection changes.

Parameters:
connectionThe affected XMPP-connection that changed its state
statethe new state of the connection. If the state is ERROR, you can use XMPPConnectionService#getConnectionError() to get the error message.

Implements de.fu_berlin.inf.dpp.net.xmpp.IConnectionListener.

void de.fu_berlin.inf.dpp.net.internal.XMPPTransmitter.send ( String  connectionID,
JID  recipient,
PacketExtension  extension 
) throws IOException

Sends the given PacketExtension to the given JID using a direct stream connection. The connection must be already established to the recipient with the given id.

Parameters:
connectionIDthe id of the connection
recipientthe recipient of the extension
extensionthe extension to send
Exceptions:
IOExceptionif an I/O error occurs

Implements de.fu_berlin.inf.dpp.net.ITransmitter.

void de.fu_berlin.inf.dpp.net.internal.XMPPTransmitter.send ( JID  recipient,
PacketExtension  extension 
) throws IOException
synchronized void de.fu_berlin.inf.dpp.net.internal.XMPPTransmitter.sendPacket ( Packet  packet) throws IOException

4, Architecture Overview, Network Layer - Transmitter:

The Network Layer is responsible for communicating with other participants by sending and receiving messages. This Interface is the main entrance point for sending packets. (...) Sends the specified packet to the server.

Parameters:
packetthe packet to send
Exceptions:
IOExceptionif an I/O error occurs or no connection is established to a XMPP server

Implements de.fu_berlin.inf.dpp.net.ITransmitter.

void de.fu_berlin.inf.dpp.net.internal.XMPPTransmitter.sendPacketExtension ( JID  jid,
PacketExtension  extension 
)

Sends the given PacketExtension to the given JID over the currently established XMPP connection. There is no guarantee that this message (extension) will arrive at the recipients side !

Parameters:
jidthe recipient of the extension
extensionthe extension to send

Implements de.fu_berlin.inf.dpp.net.ITransmitter.

 All Classes Namespaces Files Functions Variables Enumerations