1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2025-09-10 17:49:38 +02:00

Add functionality to create TransportElements

This commit is contained in:
vanitasvitae 2017-06-08 17:32:37 +02:00
parent 6c0162c341
commit db294f3f1b
Signed by: vanitasvitae
GPG key ID: 62BEE9264BF17311
8 changed files with 65 additions and 8 deletions

View file

@ -19,11 +19,14 @@ package org.jivesoftware.smackx.jingle;
import java.io.OutputStream;
import org.jivesoftware.smack.Manager;
import org.jivesoftware.smack.SmackException;
import org.jivesoftware.smack.XMPPConnection;
import org.jivesoftware.smack.XMPPException;
import org.jivesoftware.smackx.disco.ServiceDiscoveryManager;
import org.jivesoftware.smackx.jingle.element.Jingle;
import org.jivesoftware.smackx.jingle.element.JingleContentTransport;
import org.jivesoftware.smackx.jingle.provider.JingleContentTransportProvider;
import org.jxmpp.jid.Jid;
/**
* Interface with methods that JingleContentTransportManagers must implement.
@ -44,4 +47,6 @@ public abstract class AbstractJingleContentTransportManager<D extends JingleCont
public abstract void acceptInputStream(Jingle jingle, JingleTransportInputStreamCallback callback);
public abstract OutputStream createOutputStream(Jingle jingle);
public abstract D createJingleContentTransport(Jid remote) throws XMPPException.XMPPErrorException, SmackException.NotConnectedException, InterruptedException, SmackException.NoResponseException;
}

View file

@ -62,7 +62,7 @@ public final class JingleTransportManager extends Manager {
contentTransportManagers.remove(manager.getNamespace());
}
public static String generateSessionId() {
public static String generateRandomId() {
return StringUtils.randomString(24);
}
}