Interface BytestreamRequest

All Known Implementing Classes:
InBandBytestreamRequest, Socks5BytestreamRequest

public interface BytestreamRequest
BytestreamRequest provides an interface to handle incoming bytestream requests.

There are two implementations of the interface. See Socks5BytestreamRequest and InBandBytestreamRequest.

  • Method Summary

    Modifier and Type
    Method
    Description
    Accepts the bytestream open request and returns the session to send/receive data.
    org.jxmpp.jid.Jid
    Returns the sender of the bytestream open request.
    Returns the session ID of the bytestream open request.
    void
    Rejects the bytestream request by sending a reject error to the initiator.
  • Method Details

    • getFrom

      org.jxmpp.jid.Jid getFrom()
      Returns the sender of the bytestream open request.
      Returns:
      the sender of the bytestream open request
    • getSessionID

      String getSessionID()
      Returns the session ID of the bytestream open request.
      Returns:
      the session ID of the bytestream open request
    • accept

      BytestreamSession accept() throws InterruptedException, org.jivesoftware.smack.XMPPException.XMPPErrorException, Socks5Exception.CouldNotConnectToAnyProvidedSocks5Host, org.jivesoftware.smack.SmackException.NotConnectedException, Socks5Exception.NoSocks5StreamHostsProvided
      Accepts the bytestream open request and returns the session to send/receive data.
      Returns:
      the session to send/receive data
      Throws:
      org.jivesoftware.smack.XMPPException.XMPPErrorException - if an error occurred while accepting the bytestream request
      InterruptedException - if the thread was interrupted while waiting in a blocking operation
      org.jivesoftware.smack.SmackException.NotConnectedException - if the XMPP connection is not connected.
      Socks5Exception.CouldNotConnectToAnyProvidedSocks5Host - if no connection to any provided stream host could be established
      Socks5Exception.NoSocks5StreamHostsProvided - if no stream host was provided.
    • reject

      void reject() throws org.jivesoftware.smack.SmackException.NotConnectedException, InterruptedException
      Rejects the bytestream request by sending a reject error to the initiator.
      Throws:
      org.jivesoftware.smack.SmackException.NotConnectedException - if the XMPP connection is not connected.
      InterruptedException - if the calling thread was interrupted.