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,
String initiatorJID)
Adds
BytestreamListener that is called for every incoming bytestream request unless
there is a user specific BytestreamListener registered. |
BytestreamSession |
establishSession(String targetJID)
Establishes a bytestream with the given user and returns the session to send/receive data
to/from the user.
|
BytestreamSession |
establishSession(String 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(String 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, String 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, String)
and InBandBytestreamManager.addIncomingBytestreamListener(BytestreamListener, String)
for further details.
listener
- the listener to registerinitiatorJID
- the JID of the user that wants to establish a bytestreamvoid removeIncomingBytestreamListener(String initiatorJID)
initiatorJID
- the JID of the user the listener should be removedBytestreamSession establishSession(String 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(String, String)
.
See Socks5BytestreamManager.establishSession(String)
and
InBandBytestreamManager.establishSession(String)
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
BytestreamSession establishSession(String targetJID, String sessionID) throws XMPPException, IOException, InterruptedException, SmackException
See Socks5BytestreamManager.establishSession(String)
and
InBandBytestreamManager.establishSession(String)
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