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

List of all members.

Public Member Functions

 DataTransferManager (XMPPConnectionService connectionService, IReceiver receiver,@Nullable @Socks5Transport ITransport mainTransport,@Nullable @IBBTransport ITransport fallbackTransport)
void addTransferListener (ITransferListener listener)
void removeTransferListener (ITransferListener listener)
void sendData (final String connectionID, final TransferDescription description, final byte[] data) throws IOException
void sendData (TransferDescription transferDescription, byte[] payload) throws IOException
void connect (JID peer) throws IOException
void connect (String connectionID, JID peer) throws IOException
boolean closeConnection (JID peer)
boolean closeConnection (String connectionIdentifier, JID peer)
synchronized void setTransport (int transportMask)
ConnectionMode getTransferMode (JID jid)
ConnectionMode getTransferMode (String connectionID, JID jid)
void connectionStateChanged (Connection connection, ConnectionState newState)
void addPacketInterceptor (IPacketInterceptor interceptor)
void removePacketInterceptor (IPacketInterceptor interceptor)
void addIncomingTransferObject (BinaryXMPPExtension extension)

Detailed Description

This class is responsible for handling all transfers of binary data. It maintains a map of established connections and tries to reuse them.

Author:
srossbach
coezbek
jurke

Constructor & Destructor Documentation

de.fu_berlin.inf.dpp.net.internal.DataTransferManager.DataTransferManager ( XMPPConnectionService  connectionService,
IReceiver  receiver,
@Nullable @Socks5Transport ITransport  mainTransport,
@Nullable @IBBTransport ITransport  fallbackTransport 
)

Member Function Documentation

void de.fu_berlin.inf.dpp.net.internal.DataTransferManager.addIncomingTransferObject ( BinaryXMPPExtension  extension)

Left over and MUST only used by the STF

Parameters:
extension
Deprecated:
void de.fu_berlin.inf.dpp.net.internal.DataTransferManager.addPacketInterceptor ( IPacketInterceptor  interceptor)
void de.fu_berlin.inf.dpp.net.internal.DataTransferManager.addTransferListener ( ITransferListener  listener)
boolean de.fu_berlin.inf.dpp.net.internal.DataTransferManager.closeConnection ( String  connectionIdentifier,
JID  peer 
)
boolean de.fu_berlin.inf.dpp.net.internal.DataTransferManager.closeConnection ( JID  peer)
Deprecated:
Disconnects IByteStreamConnection with the specified peer
Parameters:
peerJID of the peer to disconnect the IByteStreamConnection

Implements de.fu_berlin.inf.dpp.net.IConnectionManager.

void de.fu_berlin.inf.dpp.net.internal.DataTransferManager.connect ( JID  peer) throws IOException
void de.fu_berlin.inf.dpp.net.internal.DataTransferManager.connect ( String  connectionID,
JID  peer 
) throws IOException
void de.fu_berlin.inf.dpp.net.internal.DataTransferManager.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.

ConnectionMode de.fu_berlin.inf.dpp.net.internal.DataTransferManager.getTransferMode ( String  connectionID,
JID  jid 
)
ConnectionMode de.fu_berlin.inf.dpp.net.internal.DataTransferManager.getTransferMode ( JID  jid)
void de.fu_berlin.inf.dpp.net.internal.DataTransferManager.removePacketInterceptor ( IPacketInterceptor  interceptor)
void de.fu_berlin.inf.dpp.net.internal.DataTransferManager.removeTransferListener ( ITransferListener  listener)
void de.fu_berlin.inf.dpp.net.internal.DataTransferManager.sendData ( final String  connectionID,
final TransferDescription  description,
final byte[]  data 
) throws IOException
void de.fu_berlin.inf.dpp.net.internal.DataTransferManager.sendData ( TransferDescription  transferDescription,
byte[]  payload 
) throws IOException
Deprecated:
establishes connections on demand
Parameters:
transferDescription
payload
Exceptions:
IOException
synchronized void de.fu_berlin.inf.dpp.net.internal.DataTransferManager.setTransport ( int  transportMask)

Sets the transport that should be used to establish direct connections.

Parameters:
transportMaskbit wise OR mask that contain the transport to use, -1 for all available transports or 0 for no transport at all
The transports will be used on the next successful connection to a XMPP server and will not affect the transports that are currently used.

Implements de.fu_berlin.inf.dpp.net.IConnectionManager.

 All Classes Namespaces Files Functions Variables Enumerations