public final class StreamInitiationManager extends ExtensionManager implements FileTransferNegotiator
| Modifier and Type | Method and Description |
|---|---|
FileTransfer |
accept(IQ iq,
String sessionId,
FileTransferOffer fileTransferOffer,
Object protocol,
OutputStream outputStream) |
OutputStream |
initiateStream(Jid receiver,
SIFileTransferOffer profile,
String mimeType,
long timeout)
Initiates a stream with another entity.
|
void |
reject(IQ iq) |
isEnabled, setEnabledpublic OutputStream initiateStream(Jid receiver, SIFileTransferOffer profile, String mimeType, long timeout) throws XmppException, IOException
receiver - The receiver, i.e. the XMPP entity you want to negotiate a stream.profile - The profile. Currently there's only the SIFileTransferOffer profile.mimeType - The mime type of the stream.timeout - The timeout, which wait until the stream has been negotiated.StanzaException - If the entity returned a stanza error.NoResponseException - If the entity did not respond.IOException - If an I/O error occurred during byte session establishment.XmppExceptionpublic FileTransfer accept(IQ iq, String sessionId, FileTransferOffer fileTransferOffer, Object protocol, OutputStream outputStream) throws IOException
accept in interface FileTransferNegotiatorIOExceptionpublic void reject(IQ iq)
reject in interface FileTransferNegotiatorCopyright © 2014–2015 XMPP.rocks. All rights reserved.