Class ByteStreamManager
- java.lang.Object
-
- rocks.xmpp.core.session.Manager
-
- rocks.xmpp.extensions.bytestreams.ByteStreamManager
-
- Direct Known Subclasses:
InBandByteStreamManager
,Socks5ByteStreamManager
public abstract class ByteStreamManager extends Manager
An abstract class to manage both XEP-0047: In-Band Bytestreams or XEP-0065: SOCKS5 Bytestreams.This class is thread-safe.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
addByteStreamListener(Consumer<ByteStreamEvent> byteStreamListener)
Adds a byte stream listener, which allows to listen for inbound byte stream requests.abstract AsyncResult<ByteStreamSession>
initiateSession(Jid receiver, String sessionId)
Initiates a byte stream session with another entity.void
removeByteStreamListener(Consumer<ByteStreamEvent> byteStreamListener)
Removes a previously added byte stream listener.-
Methods inherited from class rocks.xmpp.core.session.Manager
isEnabled, setEnabled
-
-
-
-
Method Detail
-
addByteStreamListener
public final void addByteStreamListener(Consumer<ByteStreamEvent> byteStreamListener)
Adds a byte stream listener, which allows to listen for inbound byte stream requests.- Parameters:
byteStreamListener
- The listener.- See Also:
removeByteStreamListener(Consumer)
-
removeByteStreamListener
public final void removeByteStreamListener(Consumer<ByteStreamEvent> byteStreamListener)
Removes a previously added byte stream listener.- Parameters:
byteStreamListener
- The listener.- See Also:
addByteStreamListener(Consumer)
-
initiateSession
public abstract AsyncResult<ByteStreamSession> initiateSession(Jid receiver, String sessionId)
Initiates a byte stream session with another entity.- Parameters:
receiver
- The peer entity.sessionId
- The session id.- Returns:
- The async result containing the session.
-
-