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:
parent
6c0162c341
commit
db294f3f1b
8 changed files with 65 additions and 8 deletions
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue