Saros
Distributed Collaborative Editing and Distributed Party Programming
|
Classes | |
class | IDPool |
class | Opcode |
class | ReceiverThread |
Public Member Functions | |
BinaryChannelConnection (JID peer, String connectionID, ByteStream stream, ConnectionMode mode, IByteStreamConnectionListener listener) throws IOException | |
synchronized void | initialize () |
String | getConnectionID () |
synchronized boolean | isConnected () |
void | close () |
ConnectionMode | getMode () |
JID | getPeer () |
void | send (TransferDescription data, byte[] content) throws IOException |
String | toString () |
BinaryChannelConnection is a class that encapsulates a bidirectional communication channel between two participants.
The threading requirements of this class are the following:
send() is a reentrant method for sending data. Any number of threads can call it in parallel. Note: The maximum number of concurrent threads is 32 !
de.fu_berlin.inf.dpp.net.internal.BinaryChannelConnection.BinaryChannelConnection | ( | JID | peer, |
String | connectionID, | ||
ByteStream | stream, | ||
ConnectionMode | mode, | ||
IByteStreamConnectionListener | listener | ||
) | throws IOException |
void de.fu_berlin.inf.dpp.net.internal.BinaryChannelConnection.close | ( | ) |
String de.fu_berlin.inf.dpp.net.internal.BinaryChannelConnection.getConnectionID | ( | ) |
Returns the connection id of this connection.
null
if the connection has no id Implements de.fu_berlin.inf.dpp.net.internal.IByteStreamConnection.
ConnectionMode de.fu_berlin.inf.dpp.net.internal.BinaryChannelConnection.getMode | ( | ) |
JID de.fu_berlin.inf.dpp.net.internal.BinaryChannelConnection.getPeer | ( | ) |
synchronized void de.fu_berlin.inf.dpp.net.internal.BinaryChannelConnection.initialize | ( | ) |
Initializes the byte stream connection. After the initialization is performed the byte stream connection must be able to send and receive data.
Implements de.fu_berlin.inf.dpp.net.internal.IByteStreamConnection.
synchronized boolean de.fu_berlin.inf.dpp.net.internal.BinaryChannelConnection.isConnected | ( | ) |
void de.fu_berlin.inf.dpp.net.internal.BinaryChannelConnection.send | ( | TransferDescription | data, |
byte[] | content | ||
) | throws IOException |
If this call returns the data has been send successfully, otherwise an IOException is thrown with the reason why the transfer failed.
data | The data to be sent. |
IOException | if the send failed Send the given data as a blocking operation. |
Implements de.fu_berlin.inf.dpp.net.internal.IByteStreamConnection.
String de.fu_berlin.inf.dpp.net.internal.BinaryChannelConnection.toString | ( | ) |