Interface BytestreamManager
- All Known Implementing Classes:
InBandBytestreamManager
,Socks5BytestreamManager
There are two implementations of the interface. See Socks5BytestreamManager
and
InBandBytestreamManager
.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
AddsBytestreamListener
that is called for every incoming bytestream request unless there is a user specificBytestreamListener
registered.void
addIncomingBytestreamListener
(BytestreamListener listener, Jid initiatorJID) AddsBytestreamListener
that is called for every incoming bytestream request unless there is a user specificBytestreamListener
registered.establishSession
(Jid targetJID) Establishes a bytestream with the given user and returns the session to send/receive data to/from the user.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
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.
-
Method Details
-
addIncomingBytestreamListener
AddsBytestreamListener
that is called for every incoming bytestream request unless there is a user specificBytestreamListener
registered.See
Socks5BytestreamManager.addIncomingBytestreamListener(BytestreamListener)
andInBandBytestreamManager.addIncomingBytestreamListener(BytestreamListener)
for further details.- Parameters:
listener
- the listener to register
-
removeIncomingBytestreamListener
Removes the given listener from the list of listeners for all incoming bytestream requests.- Parameters:
listener
- the listener to remove
-
addIncomingBytestreamListener
AddsBytestreamListener
that is called for every incoming bytestream request unless there is a user specificBytestreamListener
registered.Use this method if you are awaiting an incoming bytestream request from a specific user.
See
Socks5BytestreamManager.addIncomingBytestreamListener(BytestreamListener, Jid)
andInBandBytestreamManager.addIncomingBytestreamListener(BytestreamListener, Jid)
for further details.- Parameters:
listener
- the listener to registerinitiatorJID
- the JID of the user that wants to establish a bytestream
-
removeIncomingBytestreamListener
Removes the listener for the given user.- Parameters:
initiatorJID
- the JID of the user the listener should be removed
-
establishSession
BytestreamSession establishSession(Jid targetJID) throws XMPPException, IOException, InterruptedException, SmackException Establishes a bytestream with the given user and returns the session to send/receive data to/from the user.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)
andInBandBytestreamManager.establishSession(Jid)
for further details.- Parameters:
targetJID
- the JID of the user a bytestream should be established- Returns:
- the session to send/receive data to/from the user
- Throws:
XMPPException
- 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.
-
establishSession
BytestreamSession establishSession(Jid targetJID, String sessionID) throws XMPPException, IOException, InterruptedException, SmackException Establishes a bytestream with the given user and returns the session to send/receive data to/from the user.See
Socks5BytestreamManager.establishSession(Jid)
andInBandBytestreamManager.establishSession(Jid)
for further details.- Parameters:
targetJID
- the JID of the user a bytestream should be establishedsessionID
- the session ID for the bytestream request- Returns:
- the session to send/receive data to/from the user
- Throws:
XMPPException
- 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.
-