Interface BytestreamManager

    • Method Detail

      • removeIncomingBytestreamListener

        void removeIncomingBytestreamListener​(BytestreamListener listener)
        Removes the given listener from the list of listeners for all incoming bytestream requests.
        Parameters:
        listener - the listener to remove
      • removeIncomingBytestreamListener

        void removeIncomingBytestreamListener​(org.jxmpp.jid.Jid initiatorJID)
        Removes the listener for the given user.
        Parameters:
        initiatorJID - the JID of the user the listener should be removed
      • establishSession

        BytestreamSession establishSession​(org.jxmpp.jid.Jid targetJID)
                                    throws org.jivesoftware.smack.XMPPException,
                                           java.io.IOException,
                                           java.lang.InterruptedException,
                                           org.jivesoftware.smack.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) and InBandBytestreamManager.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:
        org.jivesoftware.smack.XMPPException - if an error occurred while establishing the session
        java.io.IOException - if an IO error occurred while establishing the session
        java.lang.InterruptedException - if the thread was interrupted while waiting in a blocking operation
        org.jivesoftware.smack.SmackException - if an error occurs in Smack.
      • establishSession

        BytestreamSession establishSession​(org.jxmpp.jid.Jid targetJID,
                                           java.lang.String sessionID)
                                    throws org.jivesoftware.smack.XMPPException,
                                           java.io.IOException,
                                           java.lang.InterruptedException,
                                           org.jivesoftware.smack.SmackException
        Establishes a bytestream with the given user and returns the session to send/receive data to/from the user.

        See Socks5BytestreamManager.establishSession(Jid) and InBandBytestreamManager.establishSession(Jid) for further details.

        Parameters:
        targetJID - the JID of the user a bytestream should be established
        sessionID - the session ID for the bytestream request
        Returns:
        the session to send/receive data to/from the user
        Throws:
        org.jivesoftware.smack.XMPPException - if an error occurred while establishing the session
        java.io.IOException - if an IO error occurred while establishing the session
        java.lang.InterruptedException - if the thread was interrupted while waiting in a blocking operation
        org.jivesoftware.smack.SmackException - if an error occurs in Smack.