1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2025-09-11 01:59:38 +02:00

Add sendingThread

This commit is contained in:
vanitasvitae 2017-06-21 00:16:47 +02:00
parent 96197d4092
commit 16a7f31a46
Signed by: vanitasvitae
GPG key ID: 62BEE9264BF17311
7 changed files with 116 additions and 11 deletions

View file

@ -121,7 +121,11 @@ public abstract class JingleSession implements JingleSessionHandler {
case session_terminate:
return handleSessionTerminate(jingle);
case transport_replace:
return handleTransportReplace(jingle);
try {
return handleTransportReplace(jingle);
} catch (InterruptedException | SmackException.NoResponseException | SmackException.NotConnectedException | XMPPException.XMPPErrorException e) {
e.printStackTrace();
}
default:
return IQ.createResultIQ(jingle);
}
@ -179,7 +183,9 @@ public abstract class JingleSession implements JingleSessionHandler {
return IQ.createResultIQ(transportInfo);
}
protected IQ handleTransportReplace(Jingle transportReplace) throws InterruptedException, XMPPException.XMPPErrorException, SmackException.NotConnectedException, SmackException.NoResponseException {
protected IQ handleTransportReplace(Jingle transportReplace)
throws InterruptedException, XMPPException.XMPPErrorException,
SmackException.NotConnectedException, SmackException.NoResponseException {
return IQ.createResultIQ(transportReplace);
}

View file

@ -0,0 +1,13 @@
package org.jivesoftware.smackx.jingle.transports;
import org.jivesoftware.smackx.bytestreams.BytestreamSession;
/**
* Created by vanitas on 20.06.17.
*/
public interface JingleTransportInitiationCallback {
void onSessionInitiated(BytestreamSession bytestreamSession);
}

View file

@ -31,4 +31,8 @@ public abstract class JingleTransportManager<D extends JingleContentTransport> {
public abstract D createTransport(Jingle request);
public abstract void initiateOutgoingSession(JingleContentTransport transport, JingleTransportInitiationCallback callback);
public abstract void initiateIncomingSession(JingleContentTransport transport, JingleTransportInitiationCallback callback);
}

View file

@ -0,0 +1,8 @@
package org.jivesoftware.smackx.jingle.transports;
/**
* Created by vanitas on 20.06.17.
*/
public interface JingleTransportNegotiator {
}