public interface BytestreamManager
There are two implementations of the interface. See Socks5BytestreamManager
and
InBandBytestreamManager
.
Modifier and Type | Method and Description |
---|---|
void |
addIncomingBytestreamListener(BytestreamListener listener)
Adds
BytestreamListener that is called for every incoming bytestream request unless
there is a user specific BytestreamListener registered. |
void |
addIncomingBytestreamListener(BytestreamListener listener,
Jid initiatorJID)
Adds
BytestreamListener that is called for every incoming bytestream request unless
there is a user specific BytestreamListener registered. |
BytestreamSession |
establishSession(Jid targetJID)
Establishes a bytestream with the given user and returns the session to send/receive data
to/from the user.
|
BytestreamSession |
establishSession(Jid targetJID,
String sessionID)
Establishes a bytestream with the given user and returns the session to send/receive data
to/from the user.
|
void |
removeIncomingBytestreamListener(BytestreamListener listener)
Removes the given listener from the list of listeners for all incoming bytestream requests.
|
void |
removeIncomingBytestreamListener(Jid initiatorJID)
Removes the listener for the given user.
|
void addIncomingBytestreamListener(BytestreamListener listener)
BytestreamListener
that is called for every incoming bytestream request unless
there is a user specific BytestreamListener
registered.
See Socks5BytestreamManager.addIncomingBytestreamListener(BytestreamListener)
and
InBandBytestreamManager.addIncomingBytestreamListener(BytestreamListener)
for further
details.
listener
- the listener to registervoid removeIncomingBytestreamListener(BytestreamListener listener)
listener
- the listener to removevoid addIncomingBytestreamListener(BytestreamListener listener, Jid initiatorJID)
BytestreamListener
that is called for every incoming bytestream request unless
there is a user specific BytestreamListener
registered.
Use this method if you are awaiting an incoming bytestream request from a specific user.
See Socks5BytestreamManager.addIncomingBytestreamListener(BytestreamListener, Jid)
and InBandBytestreamManager.addIncomingBytestreamListener(BytestreamListener, Jid)
for further details.
listener
- the listener to registerinitiatorJID
- the JID of the user that wants to establish a bytestreamvoid removeIncomingBytestreamListener(Jid initiatorJID)
initiatorJID
- the JID of the user the listener should be removedBytestreamSession establishSession(Jid targetJID) throws XMPPException, IOException, InterruptedException, SmackException
Use this method to establish bytestreams to users accepting all incoming bytestream requests since this method doesn't provide a way to tell the user something about the data to be sent.
To establish a bytestream after negotiation the kind of data to be sent (e.g. file transfer)
use establishSession(Jid, String)
.
See Socks5BytestreamManager.establishSession(Jid)
and
InBandBytestreamManager.establishSession(Jid)
for further details.
targetJID
- the JID of the user a bytestream should be establishedXMPPException
- if an error occurred while establishing the sessionIOException
- if an IO error occurred while establishing the sessionInterruptedException
- if the thread was interrupted while waiting in a blocking
operationSmackException
- if an error occurs in Smack.BytestreamSession establishSession(Jid targetJID, String sessionID) throws XMPPException, IOException, InterruptedException, SmackException
See Socks5BytestreamManager.establishSession(Jid)
and
InBandBytestreamManager.establishSession(Jid)
for further details.
targetJID
- the JID of the user a bytestream should be establishedsessionID
- the session ID for the bytestream requestXMPPException
- if an error occurred while establishing the sessionIOException
- if an IO error occurred while establishing the sessionInterruptedException
- if the thread was interrupted while waiting in a blocking
operationSmackException
- if an error occurs in Smack.