mirror of
https://github.com/vanitasvitae/Smack.git
synced 2025-09-11 01:59:38 +02:00
More progress on JET
This commit is contained in:
parent
c82b25ea09
commit
b0b46ad167
12 changed files with 339 additions and 65 deletions
|
@ -102,8 +102,7 @@ public class JingleContent implements JingleTransportCallback, JingleSecurityCal
|
|||
if (descriptionAdapter != null) {
|
||||
description = descriptionAdapter.descriptionFromElement(content.getCreator(), content.getSenders(), content.getName(), content.getDisposition(), descriptionElement);
|
||||
} else {
|
||||
throw new AssertionError("DescriptionProvider for " + descriptionElement.getNamespace() +
|
||||
" seems to be registered, but no corresponding JingleDescriptionAdapter was found.");
|
||||
throw new AssertionError("Unsupported Description: " + descriptionElement.getNamespace());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -113,8 +112,7 @@ public class JingleContent implements JingleTransportCallback, JingleSecurityCal
|
|||
if (transportAdapter != null) {
|
||||
transport = transportAdapter.transportFromElement(transportElement);
|
||||
} else {
|
||||
throw new AssertionError("TransportProvider for " + transportElement.getNamespace() +
|
||||
" seems to be registered, but no corresponding JingleTransportAdapter was found.");
|
||||
throw new AssertionError("Unsupported Transport: " + transportElement.getNamespace());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -124,8 +122,7 @@ public class JingleContent implements JingleTransportCallback, JingleSecurityCal
|
|||
if (securityAdapter != null) {
|
||||
security = securityAdapter.securityFromElement(securityElement);
|
||||
} else {
|
||||
throw new AssertionError("SecurityProvider for " + securityElement.getNamespace() +
|
||||
" seems to be registered, but no corresponding JingleSecurityAdapter was found.");
|
||||
throw new AssertionError("Unsupported Security: " + securityElement.getNamespace());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -341,7 +338,7 @@ public class JingleContent implements JingleTransportCallback, JingleSecurityCal
|
|||
getSecurity().decryptIncomingBytestream(bytestreamSession, this);
|
||||
} else if (isSending()) {
|
||||
LOGGER.log(Level.INFO, "Encrypt outgoing Bytestream.");
|
||||
getSecurity().encryptIncomingBytestream(bytestreamSession, this);
|
||||
getSecurity().encryptOutgoingBytestream(bytestreamSession, this);
|
||||
}
|
||||
} else {
|
||||
description.onBytestreamReady(bytestreamSession);
|
||||
|
|
|
@ -45,5 +45,5 @@ public abstract class JingleSecurity<D extends JingleContentSecurityElement> {
|
|||
|
||||
public abstract void decryptIncomingBytestream(BytestreamSession bytestreamSession, JingleSecurityCallback callback);
|
||||
|
||||
public abstract void encryptIncomingBytestream(BytestreamSession bytestreamSession, JingleSecurityCallback callbacks);
|
||||
public abstract void encryptOutgoingBytestream(BytestreamSession bytestreamSession, JingleSecurityCallback callbacks);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue