Handle session-initiates in descriptionManager

This commit is contained in:
vanitasvitae 2017-07-27 23:59:26 +02:00
parent fec28ac7b6
commit d37bdb5d20
Signed by: vanitasvitae
GPG Key ID: 62BEE9264BF17311
2 changed files with 13 additions and 1 deletions

View File

@ -39,4 +39,6 @@ public abstract class JingleDescription<D extends JingleContentDescriptionElemen
}
public abstract void onTransportReady(BytestreamSession bytestreamSession);
public abstract String getNamespace();
}

View File

@ -253,7 +253,17 @@ public class JingleSession {
}
private IQ handleSessionInitiate(JingleElement request) {
return null;
JingleDescription<?> description = getSoleContentOrThrow().getDescription();
JingleDescriptionManager descriptionManager = jingleManager.getDescriptionManager(description.getNamespace());
if (descriptionManager == null) {
LOGGER.log(Level.WARNING, "Unsupported description type: " + description.getNamespace());
return JingleElement.createSessionTerminate(getPeer(), getSessionId(), JingleReasonElement.Reason.unsupported_applications);
}
descriptionManager.notifySessionInitiate(this);
return IQ.createResultIQ(request);
}
private IQ handleTransportInfo(JingleElement request) {