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
andInBandBytestreamRequest
.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description BytestreamSession
accept()
Accepts the bytestream open request and returns the session to send/receive data.Jid
getFrom()
Returns the sender of the bytestream open request.java.lang.String
getSessionID()
Returns the session ID of the bytestream open request.void
reject()
Rejects the bytestream request by sending a reject error to the initiator.
-
-
-
Method Detail
-
getFrom
Jid getFrom()
Returns the sender of the bytestream open request.- Returns:
- the sender of the bytestream open request
-
getSessionID
java.lang.String getSessionID()
Returns the session ID of the bytestream open request.- Returns:
- the session ID of the bytestream open request
-
accept
BytestreamSession accept() throws java.lang.InterruptedException, XMPPException.XMPPErrorException, Socks5Exception.CouldNotConnectToAnyProvidedSocks5Host, 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:
XMPPException.XMPPErrorException
- if an error occurred while accepting the bytestream requestjava.lang.InterruptedException
- if the thread was interrupted while waiting in a blocking operationSmackException.NotConnectedException
- if the XMPP connection is not connected.Socks5Exception.CouldNotConnectToAnyProvidedSocks5Host
- if no connection to any provided stream host could be establishedSocks5Exception.NoSocks5StreamHostsProvided
- if no stream host was provided.
-
reject
void reject() throws SmackException.NotConnectedException, java.lang.InterruptedException
Rejects the bytestream request by sending a reject error to the initiator.- Throws:
SmackException.NotConnectedException
- if the XMPP connection is not connected.java.lang.InterruptedException
- if the calling thread was interrupted.
-
-