mirror of
https://github.com/vanitasvitae/Smack.git
synced 2025-09-11 01:59:38 +02:00
Add sendingThread
This commit is contained in:
parent
96197d4092
commit
16a7f31a46
7 changed files with 116 additions and 11 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
||||
}
|
|
@ -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);
|
||||
|
||||
}
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
package org.jivesoftware.smackx.jingle.transports;
|
||||
|
||||
/**
|
||||
* Created by vanitas on 20.06.17.
|
||||
*/
|
||||
public interface JingleTransportNegotiator {
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue