id int32 0 165k | repo stringlengths 7 58 | path stringlengths 12 218 | func_name stringlengths 3 140 | original_string stringlengths 73 34.1k | language stringclasses 1
value | code stringlengths 73 34.1k | code_tokens list | docstring stringlengths 3 16k | docstring_tokens list | sha stringlengths 40 40 | url stringlengths 105 339 |
|---|---|---|---|---|---|---|---|---|---|---|---|
26,600 | igniterealtime/Smack | smack-tcp/src/main/java/org/jivesoftware/smack/tcp/XMPPTCPConnection.java | XMPPTCPConnection.maybeGetCompressionHandler | private static XMPPInputOutputStream maybeGetCompressionHandler(Compress.Feature compression) {
for (XMPPInputOutputStream handler : SmackConfiguration.getCompressionHandlers()) {
String method = handler.getCompressionMethod();
if (compression.getMethods().contains(method))
... | java | private static XMPPInputOutputStream maybeGetCompressionHandler(Compress.Feature compression) {
for (XMPPInputOutputStream handler : SmackConfiguration.getCompressionHandlers()) {
String method = handler.getCompressionMethod();
if (compression.getMethods().contains(method))
... | [
"private",
"static",
"XMPPInputOutputStream",
"maybeGetCompressionHandler",
"(",
"Compress",
".",
"Feature",
"compression",
")",
"{",
"for",
"(",
"XMPPInputOutputStream",
"handler",
":",
"SmackConfiguration",
".",
"getCompressionHandlers",
"(",
")",
")",
"{",
"String",
... | Returns the compression handler that can be used for one compression methods offered by the server.
@return a instance of XMPPInputOutputStream or null if no suitable instance was found | [
"Returns",
"the",
"compression",
"handler",
"that",
"can",
"be",
"used",
"for",
"one",
"compression",
"methods",
"offered",
"by",
"the",
"server",
"."
] | 870756997faec1e1bfabfac0cd6c2395b04da873 | https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-tcp/src/main/java/org/jivesoftware/smack/tcp/XMPPTCPConnection.java#L730-L737 |
26,601 | igniterealtime/Smack | smack-tcp/src/main/java/org/jivesoftware/smack/tcp/XMPPTCPConnection.java | XMPPTCPConnection.openStream | void openStream() throws SmackException, InterruptedException, XmlPullParserException {
sendStreamOpen();
packetReader.parser = PacketParserUtils.newXmppParser(reader);
} | java | void openStream() throws SmackException, InterruptedException, XmlPullParserException {
sendStreamOpen();
packetReader.parser = PacketParserUtils.newXmppParser(reader);
} | [
"void",
"openStream",
"(",
")",
"throws",
"SmackException",
",",
"InterruptedException",
",",
"XmlPullParserException",
"{",
"sendStreamOpen",
"(",
")",
";",
"packetReader",
".",
"parser",
"=",
"PacketParserUtils",
".",
"newXmppParser",
"(",
"reader",
")",
";",
"}... | Resets the parser using the latest connection's reader. Resetting the parser is necessary
when the plain connection has been secured or when a new opening stream element is going
to be sent by the server.
@throws SmackException if the parser could not be reset.
@throws InterruptedException
@throws XmlPullParserExcepti... | [
"Resets",
"the",
"parser",
"using",
"the",
"latest",
"connection",
"s",
"reader",
".",
"Resetting",
"the",
"parser",
"is",
"necessary",
"when",
"the",
"plain",
"connection",
"has",
"been",
"secured",
"or",
"when",
"a",
"new",
"opening",
"stream",
"element",
... | 870756997faec1e1bfabfac0cd6c2395b04da873 | https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-tcp/src/main/java/org/jivesoftware/smack/tcp/XMPPTCPConnection.java#L856-L859 |
26,602 | igniterealtime/Smack | smack-tcp/src/main/java/org/jivesoftware/smack/tcp/XMPPTCPConnection.java | XMPPTCPConnection.isSmResumptionPossible | public boolean isSmResumptionPossible() {
// There is no resumable stream available
if (smSessionId == null)
return false;
final Long shutdownTimestamp = packetWriter.shutdownTimestamp;
// Seems like we are already reconnected, report true
if (shutdownTimestamp == nu... | java | public boolean isSmResumptionPossible() {
// There is no resumable stream available
if (smSessionId == null)
return false;
final Long shutdownTimestamp = packetWriter.shutdownTimestamp;
// Seems like we are already reconnected, report true
if (shutdownTimestamp == nu... | [
"public",
"boolean",
"isSmResumptionPossible",
"(",
")",
"{",
"// There is no resumable stream available",
"if",
"(",
"smSessionId",
"==",
"null",
")",
"return",
"false",
";",
"final",
"Long",
"shutdownTimestamp",
"=",
"packetWriter",
".",
"shutdownTimestamp",
";",
"/... | Returns true if the stream is resumable.
@return true if the stream is resumable. | [
"Returns",
"true",
"if",
"the",
"stream",
"is",
"resumable",
"."
] | 870756997faec1e1bfabfac0cd6c2395b04da873 | https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-tcp/src/main/java/org/jivesoftware/smack/tcp/XMPPTCPConnection.java#L1728-L1749 |
26,603 | igniterealtime/Smack | smack-omemo/src/main/java/org/jivesoftware/smackx/omemo/OmemoManager.java | OmemoManager.getInstanceFor | public static synchronized OmemoManager getInstanceFor(XMPPConnection connection, Integer deviceId) {
if (deviceId == null || deviceId < 1) {
throw new IllegalArgumentException("DeviceId MUST NOT be null and MUST be greater than 0.");
}
TreeMap<Integer,OmemoManager> managersOfConnec... | java | public static synchronized OmemoManager getInstanceFor(XMPPConnection connection, Integer deviceId) {
if (deviceId == null || deviceId < 1) {
throw new IllegalArgumentException("DeviceId MUST NOT be null and MUST be greater than 0.");
}
TreeMap<Integer,OmemoManager> managersOfConnec... | [
"public",
"static",
"synchronized",
"OmemoManager",
"getInstanceFor",
"(",
"XMPPConnection",
"connection",
",",
"Integer",
"deviceId",
")",
"{",
"if",
"(",
"deviceId",
"==",
"null",
"||",
"deviceId",
"<",
"1",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
... | Return an OmemoManager instance for the given connection and deviceId.
If there was an OmemoManager for the connection and id before, return it. Otherwise create a new OmemoManager
instance and return it.
@param connection XmppConnection.
@param deviceId MUST NOT be null and MUST be greater than 0.
@return manager | [
"Return",
"an",
"OmemoManager",
"instance",
"for",
"the",
"given",
"connection",
"and",
"deviceId",
".",
"If",
"there",
"was",
"an",
"OmemoManager",
"for",
"the",
"connection",
"and",
"id",
"before",
"return",
"it",
".",
"Otherwise",
"create",
"a",
"new",
"O... | 870756997faec1e1bfabfac0cd6c2395b04da873 | https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-omemo/src/main/java/org/jivesoftware/smackx/omemo/OmemoManager.java#L154-L172 |
26,604 | igniterealtime/Smack | smack-omemo/src/main/java/org/jivesoftware/smackx/omemo/OmemoManager.java | OmemoManager.getInstanceFor | public static synchronized OmemoManager getInstanceFor(XMPPConnection connection) {
TreeMap<Integer, OmemoManager> managers = INSTANCES.get(connection);
if (managers == null) {
managers = new TreeMap<>();
INSTANCES.put(connection, managers);
}
OmemoManager manage... | java | public static synchronized OmemoManager getInstanceFor(XMPPConnection connection) {
TreeMap<Integer, OmemoManager> managers = INSTANCES.get(connection);
if (managers == null) {
managers = new TreeMap<>();
INSTANCES.put(connection, managers);
}
OmemoManager manage... | [
"public",
"static",
"synchronized",
"OmemoManager",
"getInstanceFor",
"(",
"XMPPConnection",
"connection",
")",
"{",
"TreeMap",
"<",
"Integer",
",",
"OmemoManager",
">",
"managers",
"=",
"INSTANCES",
".",
"get",
"(",
"connection",
")",
";",
"if",
"(",
"managers"... | Returns an OmemoManager instance for the given connection. If there was one manager for the connection before,
return it. If there were multiple managers before, return the one with the lowest deviceId.
If there was no manager before, return a new one. As soon as the connection gets authenticated, the manager
will look... | [
"Returns",
"an",
"OmemoManager",
"instance",
"for",
"the",
"given",
"connection",
".",
"If",
"there",
"was",
"one",
"manager",
"for",
"the",
"connection",
"before",
"return",
"it",
".",
"If",
"there",
"were",
"multiple",
"managers",
"before",
"return",
"the",
... | 870756997faec1e1bfabfac0cd6c2395b04da873 | https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-omemo/src/main/java/org/jivesoftware/smackx/omemo/OmemoManager.java#L185-L203 |
26,605 | igniterealtime/Smack | smack-omemo/src/main/java/org/jivesoftware/smackx/omemo/OmemoManager.java | OmemoManager.initialize | public void initialize()
throws SmackException.NotLoggedInException, CorruptedOmemoKeyException, InterruptedException,
SmackException.NoResponseException, SmackException.NotConnectedException, XMPPException.XMPPErrorException,
PubSubException.NotALeafNodeException {
synchroni... | java | public void initialize()
throws SmackException.NotLoggedInException, CorruptedOmemoKeyException, InterruptedException,
SmackException.NoResponseException, SmackException.NotConnectedException, XMPPException.XMPPErrorException,
PubSubException.NotALeafNodeException {
synchroni... | [
"public",
"void",
"initialize",
"(",
")",
"throws",
"SmackException",
".",
"NotLoggedInException",
",",
"CorruptedOmemoKeyException",
",",
"InterruptedException",
",",
"SmackException",
".",
"NoResponseException",
",",
"SmackException",
".",
"NotConnectedException",
",",
... | Initializes the OmemoManager. This method must be called before the manager can be used.
@throws CorruptedOmemoKeyException
@throws InterruptedException
@throws SmackException.NoResponseException
@throws SmackException.NotConnectedException
@throws XMPPException.XMPPErrorException
@throws SmackException.NotLoggedInExc... | [
"Initializes",
"the",
"OmemoManager",
".",
"This",
"method",
"must",
"be",
"called",
"before",
"the",
"manager",
"can",
"be",
"used",
"."
] | 870756997faec1e1bfabfac0cd6c2395b04da873 | https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-omemo/src/main/java/org/jivesoftware/smackx/omemo/OmemoManager.java#L237-L253 |
26,606 | igniterealtime/Smack | smack-omemo/src/main/java/org/jivesoftware/smackx/omemo/OmemoManager.java | OmemoManager.initializeAsync | public void initializeAsync(final InitializationFinishedCallback finishedCallback) {
Async.go(new Runnable() {
@Override
public void run() {
try {
initialize();
finishedCallback.initializationFinished(OmemoManager.this);
... | java | public void initializeAsync(final InitializationFinishedCallback finishedCallback) {
Async.go(new Runnable() {
@Override
public void run() {
try {
initialize();
finishedCallback.initializationFinished(OmemoManager.this);
... | [
"public",
"void",
"initializeAsync",
"(",
"final",
"InitializationFinishedCallback",
"finishedCallback",
")",
"{",
"Async",
".",
"go",
"(",
"new",
"Runnable",
"(",
")",
"{",
"@",
"Override",
"public",
"void",
"run",
"(",
")",
"{",
"try",
"{",
"initialize",
"... | Initialize the manager without blocking. Once the manager is successfully initialized, the finishedCallback will
be notified. It will also get notified, if an error occurs.
@param finishedCallback callback that gets called once the manager is initialized. | [
"Initialize",
"the",
"manager",
"without",
"blocking",
".",
"Once",
"the",
"manager",
"is",
"successfully",
"initialized",
"the",
"finishedCallback",
"will",
"be",
"notified",
".",
"It",
"will",
"also",
"get",
"notified",
"if",
"an",
"error",
"occurs",
"."
] | 870756997faec1e1bfabfac0cd6c2395b04da873 | https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-omemo/src/main/java/org/jivesoftware/smackx/omemo/OmemoManager.java#L261-L273 |
26,607 | igniterealtime/Smack | smack-omemo/src/main/java/org/jivesoftware/smackx/omemo/OmemoManager.java | OmemoManager.getDevicesOf | public Set<OmemoDevice> getDevicesOf(BareJid contact) {
OmemoCachedDeviceList list = getOmemoService().getOmemoStoreBackend().loadCachedDeviceList(getOwnDevice(), contact);
HashSet<OmemoDevice> devices = new HashSet<>();
for (int deviceId : list.getActiveDevices()) {
devices.add(new... | java | public Set<OmemoDevice> getDevicesOf(BareJid contact) {
OmemoCachedDeviceList list = getOmemoService().getOmemoStoreBackend().loadCachedDeviceList(getOwnDevice(), contact);
HashSet<OmemoDevice> devices = new HashSet<>();
for (int deviceId : list.getActiveDevices()) {
devices.add(new... | [
"public",
"Set",
"<",
"OmemoDevice",
">",
"getDevicesOf",
"(",
"BareJid",
"contact",
")",
"{",
"OmemoCachedDeviceList",
"list",
"=",
"getOmemoService",
"(",
")",
".",
"getOmemoStoreBackend",
"(",
")",
".",
"loadCachedDeviceList",
"(",
"getOwnDevice",
"(",
")",
"... | Return a set of all OMEMO capable devices of a contact.
Note, that this method does not explicitly refresh the device list of the contact, so it might be outdated.
@see #requestDeviceListUpdateFor(BareJid)
@param contact contact we want to get a set of device of.
@return set of known devices of that contact. | [
"Return",
"a",
"set",
"of",
"all",
"OMEMO",
"capable",
"devices",
"of",
"a",
"contact",
".",
"Note",
"that",
"this",
"method",
"does",
"not",
"explicitly",
"refresh",
"the",
"device",
"list",
"of",
"the",
"contact",
"so",
"it",
"might",
"be",
"outdated",
... | 870756997faec1e1bfabfac0cd6c2395b04da873 | https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-omemo/src/main/java/org/jivesoftware/smackx/omemo/OmemoManager.java#L282-L291 |
26,608 | igniterealtime/Smack | smack-omemo/src/main/java/org/jivesoftware/smackx/omemo/OmemoManager.java | OmemoManager.encrypt | public OmemoMessage.Sent encrypt(BareJid recipient, String message)
throws CryptoFailedException, UndecidedOmemoIdentityException,
InterruptedException, SmackException.NotConnectedException,
SmackException.NoResponseException, SmackException.NotLoggedInException {
synchronize... | java | public OmemoMessage.Sent encrypt(BareJid recipient, String message)
throws CryptoFailedException, UndecidedOmemoIdentityException,
InterruptedException, SmackException.NotConnectedException,
SmackException.NoResponseException, SmackException.NotLoggedInException {
synchronize... | [
"public",
"OmemoMessage",
".",
"Sent",
"encrypt",
"(",
"BareJid",
"recipient",
",",
"String",
"message",
")",
"throws",
"CryptoFailedException",
",",
"UndecidedOmemoIdentityException",
",",
"InterruptedException",
",",
"SmackException",
".",
"NotConnectedException",
",",
... | OMEMO encrypt a cleartext message for a single recipient.
Note that this method does NOT set the 'to' attribute of the message.
@param recipient recipients bareJid
@param message text to encrypt
@return encrypted message
@throws CryptoFailedException when something crypto related fails
@throws Undecided... | [
"OMEMO",
"encrypt",
"a",
"cleartext",
"message",
"for",
"a",
"single",
"recipient",
".",
"Note",
"that",
"this",
"method",
"does",
"NOT",
"set",
"the",
"to",
"attribute",
"of",
"the",
"message",
"."
] | 870756997faec1e1bfabfac0cd6c2395b04da873 | https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-omemo/src/main/java/org/jivesoftware/smackx/omemo/OmemoManager.java#L307-L316 |
26,609 | igniterealtime/Smack | smack-omemo/src/main/java/org/jivesoftware/smackx/omemo/OmemoManager.java | OmemoManager.encrypt | public OmemoMessage.Sent encrypt(Set<BareJid> recipients, String message)
throws CryptoFailedException, UndecidedOmemoIdentityException,
InterruptedException, SmackException.NotConnectedException,
SmackException.NoResponseException, SmackException.NotLoggedInException {
synch... | java | public OmemoMessage.Sent encrypt(Set<BareJid> recipients, String message)
throws CryptoFailedException, UndecidedOmemoIdentityException,
InterruptedException, SmackException.NotConnectedException,
SmackException.NoResponseException, SmackException.NotLoggedInException {
synch... | [
"public",
"OmemoMessage",
".",
"Sent",
"encrypt",
"(",
"Set",
"<",
"BareJid",
">",
"recipients",
",",
"String",
"message",
")",
"throws",
"CryptoFailedException",
",",
"UndecidedOmemoIdentityException",
",",
"InterruptedException",
",",
"SmackException",
".",
"NotConn... | OMEMO encrypt a cleartext message for multiple recipients.
@param recipients recipients barejids
@param message text to encrypt
@return encrypted message.
@throws CryptoFailedException When something crypto related fails
@throws UndecidedOmemoIdentityException When there are undecided devices.
@throws InterruptedE... | [
"OMEMO",
"encrypt",
"a",
"cleartext",
"message",
"for",
"multiple",
"recipients",
"."
] | 870756997faec1e1bfabfac0cd6c2395b04da873 | https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-omemo/src/main/java/org/jivesoftware/smackx/omemo/OmemoManager.java#L331-L343 |
26,610 | igniterealtime/Smack | smack-omemo/src/main/java/org/jivesoftware/smackx/omemo/OmemoManager.java | OmemoManager.encrypt | public OmemoMessage.Sent encrypt(MultiUserChat muc, String message)
throws UndecidedOmemoIdentityException, CryptoFailedException,
XMPPException.XMPPErrorException, SmackException.NotConnectedException, InterruptedException,
SmackException.NoResponseException, NoOmemoSupportException... | java | public OmemoMessage.Sent encrypt(MultiUserChat muc, String message)
throws UndecidedOmemoIdentityException, CryptoFailedException,
XMPPException.XMPPErrorException, SmackException.NotConnectedException, InterruptedException,
SmackException.NoResponseException, NoOmemoSupportException... | [
"public",
"OmemoMessage",
".",
"Sent",
"encrypt",
"(",
"MultiUserChat",
"muc",
",",
"String",
"message",
")",
"throws",
"UndecidedOmemoIdentityException",
",",
"CryptoFailedException",
",",
"XMPPException",
".",
"XMPPErrorException",
",",
"SmackException",
".",
"NotConn... | Encrypt a message for all recipients in the MultiUserChat.
@param muc multiUserChat
@param message message to send
@return encrypted message
@throws UndecidedOmemoIdentityException when there are undecided devices.
@throws CryptoFailedException
@throws XMPPException.XMPPErrorException
@throws SmackException.NotConnect... | [
"Encrypt",
"a",
"message",
"for",
"all",
"recipients",
"in",
"the",
"MultiUserChat",
"."
] | 870756997faec1e1bfabfac0cd6c2395b04da873 | https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-omemo/src/main/java/org/jivesoftware/smackx/omemo/OmemoManager.java#L360-L377 |
26,611 | igniterealtime/Smack | smack-omemo/src/main/java/org/jivesoftware/smackx/omemo/OmemoManager.java | OmemoManager.decryptMamQueryResult | public List<MessageOrOmemoMessage> decryptMamQueryResult(MamManager.MamQuery mamQuery)
throws SmackException.NotLoggedInException {
return new ArrayList<>(getOmemoService().decryptMamQueryResult(new LoggedInOmemoManager(this), mamQuery));
} | java | public List<MessageOrOmemoMessage> decryptMamQueryResult(MamManager.MamQuery mamQuery)
throws SmackException.NotLoggedInException {
return new ArrayList<>(getOmemoService().decryptMamQueryResult(new LoggedInOmemoManager(this), mamQuery));
} | [
"public",
"List",
"<",
"MessageOrOmemoMessage",
">",
"decryptMamQueryResult",
"(",
"MamManager",
".",
"MamQuery",
"mamQuery",
")",
"throws",
"SmackException",
".",
"NotLoggedInException",
"{",
"return",
"new",
"ArrayList",
"<>",
"(",
"getOmemoService",
"(",
")",
"."... | Decrypt messages from a MAM query.
@param mamQuery The MAM query
@return list of decrypted OmemoMessages
@throws SmackException.NotLoggedInException if the Manager is not authenticated. | [
"Decrypt",
"messages",
"from",
"a",
"MAM",
"query",
"."
] | 870756997faec1e1bfabfac0cd6c2395b04da873 | https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-omemo/src/main/java/org/jivesoftware/smackx/omemo/OmemoManager.java#L407-L410 |
26,612 | igniterealtime/Smack | smack-omemo/src/main/java/org/jivesoftware/smackx/omemo/OmemoManager.java | OmemoManager.trustOmemoIdentity | public void trustOmemoIdentity(OmemoDevice device, OmemoFingerprint fingerprint) {
if (trustCallback == null) {
throw new IllegalStateException("No TrustCallback set.");
}
trustCallback.setTrust(device, fingerprint, TrustState.trusted);
} | java | public void trustOmemoIdentity(OmemoDevice device, OmemoFingerprint fingerprint) {
if (trustCallback == null) {
throw new IllegalStateException("No TrustCallback set.");
}
trustCallback.setTrust(device, fingerprint, TrustState.trusted);
} | [
"public",
"void",
"trustOmemoIdentity",
"(",
"OmemoDevice",
"device",
",",
"OmemoFingerprint",
"fingerprint",
")",
"{",
"if",
"(",
"trustCallback",
"==",
"null",
")",
"{",
"throw",
"new",
"IllegalStateException",
"(",
"\"No TrustCallback set.\"",
")",
";",
"}",
"t... | Trust that a fingerprint belongs to an OmemoDevice.
The fingerprint must be the lowercase, hexadecimal fingerprint of the identityKey of the device and must
be of length 64.
@param device device
@param fingerprint fingerprint | [
"Trust",
"that",
"a",
"fingerprint",
"belongs",
"to",
"an",
"OmemoDevice",
".",
"The",
"fingerprint",
"must",
"be",
"the",
"lowercase",
"hexadecimal",
"fingerprint",
"of",
"the",
"identityKey",
"of",
"the",
"device",
"and",
"must",
"be",
"of",
"length",
"64",
... | 870756997faec1e1bfabfac0cd6c2395b04da873 | https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-omemo/src/main/java/org/jivesoftware/smackx/omemo/OmemoManager.java#L420-L426 |
26,613 | igniterealtime/Smack | smack-omemo/src/main/java/org/jivesoftware/smackx/omemo/OmemoManager.java | OmemoManager.sendRatchetUpdateMessage | public void sendRatchetUpdateMessage(OmemoDevice recipient)
throws SmackException.NotLoggedInException, CorruptedOmemoKeyException, InterruptedException,
SmackException.NoResponseException, NoSuchAlgorithmException, SmackException.NotConnectedException,
CryptoFailedException, CannotE... | java | public void sendRatchetUpdateMessage(OmemoDevice recipient)
throws SmackException.NotLoggedInException, CorruptedOmemoKeyException, InterruptedException,
SmackException.NoResponseException, NoSuchAlgorithmException, SmackException.NotConnectedException,
CryptoFailedException, CannotE... | [
"public",
"void",
"sendRatchetUpdateMessage",
"(",
"OmemoDevice",
"recipient",
")",
"throws",
"SmackException",
".",
"NotLoggedInException",
",",
"CorruptedOmemoKeyException",
",",
"InterruptedException",
",",
"SmackException",
".",
"NoResponseException",
",",
"NoSuchAlgorith... | Send a ratchet update message. This can be used to advance the ratchet of a session in order to maintain forward
secrecy.
@param recipient recipient
@throws CorruptedOmemoKeyException When the used identityKeys are corrupted
@throws CryptoFailedException When something fails with the crypto
@t... | [
"Send",
"a",
"ratchet",
"update",
"message",
".",
"This",
"can",
"be",
"used",
"to",
"advance",
"the",
"ratchet",
"of",
"a",
"session",
"in",
"order",
"to",
"maintain",
"forward",
"secrecy",
"."
] | 870756997faec1e1bfabfac0cd6c2395b04da873 | https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-omemo/src/main/java/org/jivesoftware/smackx/omemo/OmemoManager.java#L489-L506 |
26,614 | igniterealtime/Smack | smack-omemo/src/main/java/org/jivesoftware/smackx/omemo/OmemoManager.java | OmemoManager.contactSupportsOmemo | public boolean contactSupportsOmemo(BareJid contact)
throws InterruptedException, PubSubException.NotALeafNodeException, XMPPException.XMPPErrorException,
SmackException.NotConnectedException, SmackException.NoResponseException {
synchronized (LOCK) {
OmemoCachedDeviceList de... | java | public boolean contactSupportsOmemo(BareJid contact)
throws InterruptedException, PubSubException.NotALeafNodeException, XMPPException.XMPPErrorException,
SmackException.NotConnectedException, SmackException.NoResponseException {
synchronized (LOCK) {
OmemoCachedDeviceList de... | [
"public",
"boolean",
"contactSupportsOmemo",
"(",
"BareJid",
"contact",
")",
"throws",
"InterruptedException",
",",
"PubSubException",
".",
"NotALeafNodeException",
",",
"XMPPException",
".",
"XMPPErrorException",
",",
"SmackException",
".",
"NotConnectedException",
",",
... | Returns true, if the contact has any active devices published in a deviceList.
@param contact contact
@return true if contact has at least one OMEMO capable device.
@throws SmackException.NotConnectedException
@throws InterruptedException
@throws SmackException.NoResponseException
@throws PubSubException.NotALeafNodeE... | [
"Returns",
"true",
"if",
"the",
"contact",
"has",
"any",
"active",
"devices",
"published",
"in",
"a",
"deviceList",
"."
] | 870756997faec1e1bfabfac0cd6c2395b04da873 | https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-omemo/src/main/java/org/jivesoftware/smackx/omemo/OmemoManager.java#L519-L526 |
26,615 | igniterealtime/Smack | smack-omemo/src/main/java/org/jivesoftware/smackx/omemo/OmemoManager.java | OmemoManager.serverSupportsOmemo | public static boolean serverSupportsOmemo(XMPPConnection connection, DomainBareJid server)
throws XMPPException.XMPPErrorException, SmackException.NotConnectedException, InterruptedException,
SmackException.NoResponseException {
return ServiceDiscoveryManager.getInstanceFor(connection)
... | java | public static boolean serverSupportsOmemo(XMPPConnection connection, DomainBareJid server)
throws XMPPException.XMPPErrorException, SmackException.NotConnectedException, InterruptedException,
SmackException.NoResponseException {
return ServiceDiscoveryManager.getInstanceFor(connection)
... | [
"public",
"static",
"boolean",
"serverSupportsOmemo",
"(",
"XMPPConnection",
"connection",
",",
"DomainBareJid",
"server",
")",
"throws",
"XMPPException",
".",
"XMPPErrorException",
",",
"SmackException",
".",
"NotConnectedException",
",",
"InterruptedException",
",",
"Sm... | Returns true, if the Server supports PEP.
@param connection XMPPConnection
@param server domainBareJid of the server to test
@return true if server supports pep
@throws XMPPException.XMPPErrorException
@throws SmackException.NotConnectedException
@throws InterruptedException
@throws SmackException.NoResponseException | [
"Returns",
"true",
"if",
"the",
"Server",
"supports",
"PEP",
"."
] | 870756997faec1e1bfabfac0cd6c2395b04da873 | https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-omemo/src/main/java/org/jivesoftware/smackx/omemo/OmemoManager.java#L558-L563 |
26,616 | igniterealtime/Smack | smack-omemo/src/main/java/org/jivesoftware/smackx/omemo/OmemoManager.java | OmemoManager.getOwnFingerprint | public OmemoFingerprint getOwnFingerprint()
throws SmackException.NotLoggedInException, CorruptedOmemoKeyException {
synchronized (LOCK) {
if (getOwnJid() == null) {
throw new SmackException.NotLoggedInException();
}
return getOmemoService().getOm... | java | public OmemoFingerprint getOwnFingerprint()
throws SmackException.NotLoggedInException, CorruptedOmemoKeyException {
synchronized (LOCK) {
if (getOwnJid() == null) {
throw new SmackException.NotLoggedInException();
}
return getOmemoService().getOm... | [
"public",
"OmemoFingerprint",
"getOwnFingerprint",
"(",
")",
"throws",
"SmackException",
".",
"NotLoggedInException",
",",
"CorruptedOmemoKeyException",
"{",
"synchronized",
"(",
"LOCK",
")",
"{",
"if",
"(",
"getOwnJid",
"(",
")",
"==",
"null",
")",
"{",
"throw",
... | Return the fingerprint of our identity key.
@return fingerprint
@throws SmackException.NotLoggedInException if we don't know our bareJid yet.
@throws CorruptedOmemoKeyException if our identityKey is corrupted. | [
"Return",
"the",
"fingerprint",
"of",
"our",
"identity",
"key",
"."
] | 870756997faec1e1bfabfac0cd6c2395b04da873 | https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-omemo/src/main/java/org/jivesoftware/smackx/omemo/OmemoManager.java#L572-L581 |
26,617 | igniterealtime/Smack | smack-omemo/src/main/java/org/jivesoftware/smackx/omemo/OmemoManager.java | OmemoManager.getFingerprint | public OmemoFingerprint getFingerprint(OmemoDevice device)
throws CannotEstablishOmemoSessionException, SmackException.NotLoggedInException,
CorruptedOmemoKeyException, SmackException.NotConnectedException, InterruptedException,
SmackException.NoResponseException {
synchroniz... | java | public OmemoFingerprint getFingerprint(OmemoDevice device)
throws CannotEstablishOmemoSessionException, SmackException.NotLoggedInException,
CorruptedOmemoKeyException, SmackException.NotConnectedException, InterruptedException,
SmackException.NoResponseException {
synchroniz... | [
"public",
"OmemoFingerprint",
"getFingerprint",
"(",
"OmemoDevice",
"device",
")",
"throws",
"CannotEstablishOmemoSessionException",
",",
"SmackException",
".",
"NotLoggedInException",
",",
"CorruptedOmemoKeyException",
",",
"SmackException",
".",
"NotConnectedException",
",",
... | Get the fingerprint of a contacts device.
@param device contacts OmemoDevice
@return fingerprint
@throws CannotEstablishOmemoSessionException if we have no session yet, and are unable to create one.
@throws SmackException.NotLoggedInException
@throws CorruptedOmemoKeyException if the copy of the fingerprint we have is ... | [
"Get",
"the",
"fingerprint",
"of",
"a",
"contacts",
"device",
"."
] | 870756997faec1e1bfabfac0cd6c2395b04da873 | https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-omemo/src/main/java/org/jivesoftware/smackx/omemo/OmemoManager.java#L594-L609 |
26,618 | igniterealtime/Smack | smack-omemo/src/main/java/org/jivesoftware/smackx/omemo/OmemoManager.java | OmemoManager.requestDeviceListUpdateFor | public void requestDeviceListUpdateFor(BareJid contact)
throws InterruptedException, PubSubException.NotALeafNodeException, XMPPException.XMPPErrorException,
SmackException.NotConnectedException, SmackException.NoResponseException {
synchronized (LOCK) {
getOmemoService().ref... | java | public void requestDeviceListUpdateFor(BareJid contact)
throws InterruptedException, PubSubException.NotALeafNodeException, XMPPException.XMPPErrorException,
SmackException.NotConnectedException, SmackException.NoResponseException {
synchronized (LOCK) {
getOmemoService().ref... | [
"public",
"void",
"requestDeviceListUpdateFor",
"(",
"BareJid",
"contact",
")",
"throws",
"InterruptedException",
",",
"PubSubException",
".",
"NotALeafNodeException",
",",
"XMPPException",
".",
"XMPPErrorException",
",",
"SmackException",
".",
"NotConnectedException",
",",... | Request a deviceList update from contact contact.
@param contact contact we want to obtain the deviceList from.
@throws InterruptedException
@throws PubSubException.NotALeafNodeException
@throws XMPPException.XMPPErrorException
@throws SmackException.NotConnectedException
@throws SmackException.NoResponseException | [
"Request",
"a",
"deviceList",
"update",
"from",
"contact",
"contact",
"."
] | 870756997faec1e1bfabfac0cd6c2395b04da873 | https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-omemo/src/main/java/org/jivesoftware/smackx/omemo/OmemoManager.java#L695-L701 |
26,619 | igniterealtime/Smack | smack-omemo/src/main/java/org/jivesoftware/smackx/omemo/OmemoManager.java | OmemoManager.purgeDeviceList | public void purgeDeviceList()
throws SmackException.NotLoggedInException, InterruptedException, XMPPException.XMPPErrorException,
SmackException.NotConnectedException, SmackException.NoResponseException {
synchronized (LOCK) {
getOmemoService().purgeDeviceList(new LoggedInOme... | java | public void purgeDeviceList()
throws SmackException.NotLoggedInException, InterruptedException, XMPPException.XMPPErrorException,
SmackException.NotConnectedException, SmackException.NoResponseException {
synchronized (LOCK) {
getOmemoService().purgeDeviceList(new LoggedInOme... | [
"public",
"void",
"purgeDeviceList",
"(",
")",
"throws",
"SmackException",
".",
"NotLoggedInException",
",",
"InterruptedException",
",",
"XMPPException",
".",
"XMPPErrorException",
",",
"SmackException",
".",
"NotConnectedException",
",",
"SmackException",
".",
"NoRespon... | Publish a new device list with just our own deviceId in it.
@throws SmackException.NotLoggedInException
@throws InterruptedException
@throws XMPPException.XMPPErrorException
@throws SmackException.NotConnectedException
@throws SmackException.NoResponseException | [
"Publish",
"a",
"new",
"device",
"list",
"with",
"just",
"our",
"own",
"deviceId",
"in",
"it",
"."
] | 870756997faec1e1bfabfac0cd6c2395b04da873 | https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-omemo/src/main/java/org/jivesoftware/smackx/omemo/OmemoManager.java#L712-L718 |
26,620 | igniterealtime/Smack | smack-omemo/src/main/java/org/jivesoftware/smackx/omemo/OmemoManager.java | OmemoManager.getOwnJid | public BareJid getOwnJid() {
if (ownJid == null && connection().isAuthenticated()) {
ownJid = connection().getUser().asBareJid();
}
return ownJid;
} | java | public BareJid getOwnJid() {
if (ownJid == null && connection().isAuthenticated()) {
ownJid = connection().getUser().asBareJid();
}
return ownJid;
} | [
"public",
"BareJid",
"getOwnJid",
"(",
")",
"{",
"if",
"(",
"ownJid",
"==",
"null",
"&&",
"connection",
"(",
")",
".",
"isAuthenticated",
"(",
")",
")",
"{",
"ownJid",
"=",
"connection",
"(",
")",
".",
"getUser",
"(",
")",
".",
"asBareJid",
"(",
")",... | Return the BareJid of the user.
@return bareJid | [
"Return",
"the",
"BareJid",
"of",
"the",
"user",
"."
] | 870756997faec1e1bfabfac0cd6c2395b04da873 | https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-omemo/src/main/java/org/jivesoftware/smackx/omemo/OmemoManager.java#L780-L786 |
26,621 | igniterealtime/Smack | smack-omemo/src/main/java/org/jivesoftware/smackx/omemo/OmemoManager.java | OmemoManager.getOwnDevice | public OmemoDevice getOwnDevice() {
synchronized (LOCK) {
BareJid jid = getOwnJid();
if (jid == null) {
return null;
}
return new OmemoDevice(jid, getDeviceId());
}
} | java | public OmemoDevice getOwnDevice() {
synchronized (LOCK) {
BareJid jid = getOwnJid();
if (jid == null) {
return null;
}
return new OmemoDevice(jid, getDeviceId());
}
} | [
"public",
"OmemoDevice",
"getOwnDevice",
"(",
")",
"{",
"synchronized",
"(",
"LOCK",
")",
"{",
"BareJid",
"jid",
"=",
"getOwnJid",
"(",
")",
";",
"if",
"(",
"jid",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"return",
"new",
"OmemoDevice",
"(",... | Return the OmemoDevice of the user.
@return omemoDevice | [
"Return",
"the",
"OmemoDevice",
"of",
"the",
"user",
"."
] | 870756997faec1e1bfabfac0cd6c2395b04da873 | https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-omemo/src/main/java/org/jivesoftware/smackx/omemo/OmemoManager.java#L804-L812 |
26,622 | igniterealtime/Smack | smack-omemo/src/main/java/org/jivesoftware/smackx/omemo/OmemoManager.java | OmemoManager.setDeviceId | void setDeviceId(int nDeviceId) {
synchronized (LOCK) {
// Move this instance inside the HashMaps
INSTANCES.get(connection()).remove(getDeviceId());
INSTANCES.get(connection()).put(nDeviceId, this);
this.deviceId = nDeviceId;
}
} | java | void setDeviceId(int nDeviceId) {
synchronized (LOCK) {
// Move this instance inside the HashMaps
INSTANCES.get(connection()).remove(getDeviceId());
INSTANCES.get(connection()).put(nDeviceId, this);
this.deviceId = nDeviceId;
}
} | [
"void",
"setDeviceId",
"(",
"int",
"nDeviceId",
")",
"{",
"synchronized",
"(",
"LOCK",
")",
"{",
"// Move this instance inside the HashMaps",
"INSTANCES",
".",
"get",
"(",
"connection",
"(",
")",
")",
".",
"remove",
"(",
"getDeviceId",
"(",
")",
")",
";",
"I... | Set the deviceId of the manager to nDeviceId.
@param nDeviceId new deviceId | [
"Set",
"the",
"deviceId",
"of",
"the",
"manager",
"to",
"nDeviceId",
"."
] | 870756997faec1e1bfabfac0cd6c2395b04da873 | https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-omemo/src/main/java/org/jivesoftware/smackx/omemo/OmemoManager.java#L818-L826 |
26,623 | igniterealtime/Smack | smack-omemo/src/main/java/org/jivesoftware/smackx/omemo/OmemoManager.java | OmemoManager.notifyOmemoMessageReceived | void notifyOmemoMessageReceived(Stanza stanza, OmemoMessage.Received decryptedMessage) {
for (OmemoMessageListener l : omemoMessageListeners) {
l.onOmemoMessageReceived(stanza, decryptedMessage);
}
} | java | void notifyOmemoMessageReceived(Stanza stanza, OmemoMessage.Received decryptedMessage) {
for (OmemoMessageListener l : omemoMessageListeners) {
l.onOmemoMessageReceived(stanza, decryptedMessage);
}
} | [
"void",
"notifyOmemoMessageReceived",
"(",
"Stanza",
"stanza",
",",
"OmemoMessage",
".",
"Received",
"decryptedMessage",
")",
"{",
"for",
"(",
"OmemoMessageListener",
"l",
":",
"omemoMessageListeners",
")",
"{",
"l",
".",
"onOmemoMessageReceived",
"(",
"stanza",
","... | Notify all registered OmemoMessageListeners about a received OmemoMessage.
@param stanza original stanza
@param decryptedMessage decrypted OmemoMessage. | [
"Notify",
"all",
"registered",
"OmemoMessageListeners",
"about",
"a",
"received",
"OmemoMessage",
"."
] | 870756997faec1e1bfabfac0cd6c2395b04da873 | https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-omemo/src/main/java/org/jivesoftware/smackx/omemo/OmemoManager.java#L834-L838 |
26,624 | igniterealtime/Smack | smack-omemo/src/main/java/org/jivesoftware/smackx/omemo/OmemoManager.java | OmemoManager.notifyOmemoMucMessageReceived | void notifyOmemoMucMessageReceived(MultiUserChat muc,
Stanza stanza,
OmemoMessage.Received decryptedMessage) {
for (OmemoMucMessageListener l : omemoMucMessageListeners) {
l.onOmemoMucMessageReceived(muc, stanza, decrypted... | java | void notifyOmemoMucMessageReceived(MultiUserChat muc,
Stanza stanza,
OmemoMessage.Received decryptedMessage) {
for (OmemoMucMessageListener l : omemoMucMessageListeners) {
l.onOmemoMucMessageReceived(muc, stanza, decrypted... | [
"void",
"notifyOmemoMucMessageReceived",
"(",
"MultiUserChat",
"muc",
",",
"Stanza",
"stanza",
",",
"OmemoMessage",
".",
"Received",
"decryptedMessage",
")",
"{",
"for",
"(",
"OmemoMucMessageListener",
"l",
":",
"omemoMucMessageListeners",
")",
"{",
"l",
".",
"onOme... | Notify all registered OmemoMucMessageListeners of an incoming OmemoMessageElement in a MUC.
@param muc MultiUserChat the message was received in.
@param stanza Original Stanza.
@param decryptedMessage Decrypted OmemoMessage. | [
"Notify",
"all",
"registered",
"OmemoMucMessageListeners",
"of",
"an",
"incoming",
"OmemoMessageElement",
"in",
"a",
"MUC",
"."
] | 870756997faec1e1bfabfac0cd6c2395b04da873 | https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-omemo/src/main/java/org/jivesoftware/smackx/omemo/OmemoManager.java#L847-L853 |
26,625 | igniterealtime/Smack | smack-omemo/src/main/java/org/jivesoftware/smackx/omemo/OmemoManager.java | OmemoManager.stopStanzaAndPEPListeners | public void stopStanzaAndPEPListeners() {
PepManager.getInstanceFor(connection()).removePepListener(deviceListUpdateListener);
connection().removeAsyncStanzaListener(internalOmemoMessageStanzaListener);
CarbonManager.getInstanceFor(connection()).removeCarbonCopyReceivedListener(internalOmemoCarb... | java | public void stopStanzaAndPEPListeners() {
PepManager.getInstanceFor(connection()).removePepListener(deviceListUpdateListener);
connection().removeAsyncStanzaListener(internalOmemoMessageStanzaListener);
CarbonManager.getInstanceFor(connection()).removeCarbonCopyReceivedListener(internalOmemoCarb... | [
"public",
"void",
"stopStanzaAndPEPListeners",
"(",
")",
"{",
"PepManager",
".",
"getInstanceFor",
"(",
"connection",
"(",
")",
")",
".",
"removePepListener",
"(",
"deviceListUpdateListener",
")",
";",
"connection",
"(",
")",
".",
"removeAsyncStanzaListener",
"(",
... | Remove active stanza listeners needed for OMEMO. | [
"Remove",
"active",
"stanza",
"listeners",
"needed",
"for",
"OMEMO",
"."
] | 870756997faec1e1bfabfac0cd6c2395b04da873 | https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-omemo/src/main/java/org/jivesoftware/smackx/omemo/OmemoManager.java#L897-L901 |
26,626 | igniterealtime/Smack | smack-omemo/src/main/java/org/jivesoftware/smackx/omemo/OmemoManager.java | OmemoManager.rebuildSessionWith | public void rebuildSessionWith(OmemoDevice contactsDevice)
throws InterruptedException, SmackException.NoResponseException, CorruptedOmemoKeyException,
SmackException.NotConnectedException, CannotEstablishOmemoSessionException,
SmackException.NotLoggedInException {
if (!conne... | java | public void rebuildSessionWith(OmemoDevice contactsDevice)
throws InterruptedException, SmackException.NoResponseException, CorruptedOmemoKeyException,
SmackException.NotConnectedException, CannotEstablishOmemoSessionException,
SmackException.NotLoggedInException {
if (!conne... | [
"public",
"void",
"rebuildSessionWith",
"(",
"OmemoDevice",
"contactsDevice",
")",
"throws",
"InterruptedException",
",",
"SmackException",
".",
"NoResponseException",
",",
"CorruptedOmemoKeyException",
",",
"SmackException",
".",
"NotConnectedException",
",",
"CannotEstablis... | Build a fresh session with a contacts device.
This might come in handy if a session is broken.
@param contactsDevice OmemoDevice of a contact.
@throws InterruptedException
@throws SmackException.NoResponseException
@throws CorruptedOmemoKeyException if our or their identityKey is corrupted.
@throws SmackException.Not... | [
"Build",
"a",
"fresh",
"session",
"with",
"a",
"contacts",
"device",
".",
"This",
"might",
"come",
"in",
"handy",
"if",
"a",
"session",
"is",
"broken",
"."
] | 870756997faec1e1bfabfac0cd6c2395b04da873 | https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-omemo/src/main/java/org/jivesoftware/smackx/omemo/OmemoManager.java#L916-L924 |
26,627 | igniterealtime/Smack | smack-omemo/src/main/java/org/jivesoftware/smackx/omemo/OmemoManager.java | OmemoManager.initBareJidAndDeviceId | private static void initBareJidAndDeviceId(OmemoManager manager) {
if (!manager.getConnection().isAuthenticated()) {
throw new IllegalStateException("Connection MUST be authenticated.");
}
if (manager.ownJid == null) {
manager.ownJid = manager.getConnection().getUser().a... | java | private static void initBareJidAndDeviceId(OmemoManager manager) {
if (!manager.getConnection().isAuthenticated()) {
throw new IllegalStateException("Connection MUST be authenticated.");
}
if (manager.ownJid == null) {
manager.ownJid = manager.getConnection().getUser().a... | [
"private",
"static",
"void",
"initBareJidAndDeviceId",
"(",
"OmemoManager",
"manager",
")",
"{",
"if",
"(",
"!",
"manager",
".",
"getConnection",
"(",
")",
".",
"isAuthenticated",
"(",
")",
")",
"{",
"throw",
"new",
"IllegalStateException",
"(",
"\"Connection MU... | Get the bareJid of the user from the authenticated XMPP connection.
If our deviceId is unknown, use the bareJid to look up deviceIds available in the omemoStore.
If there are ids available, choose the smallest one. Otherwise generate a random deviceId.
@param manager OmemoManager | [
"Get",
"the",
"bareJid",
"of",
"the",
"user",
"from",
"the",
"authenticated",
"XMPP",
"connection",
".",
"If",
"our",
"deviceId",
"is",
"unknown",
"use",
"the",
"bareJid",
"to",
"look",
"up",
"deviceIds",
"available",
"in",
"the",
"omemoStore",
".",
"If",
... | 870756997faec1e1bfabfac0cd6c2395b04da873 | https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-omemo/src/main/java/org/jivesoftware/smackx/omemo/OmemoManager.java#L1108-L1125 |
26,628 | igniterealtime/Smack | smack-debug/src/main/java/org/jivesoftware/smackx/debugger/EnhancedDebuggerWindow.java | EnhancedDebuggerWindow.showNewDebugger | private void showNewDebugger(EnhancedDebugger debugger) {
if (frame == null) {
createDebug();
}
debugger.tabbedPane.setName("XMPPConnection_" + tabbedPane.getComponentCount());
tabbedPane.add(debugger.tabbedPane, tabbedPane.getComponentCount() - 1);
tabbedPane.setIcon... | java | private void showNewDebugger(EnhancedDebugger debugger) {
if (frame == null) {
createDebug();
}
debugger.tabbedPane.setName("XMPPConnection_" + tabbedPane.getComponentCount());
tabbedPane.add(debugger.tabbedPane, tabbedPane.getComponentCount() - 1);
tabbedPane.setIcon... | [
"private",
"void",
"showNewDebugger",
"(",
"EnhancedDebugger",
"debugger",
")",
"{",
"if",
"(",
"frame",
"==",
"null",
")",
"{",
"createDebug",
"(",
")",
";",
"}",
"debugger",
".",
"tabbedPane",
".",
"setName",
"(",
"\"XMPPConnection_\"",
"+",
"tabbedPane",
... | Shows the new debugger in the debug window.
@param debugger the new debugger to show | [
"Shows",
"the",
"new",
"debugger",
"in",
"the",
"debug",
"window",
"."
] | 870756997faec1e1bfabfac0cd6c2395b04da873 | https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-debug/src/main/java/org/jivesoftware/smackx/debugger/EnhancedDebuggerWindow.java#L139-L150 |
26,629 | igniterealtime/Smack | smack-debug/src/main/java/org/jivesoftware/smackx/debugger/EnhancedDebuggerWindow.java | EnhancedDebuggerWindow.userHasLogged | static synchronized void userHasLogged(EnhancedDebugger debugger, String user) {
int index = getInstance().tabbedPane.indexOfComponent(debugger.tabbedPane);
getInstance().tabbedPane.setTitleAt(
index,
user);
getInstance().tabbedPane.setIconAt(
inde... | java | static synchronized void userHasLogged(EnhancedDebugger debugger, String user) {
int index = getInstance().tabbedPane.indexOfComponent(debugger.tabbedPane);
getInstance().tabbedPane.setTitleAt(
index,
user);
getInstance().tabbedPane.setIconAt(
inde... | [
"static",
"synchronized",
"void",
"userHasLogged",
"(",
"EnhancedDebugger",
"debugger",
",",
"String",
"user",
")",
"{",
"int",
"index",
"=",
"getInstance",
"(",
")",
".",
"tabbedPane",
".",
"indexOfComponent",
"(",
"debugger",
".",
"tabbedPane",
")",
";",
"ge... | Notification that a user has logged in to the server. A new title will be set
to the tab of the given debugger.
@param debugger the debugger whose connection logged in to the server
@param user the user@host/resource that has just logged in | [
"Notification",
"that",
"a",
"user",
"has",
"logged",
"in",
"to",
"the",
"server",
".",
"A",
"new",
"title",
"will",
"be",
"set",
"to",
"the",
"tab",
"of",
"the",
"given",
"debugger",
"."
] | 870756997faec1e1bfabfac0cd6c2395b04da873 | https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-debug/src/main/java/org/jivesoftware/smackx/debugger/EnhancedDebuggerWindow.java#L159-L167 |
26,630 | igniterealtime/Smack | smack-debug/src/main/java/org/jivesoftware/smackx/debugger/EnhancedDebuggerWindow.java | EnhancedDebuggerWindow.connectionClosed | static synchronized void connectionClosed(EnhancedDebugger debugger) {
getInstance().tabbedPane.setIconAt(
getInstance().tabbedPane.indexOfComponent(debugger.tabbedPane),
connectionClosedIcon);
} | java | static synchronized void connectionClosed(EnhancedDebugger debugger) {
getInstance().tabbedPane.setIconAt(
getInstance().tabbedPane.indexOfComponent(debugger.tabbedPane),
connectionClosedIcon);
} | [
"static",
"synchronized",
"void",
"connectionClosed",
"(",
"EnhancedDebugger",
"debugger",
")",
"{",
"getInstance",
"(",
")",
".",
"tabbedPane",
".",
"setIconAt",
"(",
"getInstance",
"(",
")",
".",
"tabbedPane",
".",
"indexOfComponent",
"(",
"debugger",
".",
"ta... | Notification that the connection was properly closed.
@param debugger the debugger whose connection was properly closed. | [
"Notification",
"that",
"the",
"connection",
"was",
"properly",
"closed",
"."
] | 870756997faec1e1bfabfac0cd6c2395b04da873 | https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-debug/src/main/java/org/jivesoftware/smackx/debugger/EnhancedDebuggerWindow.java#L174-L178 |
26,631 | igniterealtime/Smack | smack-debug/src/main/java/org/jivesoftware/smackx/debugger/EnhancedDebuggerWindow.java | EnhancedDebuggerWindow.connectionClosedOnError | static synchronized void connectionClosedOnError(EnhancedDebugger debugger, Exception e) {
int index = getInstance().tabbedPane.indexOfComponent(debugger.tabbedPane);
getInstance().tabbedPane.setToolTipTextAt(
index,
"XMPPConnection closed due to the exception: " + e.getM... | java | static synchronized void connectionClosedOnError(EnhancedDebugger debugger, Exception e) {
int index = getInstance().tabbedPane.indexOfComponent(debugger.tabbedPane);
getInstance().tabbedPane.setToolTipTextAt(
index,
"XMPPConnection closed due to the exception: " + e.getM... | [
"static",
"synchronized",
"void",
"connectionClosedOnError",
"(",
"EnhancedDebugger",
"debugger",
",",
"Exception",
"e",
")",
"{",
"int",
"index",
"=",
"getInstance",
"(",
")",
".",
"tabbedPane",
".",
"indexOfComponent",
"(",
"debugger",
".",
"tabbedPane",
")",
... | Notification that the connection was closed due to an exception.
@param debugger the debugger whose connection was closed due to an exception.
@param e the exception. | [
"Notification",
"that",
"the",
"connection",
"was",
"closed",
"due",
"to",
"an",
"exception",
"."
] | 870756997faec1e1bfabfac0cd6c2395b04da873 | https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-debug/src/main/java/org/jivesoftware/smackx/debugger/EnhancedDebuggerWindow.java#L186-L194 |
26,632 | igniterealtime/Smack | smack-debug/src/main/java/org/jivesoftware/smackx/debugger/EnhancedDebuggerWindow.java | EnhancedDebuggerWindow.rootWindowClosing | private synchronized void rootWindowClosing(WindowEvent evt) {
// Notify to all the debuggers to stop debugging
for (EnhancedDebugger debugger : debuggers) {
debugger.cancel();
}
// Release any reference to the debuggers
debuggers.clear();
// Release the defau... | java | private synchronized void rootWindowClosing(WindowEvent evt) {
// Notify to all the debuggers to stop debugging
for (EnhancedDebugger debugger : debuggers) {
debugger.cancel();
}
// Release any reference to the debuggers
debuggers.clear();
// Release the defau... | [
"private",
"synchronized",
"void",
"rootWindowClosing",
"(",
"WindowEvent",
"evt",
")",
"{",
"// Notify to all the debuggers to stop debugging",
"for",
"(",
"EnhancedDebugger",
"debugger",
":",
"debuggers",
")",
"{",
"debugger",
".",
"cancel",
"(",
")",
";",
"}",
"/... | Notification that the root window is closing. Stop listening for received and
transmitted packets in all the debugged connections.
@param evt the event that indicates that the root window is closing | [
"Notification",
"that",
"the",
"root",
"window",
"is",
"closing",
".",
"Stop",
"listening",
"for",
"received",
"and",
"transmitted",
"packets",
"in",
"all",
"the",
"debugged",
"connections",
"."
] | 870756997faec1e1bfabfac0cd6c2395b04da873 | https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-debug/src/main/java/org/jivesoftware/smackx/debugger/EnhancedDebuggerWindow.java#L349-L360 |
26,633 | igniterealtime/Smack | smack-extensions/src/main/java/org/jivesoftware/smackx/muc/MucConfigFormManager.java | MucConfigFormManager.setRoomOwners | public MucConfigFormManager setRoomOwners(Collection<? extends Jid> newOwners) throws MucConfigurationNotSupportedException {
if (!supportsRoomOwners()) {
throw new MucConfigurationNotSupportedException(MUC_ROOMCONFIG_ROOMOWNERS);
}
owners.clear();
owners.addAll(newOwners);
... | java | public MucConfigFormManager setRoomOwners(Collection<? extends Jid> newOwners) throws MucConfigurationNotSupportedException {
if (!supportsRoomOwners()) {
throw new MucConfigurationNotSupportedException(MUC_ROOMCONFIG_ROOMOWNERS);
}
owners.clear();
owners.addAll(newOwners);
... | [
"public",
"MucConfigFormManager",
"setRoomOwners",
"(",
"Collection",
"<",
"?",
"extends",
"Jid",
">",
"newOwners",
")",
"throws",
"MucConfigurationNotSupportedException",
"{",
"if",
"(",
"!",
"supportsRoomOwners",
"(",
")",
")",
"{",
"throw",
"new",
"MucConfigurati... | Set the owners of the room.
@param newOwners a collection of JIDs to become the new owners of the room.
@return a reference to this object.
@throws MucConfigurationNotSupportedException if the MUC service does not support this option.
@see #MUC_ROOMCONFIG_ROOMOWNERS | [
"Set",
"the",
"owners",
"of",
"the",
"room",
"."
] | 870756997faec1e1bfabfac0cd6c2395b04da873 | https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-extensions/src/main/java/org/jivesoftware/smackx/muc/MucConfigFormManager.java#L137-L144 |
26,634 | igniterealtime/Smack | smack-extensions/src/main/java/org/jivesoftware/smackx/muc/MucConfigFormManager.java | MucConfigFormManager.setMembersOnly | public MucConfigFormManager setMembersOnly(boolean isMembersOnly) throws MucConfigurationNotSupportedException {
if (!supportsMembersOnly()) {
throw new MucConfigurationNotSupportedException(MUC_ROOMCONFIG_MEMBERSONLY);
}
answerForm.setAnswer(MUC_ROOMCONFIG_MEMBERSONLY, isMembersOnly... | java | public MucConfigFormManager setMembersOnly(boolean isMembersOnly) throws MucConfigurationNotSupportedException {
if (!supportsMembersOnly()) {
throw new MucConfigurationNotSupportedException(MUC_ROOMCONFIG_MEMBERSONLY);
}
answerForm.setAnswer(MUC_ROOMCONFIG_MEMBERSONLY, isMembersOnly... | [
"public",
"MucConfigFormManager",
"setMembersOnly",
"(",
"boolean",
"isMembersOnly",
")",
"throws",
"MucConfigurationNotSupportedException",
"{",
"if",
"(",
"!",
"supportsMembersOnly",
"(",
")",
")",
"{",
"throw",
"new",
"MucConfigurationNotSupportedException",
"(",
"MUC_... | Set if the room is members only. Rooms are not members only per default.
@param isMembersOnly if the room should be members only.
@return a reference to this object.
@throws MucConfigurationNotSupportedException | [
"Set",
"if",
"the",
"room",
"is",
"members",
"only",
".",
"Rooms",
"are",
"not",
"members",
"only",
"per",
"default",
"."
] | 870756997faec1e1bfabfac0cd6c2395b04da873 | https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-extensions/src/main/java/org/jivesoftware/smackx/muc/MucConfigFormManager.java#L172-L178 |
26,635 | igniterealtime/Smack | smack-extensions/src/main/java/org/jivesoftware/smackx/muc/MucConfigFormManager.java | MucConfigFormManager.setIsPasswordProtected | public MucConfigFormManager setIsPasswordProtected(boolean isPasswordProtected)
throws MucConfigurationNotSupportedException {
if (!supportsMembersOnly()) {
throw new MucConfigurationNotSupportedException(MUC_ROOMCONFIG_PASSWORDPROTECTEDROOM);
}
answerForm.setAnsw... | java | public MucConfigFormManager setIsPasswordProtected(boolean isPasswordProtected)
throws MucConfigurationNotSupportedException {
if (!supportsMembersOnly()) {
throw new MucConfigurationNotSupportedException(MUC_ROOMCONFIG_PASSWORDPROTECTEDROOM);
}
answerForm.setAnsw... | [
"public",
"MucConfigFormManager",
"setIsPasswordProtected",
"(",
"boolean",
"isPasswordProtected",
")",
"throws",
"MucConfigurationNotSupportedException",
"{",
"if",
"(",
"!",
"supportsMembersOnly",
"(",
")",
")",
"{",
"throw",
"new",
"MucConfigurationNotSupportedException",
... | Set if this room is password protected. Rooms are by default not password protected.
@param isPasswordProtected
@return a reference to this object.
@throws MucConfigurationNotSupportedException | [
"Set",
"if",
"this",
"room",
"is",
"password",
"protected",
".",
"Rooms",
"are",
"by",
"default",
"not",
"password",
"protected",
"."
] | 870756997faec1e1bfabfac0cd6c2395b04da873 | https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-extensions/src/main/java/org/jivesoftware/smackx/muc/MucConfigFormManager.java#L219-L226 |
26,636 | igniterealtime/Smack | smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/nat/STUN.java | STUN.getSTUNServer | @SuppressWarnings("deprecation")
public static STUN getSTUNServer(XMPPConnection connection) throws NotConnectedException, InterruptedException {
if (!connection.isConnected()) {
return null;
}
STUN stunPacket = new STUN();
stunPacket.setTo(DOMAIN + "." + connection.get... | java | @SuppressWarnings("deprecation")
public static STUN getSTUNServer(XMPPConnection connection) throws NotConnectedException, InterruptedException {
if (!connection.isConnected()) {
return null;
}
STUN stunPacket = new STUN();
stunPacket.setTo(DOMAIN + "." + connection.get... | [
"@",
"SuppressWarnings",
"(",
"\"deprecation\"",
")",
"public",
"static",
"STUN",
"getSTUNServer",
"(",
"XMPPConnection",
"connection",
")",
"throws",
"NotConnectedException",
",",
"InterruptedException",
"{",
"if",
"(",
"!",
"connection",
".",
"isConnected",
"(",
"... | Get a new STUN Server Address and port from the server.
If a error occurs or the server don't support STUN Service, null is returned.
@param connection
@return the STUN server address
@throws NotConnectedException
@throws InterruptedException | [
"Get",
"a",
"new",
"STUN",
"Server",
"Address",
"and",
"port",
"from",
"the",
"server",
".",
"If",
"a",
"error",
"occurs",
"or",
"the",
"server",
"don",
"t",
"support",
"STUN",
"Service",
"null",
"is",
"returned",
"."
] | 870756997faec1e1bfabfac0cd6c2395b04da873 | https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/nat/STUN.java#L181-L199 |
26,637 | igniterealtime/Smack | smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/nat/STUN.java | STUN.serviceAvailable | public static boolean serviceAvailable(XMPPConnection connection) throws XMPPException, SmackException, InterruptedException {
if (!connection.isConnected()) {
return false;
}
LOGGER.fine("Service listing");
ServiceDiscoveryManager disco = ServiceDiscoveryManager.getInstan... | java | public static boolean serviceAvailable(XMPPConnection connection) throws XMPPException, SmackException, InterruptedException {
if (!connection.isConnected()) {
return false;
}
LOGGER.fine("Service listing");
ServiceDiscoveryManager disco = ServiceDiscoveryManager.getInstan... | [
"public",
"static",
"boolean",
"serviceAvailable",
"(",
"XMPPConnection",
"connection",
")",
"throws",
"XMPPException",
",",
"SmackException",
",",
"InterruptedException",
"{",
"if",
"(",
"!",
"connection",
".",
"isConnected",
"(",
")",
")",
"{",
"return",
"false"... | Check if the server support STUN Service.
@param connection the connection
@return true if the server support STUN
@throws SmackException
@throws XMPPException
@throws InterruptedException | [
"Check",
"if",
"the",
"server",
"support",
"STUN",
"Service",
"."
] | 870756997faec1e1bfabfac0cd6c2395b04da873 | https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/nat/STUN.java#L210-L235 |
26,638 | igniterealtime/Smack | smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/mediaimpl/jmf/AudioMediaSession.java | AudioMediaSession.getFreePort | protected int getFreePort() {
ServerSocket ss;
int freePort = 0;
for (int i = 0; i < 10; i++) {
freePort = (int) (10000 + Math.round(Math.random() * 10000));
freePort = freePort % 2 == 0 ? freePort : freePort + 1;
try {
ss = new ServerSocket(f... | java | protected int getFreePort() {
ServerSocket ss;
int freePort = 0;
for (int i = 0; i < 10; i++) {
freePort = (int) (10000 + Math.round(Math.random() * 10000));
freePort = freePort % 2 == 0 ? freePort : freePort + 1;
try {
ss = new ServerSocket(f... | [
"protected",
"int",
"getFreePort",
"(",
")",
"{",
"ServerSocket",
"ss",
";",
"int",
"freePort",
"=",
"0",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"10",
";",
"i",
"++",
")",
"{",
"freePort",
"=",
"(",
"int",
")",
"(",
"10000",
"+",... | Obtain a free port we can use.
@return A free port number. | [
"Obtain",
"a",
"free",
"port",
"we",
"can",
"use",
"."
] | 870756997faec1e1bfabfac0cd6c2395b04da873 | https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/mediaimpl/jmf/AudioMediaSession.java#L172-L198 |
26,639 | igniterealtime/Smack | smack-extensions/src/main/java/org/jivesoftware/smackx/vcardtemp/packet/VCard.java | VCard.setField | public void setField(String field, String value, boolean isUnescapable) {
if (!isUnescapable) {
otherSimpleFields.put(field, value);
}
else {
otherUnescapableFields.put(field, value);
}
} | java | public void setField(String field, String value, boolean isUnescapable) {
if (!isUnescapable) {
otherSimpleFields.put(field, value);
}
else {
otherUnescapableFields.put(field, value);
}
} | [
"public",
"void",
"setField",
"(",
"String",
"field",
",",
"String",
"value",
",",
"boolean",
"isUnescapable",
")",
"{",
"if",
"(",
"!",
"isUnescapable",
")",
"{",
"otherSimpleFields",
".",
"put",
"(",
"field",
",",
"value",
")",
";",
"}",
"else",
"{",
... | Set generic, unescapable VCard field. If unescapable is set to true, XML maybe a part of the
value.
@param value value of field
@param field field to set. See {@link #getField(String)}
@param isUnescapable True if the value should not be escaped, and false if it should. | [
"Set",
"generic",
"unescapable",
"VCard",
"field",
".",
"If",
"unescapable",
"is",
"set",
"to",
"true",
"XML",
"maybe",
"a",
"part",
"of",
"the",
"value",
"."
] | 870756997faec1e1bfabfac0cd6c2395b04da873 | https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-extensions/src/main/java/org/jivesoftware/smackx/vcardtemp/packet/VCard.java#L167-L174 |
26,640 | igniterealtime/Smack | smack-extensions/src/main/java/org/jivesoftware/smackx/vcardtemp/packet/VCard.java | VCard.setAvatar | public void setAvatar(URL avatarURL) {
byte[] bytes = new byte[0];
try {
bytes = getBytes(avatarURL);
}
catch (IOException e) {
LOGGER.log(Level.SEVERE, "Error getting bytes from URL: " + avatarURL, e);
}
setAvatar(bytes);
} | java | public void setAvatar(URL avatarURL) {
byte[] bytes = new byte[0];
try {
bytes = getBytes(avatarURL);
}
catch (IOException e) {
LOGGER.log(Level.SEVERE, "Error getting bytes from URL: " + avatarURL, e);
}
setAvatar(bytes);
} | [
"public",
"void",
"setAvatar",
"(",
"URL",
"avatarURL",
")",
"{",
"byte",
"[",
"]",
"bytes",
"=",
"new",
"byte",
"[",
"0",
"]",
";",
"try",
"{",
"bytes",
"=",
"getBytes",
"(",
"avatarURL",
")",
";",
"}",
"catch",
"(",
"IOException",
"e",
")",
"{",
... | Set the avatar for the VCard by specifying the url to the image.
@param avatarURL the url to the image(png,jpeg,gif,bmp) | [
"Set",
"the",
"avatar",
"for",
"the",
"VCard",
"by",
"specifying",
"the",
"url",
"to",
"the",
"image",
"."
] | 870756997faec1e1bfabfac0cd6c2395b04da873 | https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-extensions/src/main/java/org/jivesoftware/smackx/vcardtemp/packet/VCard.java#L362-L372 |
26,641 | igniterealtime/Smack | smack-extensions/src/main/java/org/jivesoftware/smackx/vcardtemp/packet/VCard.java | VCard.setAvatar | public void setAvatar(byte[] bytes, String mimeType) {
// If bytes is null, remove the avatar
if (bytes == null) {
removeAvatar();
return;
}
// Otherwise, add to mappings.
String encodedImage = Base64.encodeToString(bytes);
setAvatar(encodedImage... | java | public void setAvatar(byte[] bytes, String mimeType) {
// If bytes is null, remove the avatar
if (bytes == null) {
removeAvatar();
return;
}
// Otherwise, add to mappings.
String encodedImage = Base64.encodeToString(bytes);
setAvatar(encodedImage... | [
"public",
"void",
"setAvatar",
"(",
"byte",
"[",
"]",
"bytes",
",",
"String",
"mimeType",
")",
"{",
"// If bytes is null, remove the avatar",
"if",
"(",
"bytes",
"==",
"null",
")",
"{",
"removeAvatar",
"(",
")",
";",
"return",
";",
"}",
"// Otherwise, add to m... | Specify the bytes for the avatar to use as well as the mime type.
@param bytes the bytes of the avatar.
@param mimeType the mime type of the avatar. | [
"Specify",
"the",
"bytes",
"for",
"the",
"avatar",
"to",
"use",
"as",
"well",
"as",
"the",
"mime",
"type",
"."
] | 870756997faec1e1bfabfac0cd6c2395b04da873 | https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-extensions/src/main/java/org/jivesoftware/smackx/vcardtemp/packet/VCard.java#L402-L413 |
26,642 | igniterealtime/Smack | smack-extensions/src/main/java/org/jivesoftware/smackx/vcardtemp/packet/VCard.java | VCard.getBytes | public static byte[] getBytes(URL url) throws IOException {
final String path = url.getPath();
final File file = new File(path);
if (file.exists()) {
return getFileBytes(file);
}
return null;
} | java | public static byte[] getBytes(URL url) throws IOException {
final String path = url.getPath();
final File file = new File(path);
if (file.exists()) {
return getFileBytes(file);
}
return null;
} | [
"public",
"static",
"byte",
"[",
"]",
"getBytes",
"(",
"URL",
"url",
")",
"throws",
"IOException",
"{",
"final",
"String",
"path",
"=",
"url",
".",
"getPath",
"(",
")",
";",
"final",
"File",
"file",
"=",
"new",
"File",
"(",
"path",
")",
";",
"if",
... | Common code for getting the bytes of a url.
@param url the url to read.
@return bytes of the file pointed to by URL.
@throws IOException if an IOException occurs while reading the file. | [
"Common",
"code",
"for",
"getting",
"the",
"bytes",
"of",
"a",
"url",
"."
] | 870756997faec1e1bfabfac0cd6c2395b04da873 | https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-extensions/src/main/java/org/jivesoftware/smackx/vcardtemp/packet/VCard.java#L483-L491 |
26,643 | igniterealtime/Smack | smack-extensions/src/main/java/org/jivesoftware/smackx/vcardtemp/packet/VCard.java | VCard.getAvatarHash | public String getAvatarHash() {
byte[] bytes = getAvatar();
if (bytes == null) {
return null;
}
MessageDigest digest;
try {
digest = MessageDigest.getInstance("SHA-1");
}
catch (NoSuchAlgorithmException e) {
LOGGER.log(Level.SE... | java | public String getAvatarHash() {
byte[] bytes = getAvatar();
if (bytes == null) {
return null;
}
MessageDigest digest;
try {
digest = MessageDigest.getInstance("SHA-1");
}
catch (NoSuchAlgorithmException e) {
LOGGER.log(Level.SE... | [
"public",
"String",
"getAvatarHash",
"(",
")",
"{",
"byte",
"[",
"]",
"bytes",
"=",
"getAvatar",
"(",
")",
";",
"if",
"(",
"bytes",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"MessageDigest",
"digest",
";",
"try",
"{",
"digest",
"=",
"Messag... | Returns the SHA-1 Hash of the Avatar image.
@return the SHA-1 Hash of the Avatar image. | [
"Returns",
"the",
"SHA",
"-",
"1",
"Hash",
"of",
"the",
"Avatar",
"image",
"."
] | 870756997faec1e1bfabfac0cd6c2395b04da873 | https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-extensions/src/main/java/org/jivesoftware/smackx/vcardtemp/packet/VCard.java#L510-L527 |
26,644 | igniterealtime/Smack | smack-extensions/src/main/java/org/jivesoftware/smackx/vcardtemp/packet/VCard.java | VCard.load | @Deprecated
public void load(XMPPConnection connection) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
load(connection, null);
} | java | @Deprecated
public void load(XMPPConnection connection) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
load(connection, null);
} | [
"@",
"Deprecated",
"public",
"void",
"load",
"(",
"XMPPConnection",
"connection",
")",
"throws",
"NoResponseException",
",",
"XMPPErrorException",
",",
"NotConnectedException",
",",
"InterruptedException",
"{",
"load",
"(",
"connection",
",",
"null",
")",
";",
"}"
] | Load VCard information for a connected user. XMPPConnection should be authenticated
and not anonymous.
@param connection connection.
@throws XMPPErrorException
@throws NoResponseException
@throws NotConnectedException
@throws InterruptedException
@deprecated use {@link VCardManager#loadVCard()} instead. | [
"Load",
"VCard",
"information",
"for",
"a",
"connected",
"user",
".",
"XMPPConnection",
"should",
"be",
"authenticated",
"and",
"not",
"anonymous",
"."
] | 870756997faec1e1bfabfac0cd6c2395b04da873 | https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-extensions/src/main/java/org/jivesoftware/smackx/vcardtemp/packet/VCard.java#L570-L573 |
26,645 | igniterealtime/Smack | smack-extensions/src/main/java/org/jivesoftware/smackx/vcardtemp/packet/VCard.java | VCard.load | @Deprecated
public void load(XMPPConnection connection, EntityBareJid user) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
VCard result = VCardManager.getInstanceFor(connection).loadVCard(user);
copyFieldsFrom(result);
} | java | @Deprecated
public void load(XMPPConnection connection, EntityBareJid user) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
VCard result = VCardManager.getInstanceFor(connection).loadVCard(user);
copyFieldsFrom(result);
} | [
"@",
"Deprecated",
"public",
"void",
"load",
"(",
"XMPPConnection",
"connection",
",",
"EntityBareJid",
"user",
")",
"throws",
"NoResponseException",
",",
"XMPPErrorException",
",",
"NotConnectedException",
",",
"InterruptedException",
"{",
"VCard",
"result",
"=",
"VC... | Load VCard information for a given user. XMPPConnection should be authenticated and not anonymous.
@param connection connection.
@param user user whos information we want to load.
@throws XMPPErrorException
@throws NoResponseException if there was no response from the server.
@throws NotConnectedException
@throws Int... | [
"Load",
"VCard",
"information",
"for",
"a",
"given",
"user",
".",
"XMPPConnection",
"should",
"be",
"authenticated",
"and",
"not",
"anonymous",
"."
] | 870756997faec1e1bfabfac0cd6c2395b04da873 | https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-extensions/src/main/java/org/jivesoftware/smackx/vcardtemp/packet/VCard.java#L587-L591 |
26,646 | igniterealtime/Smack | smack-openpgp/src/main/java/org/jivesoftware/smackx/ox/OpenPgpContact.java | OpenPgpContact.updateKeys | public void updateKeys(XMPPConnection connection) throws InterruptedException, SmackException.NotConnectedException,
SmackException.NoResponseException, XMPPException.XMPPErrorException, PubSubException.NotALeafNodeException,
PubSubException.NotAPubSubNodeException, IOException {
PublicK... | java | public void updateKeys(XMPPConnection connection) throws InterruptedException, SmackException.NotConnectedException,
SmackException.NoResponseException, XMPPException.XMPPErrorException, PubSubException.NotALeafNodeException,
PubSubException.NotAPubSubNodeException, IOException {
PublicK... | [
"public",
"void",
"updateKeys",
"(",
"XMPPConnection",
"connection",
")",
"throws",
"InterruptedException",
",",
"SmackException",
".",
"NotConnectedException",
",",
"SmackException",
".",
"NoResponseException",
",",
"XMPPException",
".",
"XMPPErrorException",
",",
"PubSu... | Update the contacts keys by consulting the users PubSub nodes.
This method fetches the users metadata node and then tries to fetch any announced keys.
@param connection our {@link XMPPConnection}.
@throws InterruptedException In case the thread gets interrupted.
@throws SmackException.NotConnectedException in case th... | [
"Update",
"the",
"contacts",
"keys",
"by",
"consulting",
"the",
"users",
"PubSub",
"nodes",
".",
"This",
"method",
"fetches",
"the",
"users",
"metadata",
"node",
"and",
"then",
"tries",
"to",
"fetch",
"any",
"announced",
"keys",
"."
] | 870756997faec1e1bfabfac0cd6c2395b04da873 | https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-openpgp/src/main/java/org/jivesoftware/smackx/ox/OpenPgpContact.java#L348-L357 |
26,647 | igniterealtime/Smack | smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/mediaimpl/jmf/JmfMediaManager.java | JmfMediaManager.setupPayloads | private void setupPayloads() {
payloads.add(new PayloadType.Audio(3, "gsm"));
payloads.add(new PayloadType.Audio(4, "g723"));
payloads.add(new PayloadType.Audio(0, "PCMU", 16000));
} | java | private void setupPayloads() {
payloads.add(new PayloadType.Audio(3, "gsm"));
payloads.add(new PayloadType.Audio(4, "g723"));
payloads.add(new PayloadType.Audio(0, "PCMU", 16000));
} | [
"private",
"void",
"setupPayloads",
"(",
")",
"{",
"payloads",
".",
"add",
"(",
"new",
"PayloadType",
".",
"Audio",
"(",
"3",
",",
"\"gsm\"",
")",
")",
";",
"payloads",
".",
"add",
"(",
"new",
"PayloadType",
".",
"Audio",
"(",
"4",
",",
"\"g723\"",
"... | Setup API supported Payloads | [
"Setup",
"API",
"supported",
"Payloads"
] | 870756997faec1e1bfabfac0cd6c2395b04da873 | https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/mediaimpl/jmf/JmfMediaManager.java#L86-L90 |
26,648 | igniterealtime/Smack | smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/mediaimpl/jmf/JmfMediaManager.java | JmfMediaManager.setupJMF | public static void setupJMF() {
// .jmf is the place where we store the jmf.properties file used
// by JMF. if the directory does not exist or it does not contain
// a jmf.properties file. or if the jmf.properties file has 0 length
// then this is the first time we're running and should ... | java | public static void setupJMF() {
// .jmf is the place where we store the jmf.properties file used
// by JMF. if the directory does not exist or it does not contain
// a jmf.properties file. or if the jmf.properties file has 0 length
// then this is the first time we're running and should ... | [
"public",
"static",
"void",
"setupJMF",
"(",
")",
"{",
"// .jmf is the place where we store the jmf.properties file used",
"// by JMF. if the directory does not exist or it does not contain",
"// a jmf.properties file. or if the jmf.properties file has 0 length",
"// then this is the first time ... | Runs JMFInit the first time the application is started so that capture
devices are properly detected and initialized by JMF. | [
"Runs",
"JMFInit",
"the",
"first",
"time",
"the",
"application",
"is",
"started",
"so",
"that",
"capture",
"devices",
"are",
"properly",
"detected",
"and",
"initialized",
"by",
"JMF",
"."
] | 870756997faec1e1bfabfac0cd6c2395b04da873 | https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/mediaimpl/jmf/JmfMediaManager.java#L124-L159 |
26,649 | igniterealtime/Smack | smack-extensions/src/main/java/org/jivesoftware/smackx/pubsub/SubscribeForm.java | SubscribeForm.setDeliverOn | public void setDeliverOn(boolean deliverNotifications) {
addField(SubscribeOptionFields.deliver, FormField.Type.bool);
setAnswer(SubscribeOptionFields.deliver.getFieldName(), deliverNotifications);
} | java | public void setDeliverOn(boolean deliverNotifications) {
addField(SubscribeOptionFields.deliver, FormField.Type.bool);
setAnswer(SubscribeOptionFields.deliver.getFieldName(), deliverNotifications);
} | [
"public",
"void",
"setDeliverOn",
"(",
"boolean",
"deliverNotifications",
")",
"{",
"addField",
"(",
"SubscribeOptionFields",
".",
"deliver",
",",
"FormField",
".",
"Type",
".",
"bool",
")",
";",
"setAnswer",
"(",
"SubscribeOptionFields",
".",
"deliver",
".",
"g... | Sets whether an entity wants to receive notifications.
@param deliverNotifications | [
"Sets",
"whether",
"an",
"entity",
"wants",
"to",
"receive",
"notifications",
"."
] | 870756997faec1e1bfabfac0cd6c2395b04da873 | https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-extensions/src/main/java/org/jivesoftware/smackx/pubsub/SubscribeForm.java#L69-L72 |
26,650 | igniterealtime/Smack | smack-extensions/src/main/java/org/jivesoftware/smackx/pubsub/SubscribeForm.java | SubscribeForm.setDigestOn | public void setDigestOn(boolean digestOn) {
addField(SubscribeOptionFields.deliver, FormField.Type.bool);
setAnswer(SubscribeOptionFields.deliver.getFieldName(), digestOn);
} | java | public void setDigestOn(boolean digestOn) {
addField(SubscribeOptionFields.deliver, FormField.Type.bool);
setAnswer(SubscribeOptionFields.deliver.getFieldName(), digestOn);
} | [
"public",
"void",
"setDigestOn",
"(",
"boolean",
"digestOn",
")",
"{",
"addField",
"(",
"SubscribeOptionFields",
".",
"deliver",
",",
"FormField",
".",
"Type",
".",
"bool",
")",
";",
"setAnswer",
"(",
"SubscribeOptionFields",
".",
"deliver",
".",
"getFieldName",... | Sets whether notifications should be delivered as aggregations or not.
@param digestOn true to aggregate, false otherwise | [
"Sets",
"whether",
"notifications",
"should",
"be",
"delivered",
"as",
"aggregations",
"or",
"not",
"."
] | 870756997faec1e1bfabfac0cd6c2395b04da873 | https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-extensions/src/main/java/org/jivesoftware/smackx/pubsub/SubscribeForm.java#L88-L91 |
26,651 | igniterealtime/Smack | smack-extensions/src/main/java/org/jivesoftware/smackx/pubsub/SubscribeForm.java | SubscribeForm.setDigestFrequency | public void setDigestFrequency(int frequency) {
addField(SubscribeOptionFields.digest_frequency, FormField.Type.text_single);
setAnswer(SubscribeOptionFields.digest_frequency.getFieldName(), frequency);
} | java | public void setDigestFrequency(int frequency) {
addField(SubscribeOptionFields.digest_frequency, FormField.Type.text_single);
setAnswer(SubscribeOptionFields.digest_frequency.getFieldName(), frequency);
} | [
"public",
"void",
"setDigestFrequency",
"(",
"int",
"frequency",
")",
"{",
"addField",
"(",
"SubscribeOptionFields",
".",
"digest_frequency",
",",
"FormField",
".",
"Type",
".",
"text_single",
")",
";",
"setAnswer",
"(",
"SubscribeOptionFields",
".",
"digest_frequen... | Sets the minimum number of milliseconds between sending notification digests.
@param frequency The frequency in milliseconds | [
"Sets",
"the",
"minimum",
"number",
"of",
"milliseconds",
"between",
"sending",
"notification",
"digests",
"."
] | 870756997faec1e1bfabfac0cd6c2395b04da873 | https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-extensions/src/main/java/org/jivesoftware/smackx/pubsub/SubscribeForm.java#L107-L110 |
26,652 | igniterealtime/Smack | smack-extensions/src/main/java/org/jivesoftware/smackx/pubsub/SubscribeForm.java | SubscribeForm.getExpiry | public Date getExpiry() {
String dateTime = getFieldValue(SubscribeOptionFields.expire);
try {
return XmppDateTime.parseDate(dateTime);
}
catch (ParseException e) {
UnknownFormatConversionException exc = new UnknownFormatConversionException(dateTime);
... | java | public Date getExpiry() {
String dateTime = getFieldValue(SubscribeOptionFields.expire);
try {
return XmppDateTime.parseDate(dateTime);
}
catch (ParseException e) {
UnknownFormatConversionException exc = new UnknownFormatConversionException(dateTime);
... | [
"public",
"Date",
"getExpiry",
"(",
")",
"{",
"String",
"dateTime",
"=",
"getFieldValue",
"(",
"SubscribeOptionFields",
".",
"expire",
")",
";",
"try",
"{",
"return",
"XmppDateTime",
".",
"parseDate",
"(",
"dateTime",
")",
";",
"}",
"catch",
"(",
"ParseExcep... | Get the time at which the leased subscription will expire, or has expired.
@return The expiry date | [
"Get",
"the",
"time",
"at",
"which",
"the",
"leased",
"subscription",
"will",
"expire",
"or",
"has",
"expired",
"."
] | 870756997faec1e1bfabfac0cd6c2395b04da873 | https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-extensions/src/main/java/org/jivesoftware/smackx/pubsub/SubscribeForm.java#L117-L127 |
26,653 | igniterealtime/Smack | smack-extensions/src/main/java/org/jivesoftware/smackx/pubsub/SubscribeForm.java | SubscribeForm.setExpiry | public void setExpiry(Date expire) {
addField(SubscribeOptionFields.expire, FormField.Type.text_single);
setAnswer(SubscribeOptionFields.expire.getFieldName(), XmppDateTime.formatXEP0082Date(expire));
} | java | public void setExpiry(Date expire) {
addField(SubscribeOptionFields.expire, FormField.Type.text_single);
setAnswer(SubscribeOptionFields.expire.getFieldName(), XmppDateTime.formatXEP0082Date(expire));
} | [
"public",
"void",
"setExpiry",
"(",
"Date",
"expire",
")",
"{",
"addField",
"(",
"SubscribeOptionFields",
".",
"expire",
",",
"FormField",
".",
"Type",
".",
"text_single",
")",
";",
"setAnswer",
"(",
"SubscribeOptionFields",
".",
"expire",
".",
"getFieldName",
... | Sets the time at which the leased subscription will expire, or has expired.
@param expire The expiry date | [
"Sets",
"the",
"time",
"at",
"which",
"the",
"leased",
"subscription",
"will",
"expire",
"or",
"has",
"expired",
"."
] | 870756997faec1e1bfabfac0cd6c2395b04da873 | https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-extensions/src/main/java/org/jivesoftware/smackx/pubsub/SubscribeForm.java#L134-L137 |
26,654 | igniterealtime/Smack | smack-extensions/src/main/java/org/jivesoftware/smackx/pubsub/SubscribeForm.java | SubscribeForm.setIncludeBody | public void setIncludeBody(boolean include) {
addField(SubscribeOptionFields.include_body, FormField.Type.bool);
setAnswer(SubscribeOptionFields.include_body.getFieldName(), include);
} | java | public void setIncludeBody(boolean include) {
addField(SubscribeOptionFields.include_body, FormField.Type.bool);
setAnswer(SubscribeOptionFields.include_body.getFieldName(), include);
} | [
"public",
"void",
"setIncludeBody",
"(",
"boolean",
"include",
")",
"{",
"addField",
"(",
"SubscribeOptionFields",
".",
"include_body",
",",
"FormField",
".",
"Type",
".",
"bool",
")",
";",
"setAnswer",
"(",
"SubscribeOptionFields",
".",
"include_body",
".",
"ge... | Sets whether the entity wants to receive an XMPP message body in
addition to the payload format.
@param include true to receive the message body, false otherwise | [
"Sets",
"whether",
"the",
"entity",
"wants",
"to",
"receive",
"an",
"XMPP",
"message",
"body",
"in",
"addition",
"to",
"the",
"payload",
"format",
"."
] | 870756997faec1e1bfabfac0cd6c2395b04da873 | https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-extensions/src/main/java/org/jivesoftware/smackx/pubsub/SubscribeForm.java#L155-L158 |
26,655 | igniterealtime/Smack | smack-legacy/src/main/java/org/jivesoftware/smackx/workgroup/agent/AgentRoster.java | AgentRoster.addListener | public void addListener(AgentRosterListener listener) {
synchronized (listeners) {
if (!listeners.contains(listener)) {
listeners.add(listener);
// Fire events for the existing entries and presences in the roster
for (EntityBareJid jid : getAgents()) ... | java | public void addListener(AgentRosterListener listener) {
synchronized (listeners) {
if (!listeners.contains(listener)) {
listeners.add(listener);
// Fire events for the existing entries and presences in the roster
for (EntityBareJid jid : getAgents()) ... | [
"public",
"void",
"addListener",
"(",
"AgentRosterListener",
"listener",
")",
"{",
"synchronized",
"(",
"listeners",
")",
"{",
"if",
"(",
"!",
"listeners",
".",
"contains",
"(",
"listener",
")",
")",
"{",
"listeners",
".",
"add",
"(",
"listener",
")",
";",... | Adds a listener to this roster. The listener will be fired anytime one or more
changes to the roster are pushed from the server.
@param listener an agent roster listener. | [
"Adds",
"a",
"listener",
"to",
"this",
"roster",
".",
"The",
"listener",
"will",
"be",
"fired",
"anytime",
"one",
"or",
"more",
"changes",
"to",
"the",
"roster",
"are",
"pushed",
"from",
"the",
"server",
"."
] | 870756997faec1e1bfabfac0cd6c2395b04da873 | https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-legacy/src/main/java/org/jivesoftware/smackx/workgroup/agent/AgentRoster.java#L111-L142 |
26,656 | igniterealtime/Smack | smack-legacy/src/main/java/org/jivesoftware/smackx/workgroup/agent/AgentRoster.java | AgentRoster.contains | public boolean contains(Jid jid) {
if (jid == null) {
return false;
}
synchronized (entries) {
for (Iterator<EntityBareJid> i = entries.iterator(); i.hasNext();) {
EntityBareJid entry = i.next();
if (entry.equals(jid)) {
... | java | public boolean contains(Jid jid) {
if (jid == null) {
return false;
}
synchronized (entries) {
for (Iterator<EntityBareJid> i = entries.iterator(); i.hasNext();) {
EntityBareJid entry = i.next();
if (entry.equals(jid)) {
... | [
"public",
"boolean",
"contains",
"(",
"Jid",
"jid",
")",
"{",
"if",
"(",
"jid",
"==",
"null",
")",
"{",
"return",
"false",
";",
"}",
"synchronized",
"(",
"entries",
")",
"{",
"for",
"(",
"Iterator",
"<",
"EntityBareJid",
">",
"i",
"=",
"entries",
"."... | Returns true if the specified XMPP address is an agent in the workgroup.
@param jid the XMPP address of the agent (eg "jsmith@example.com"). The
address can be in any valid format (e.g. "domain/resource", "user@domain"
or "user@domain/resource").
@return true if the XMPP address is an agent in the workgroup. | [
"Returns",
"true",
"if",
"the",
"specified",
"XMPP",
"address",
"is",
"an",
"agent",
"in",
"the",
"workgroup",
"."
] | 870756997faec1e1bfabfac0cd6c2395b04da873 | https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-legacy/src/main/java/org/jivesoftware/smackx/workgroup/agent/AgentRoster.java#L188-L201 |
26,657 | igniterealtime/Smack | smack-legacy/src/main/java/org/jivesoftware/smackx/workgroup/agent/AgentRoster.java | AgentRoster.fireEvent | private void fireEvent(int eventType, Object eventObject) {
AgentRosterListener[] listeners;
synchronized (this.listeners) {
listeners = new AgentRosterListener[this.listeners.size()];
this.listeners.toArray(listeners);
}
for (int i = 0; i < listeners.length; i++)... | java | private void fireEvent(int eventType, Object eventObject) {
AgentRosterListener[] listeners;
synchronized (this.listeners) {
listeners = new AgentRosterListener[this.listeners.size()];
this.listeners.toArray(listeners);
}
for (int i = 0; i < listeners.length; i++)... | [
"private",
"void",
"fireEvent",
"(",
"int",
"eventType",
",",
"Object",
"eventObject",
")",
"{",
"AgentRosterListener",
"[",
"]",
"listeners",
";",
"synchronized",
"(",
"this",
".",
"listeners",
")",
"{",
"listeners",
"=",
"new",
"AgentRosterListener",
"[",
"t... | Fires event to listeners. | [
"Fires",
"event",
"to",
"listeners",
"."
] | 870756997faec1e1bfabfac0cd6c2395b04da873 | https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-legacy/src/main/java/org/jivesoftware/smackx/workgroup/agent/AgentRoster.java#L271-L290 |
26,658 | igniterealtime/Smack | smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/packet/JingleError.java | JingleError.toXML | @Override
public String toXML(org.jivesoftware.smack.packet.XmlEnvironment enclosingNamespace) {
StringBuilder buf = new StringBuilder();
if (message != null) {
buf.append("<error type=\"cancel\">");
buf.append('<').append(message).append(" xmlns=\"").append(NAMESPACE).append... | java | @Override
public String toXML(org.jivesoftware.smack.packet.XmlEnvironment enclosingNamespace) {
StringBuilder buf = new StringBuilder();
if (message != null) {
buf.append("<error type=\"cancel\">");
buf.append('<').append(message).append(" xmlns=\"").append(NAMESPACE).append... | [
"@",
"Override",
"public",
"String",
"toXML",
"(",
"org",
".",
"jivesoftware",
".",
"smack",
".",
"packet",
".",
"XmlEnvironment",
"enclosingNamespace",
")",
"{",
"StringBuilder",
"buf",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"if",
"(",
"message",
"!=",... | Returns the error as XML.
@return the error as XML. | [
"Returns",
"the",
"error",
"as",
"XML",
"."
] | 870756997faec1e1bfabfac0cd6c2395b04da873 | https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/packet/JingleError.java#L79-L89 |
26,659 | igniterealtime/Smack | smack-legacy/src/main/java/org/jivesoftware/smackx/workgroup/user/Workgroup.java | Workgroup.isAvailable | public boolean isAvailable() throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
Presence directedPresence = new Presence(Presence.Type.available);
directedPresence.setTo(workgroupJID);
StanzaFilter typeFilter = new StanzaTypeFilter(Presence.class);
... | java | public boolean isAvailable() throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
Presence directedPresence = new Presence(Presence.Type.available);
directedPresence.setTo(workgroupJID);
StanzaFilter typeFilter = new StanzaTypeFilter(Presence.class);
... | [
"public",
"boolean",
"isAvailable",
"(",
")",
"throws",
"NoResponseException",
",",
"XMPPErrorException",
",",
"NotConnectedException",
",",
"InterruptedException",
"{",
"Presence",
"directedPresence",
"=",
"new",
"Presence",
"(",
"Presence",
".",
"Type",
".",
"availa... | Returns true if the workgroup is available for receiving new requests. The workgroup will be
available only when agents are available for this workgroup.
@return true if the workgroup is available for receiving new requests.
@throws XMPPErrorException
@throws NoResponseException
@throws NotConnectedException
@throws I... | [
"Returns",
"true",
"if",
"the",
"workgroup",
"is",
"available",
"for",
"receiving",
"new",
"requests",
".",
"The",
"workgroup",
"will",
"be",
"available",
"only",
"when",
"agents",
"are",
"available",
"for",
"this",
"workgroup",
"."
] | 870756997faec1e1bfabfac0cd6c2395b04da873 | https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-legacy/src/main/java/org/jivesoftware/smackx/workgroup/user/Workgroup.java#L190-L200 |
26,660 | igniterealtime/Smack | smack-legacy/src/main/java/org/jivesoftware/smackx/workgroup/user/Workgroup.java | Workgroup.getChatSetting | public ChatSetting getChatSetting(String key) throws XMPPException, SmackException, InterruptedException {
ChatSettings chatSettings = getChatSettings(key, -1);
return chatSettings.getFirstEntry();
} | java | public ChatSetting getChatSetting(String key) throws XMPPException, SmackException, InterruptedException {
ChatSettings chatSettings = getChatSettings(key, -1);
return chatSettings.getFirstEntry();
} | [
"public",
"ChatSetting",
"getChatSetting",
"(",
"String",
"key",
")",
"throws",
"XMPPException",
",",
"SmackException",
",",
"InterruptedException",
"{",
"ChatSettings",
"chatSettings",
"=",
"getChatSettings",
"(",
"key",
",",
"-",
"1",
")",
";",
"return",
"chatSe... | Returns a single chat setting based on it's identified key.
@param key the key to find.
@return the ChatSetting if found, otherwise false.
@throws XMPPException if an error occurs while getting information from the server.
@throws SmackException
@throws InterruptedException | [
"Returns",
"a",
"single",
"chat",
"setting",
"based",
"on",
"it",
"s",
"identified",
"key",
"."
] | 870756997faec1e1bfabfac0cd6c2395b04da873 | https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-legacy/src/main/java/org/jivesoftware/smackx/workgroup/user/Workgroup.java#L609-L612 |
26,661 | igniterealtime/Smack | smack-legacy/src/main/java/org/jivesoftware/smackx/workgroup/user/Workgroup.java | Workgroup.getChatSettings | private ChatSettings getChatSettings(String key, int type) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
ChatSettings request = new ChatSettings();
if (key != null) {
request.setKey(key);
}
if (type != -1) {
request.... | java | private ChatSettings getChatSettings(String key, int type) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
ChatSettings request = new ChatSettings();
if (key != null) {
request.setKey(key);
}
if (type != -1) {
request.... | [
"private",
"ChatSettings",
"getChatSettings",
"(",
"String",
"key",
",",
"int",
"type",
")",
"throws",
"NoResponseException",
",",
"XMPPErrorException",
",",
"NotConnectedException",
",",
"InterruptedException",
"{",
"ChatSettings",
"request",
"=",
"new",
"ChatSettings"... | Asks the workgroup for it's Chat Settings.
@return key specify a key to retrieve only that settings. Otherwise for all settings, key should be null.
@throws NoResponseException
@throws XMPPErrorException if an error occurs while getting information from the server.
@throws NotConnectedException
@throws InterruptedExce... | [
"Asks",
"the",
"workgroup",
"for",
"it",
"s",
"Chat",
"Settings",
"."
] | 870756997faec1e1bfabfac0cd6c2395b04da873 | https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-legacy/src/main/java/org/jivesoftware/smackx/workgroup/user/Workgroup.java#L649-L663 |
26,662 | igniterealtime/Smack | smack-legacy/src/main/java/org/jivesoftware/smackx/workgroup/user/Workgroup.java | Workgroup.isEmailAvailable | public boolean isEmailAvailable() throws SmackException, InterruptedException {
ServiceDiscoveryManager discoManager = ServiceDiscoveryManager.getInstanceFor(connection);
try {
DomainBareJid workgroupService = workgroupJID.asDomainBareJid();
DiscoverInfo infoResult = discoManage... | java | public boolean isEmailAvailable() throws SmackException, InterruptedException {
ServiceDiscoveryManager discoManager = ServiceDiscoveryManager.getInstanceFor(connection);
try {
DomainBareJid workgroupService = workgroupJID.asDomainBareJid();
DiscoverInfo infoResult = discoManage... | [
"public",
"boolean",
"isEmailAvailable",
"(",
")",
"throws",
"SmackException",
",",
"InterruptedException",
"{",
"ServiceDiscoveryManager",
"discoManager",
"=",
"ServiceDiscoveryManager",
".",
"getInstanceFor",
"(",
"connection",
")",
";",
"try",
"{",
"DomainBareJid",
"... | The workgroup service may be configured to send email. This queries the Workgroup Service
to see if the email service has been configured and is available.
@return true if the email service is available, otherwise return false.
@throws SmackException
@throws InterruptedException | [
"The",
"workgroup",
"service",
"may",
"be",
"configured",
"to",
"send",
"email",
".",
"This",
"queries",
"the",
"Workgroup",
"Service",
"to",
"see",
"if",
"the",
"email",
"service",
"has",
"been",
"configured",
"and",
"is",
"available",
"."
] | 870756997faec1e1bfabfac0cd6c2395b04da873 | https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-legacy/src/main/java/org/jivesoftware/smackx/workgroup/user/Workgroup.java#L673-L684 |
26,663 | igniterealtime/Smack | smack-legacy/src/main/java/org/jivesoftware/smackx/workgroup/user/Workgroup.java | Workgroup.getOfflineSettings | public OfflineSettings getOfflineSettings() throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
OfflineSettings request = new OfflineSettings();
request.setType(IQ.Type.get);
request.setTo(workgroupJID);
return connection.createStanzaCollectorAn... | java | public OfflineSettings getOfflineSettings() throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
OfflineSettings request = new OfflineSettings();
request.setType(IQ.Type.get);
request.setTo(workgroupJID);
return connection.createStanzaCollectorAn... | [
"public",
"OfflineSettings",
"getOfflineSettings",
"(",
")",
"throws",
"NoResponseException",
",",
"XMPPErrorException",
",",
"NotConnectedException",
",",
"InterruptedException",
"{",
"OfflineSettings",
"request",
"=",
"new",
"OfflineSettings",
"(",
")",
";",
"request",
... | Asks the workgroup for it's Offline Settings.
@return offlineSettings the offline settings for this workgroup.
@throws XMPPErrorException
@throws NoResponseException
@throws NotConnectedException
@throws InterruptedException | [
"Asks",
"the",
"workgroup",
"for",
"it",
"s",
"Offline",
"Settings",
"."
] | 870756997faec1e1bfabfac0cd6c2395b04da873 | https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-legacy/src/main/java/org/jivesoftware/smackx/workgroup/user/Workgroup.java#L695-L701 |
26,664 | igniterealtime/Smack | smack-legacy/src/main/java/org/jivesoftware/smackx/workgroup/user/Workgroup.java | Workgroup.getSoundSettings | public SoundSettings getSoundSettings() throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
SoundSettings request = new SoundSettings();
request.setType(IQ.Type.get);
request.setTo(workgroupJID);
return connection.createStanzaCollectorAndSend(re... | java | public SoundSettings getSoundSettings() throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
SoundSettings request = new SoundSettings();
request.setType(IQ.Type.get);
request.setTo(workgroupJID);
return connection.createStanzaCollectorAndSend(re... | [
"public",
"SoundSettings",
"getSoundSettings",
"(",
")",
"throws",
"NoResponseException",
",",
"XMPPErrorException",
",",
"NotConnectedException",
",",
"InterruptedException",
"{",
"SoundSettings",
"request",
"=",
"new",
"SoundSettings",
"(",
")",
";",
"request",
".",
... | Asks the workgroup for it's Sound Settings.
@return soundSettings the sound settings for the specified workgroup.
@throws XMPPErrorException
@throws NoResponseException
@throws NotConnectedException
@throws InterruptedException | [
"Asks",
"the",
"workgroup",
"for",
"it",
"s",
"Sound",
"Settings",
"."
] | 870756997faec1e1bfabfac0cd6c2395b04da873 | https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-legacy/src/main/java/org/jivesoftware/smackx/workgroup/user/Workgroup.java#L712-L718 |
26,665 | igniterealtime/Smack | smack-legacy/src/main/java/org/jivesoftware/smackx/workgroup/user/Workgroup.java | Workgroup.getWorkgroupProperties | public WorkgroupProperties getWorkgroupProperties() throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
WorkgroupProperties request = new WorkgroupProperties();
request.setType(IQ.Type.get);
request.setTo(workgroupJID);
return connection.create... | java | public WorkgroupProperties getWorkgroupProperties() throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
WorkgroupProperties request = new WorkgroupProperties();
request.setType(IQ.Type.get);
request.setTo(workgroupJID);
return connection.create... | [
"public",
"WorkgroupProperties",
"getWorkgroupProperties",
"(",
")",
"throws",
"NoResponseException",
",",
"XMPPErrorException",
",",
"NotConnectedException",
",",
"InterruptedException",
"{",
"WorkgroupProperties",
"request",
"=",
"new",
"WorkgroupProperties",
"(",
")",
";... | Asks the workgroup for it's Properties.
@return the WorkgroupProperties for the specified workgroup.
@throws XMPPErrorException
@throws NoResponseException
@throws NotConnectedException
@throws InterruptedException | [
"Asks",
"the",
"workgroup",
"for",
"it",
"s",
"Properties",
"."
] | 870756997faec1e1bfabfac0cd6c2395b04da873 | https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-legacy/src/main/java/org/jivesoftware/smackx/workgroup/user/Workgroup.java#L729-L735 |
26,666 | igniterealtime/Smack | smack-legacy/src/main/java/org/jivesoftware/smackx/xroster/packet/RosterExchange.java | RosterExchange.addRosterEntry | public void addRosterEntry(RosterEntry rosterEntry) {
// Obtain a String[] from the roster entry groups name
List<String> groupNamesList = new ArrayList<>();
String[] groupNames;
for (RosterGroup group : rosterEntry.getGroups()) {
groupNamesList.add(group.getName());
... | java | public void addRosterEntry(RosterEntry rosterEntry) {
// Obtain a String[] from the roster entry groups name
List<String> groupNamesList = new ArrayList<>();
String[] groupNames;
for (RosterGroup group : rosterEntry.getGroups()) {
groupNamesList.add(group.getName());
... | [
"public",
"void",
"addRosterEntry",
"(",
"RosterEntry",
"rosterEntry",
")",
"{",
"// Obtain a String[] from the roster entry groups name",
"List",
"<",
"String",
">",
"groupNamesList",
"=",
"new",
"ArrayList",
"<>",
"(",
")",
";",
"String",
"[",
"]",
"groupNames",
"... | Adds a roster entry to the packet.
@param rosterEntry a roster entry to add. | [
"Adds",
"a",
"roster",
"entry",
"to",
"the",
"packet",
"."
] | 870756997faec1e1bfabfac0cd6c2395b04da873 | https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-legacy/src/main/java/org/jivesoftware/smackx/xroster/packet/RosterExchange.java#L81-L95 |
26,667 | igniterealtime/Smack | smack-legacy/src/main/java/org/jivesoftware/smackx/xroster/packet/RosterExchange.java | RosterExchange.getRosterEntries | public Iterator<RemoteRosterEntry> getRosterEntries() {
synchronized (remoteRosterEntries) {
List<RemoteRosterEntry> entries = Collections.unmodifiableList(new ArrayList<>(remoteRosterEntries));
return entries.iterator();
}
} | java | public Iterator<RemoteRosterEntry> getRosterEntries() {
synchronized (remoteRosterEntries) {
List<RemoteRosterEntry> entries = Collections.unmodifiableList(new ArrayList<>(remoteRosterEntries));
return entries.iterator();
}
} | [
"public",
"Iterator",
"<",
"RemoteRosterEntry",
">",
"getRosterEntries",
"(",
")",
"{",
"synchronized",
"(",
"remoteRosterEntries",
")",
"{",
"List",
"<",
"RemoteRosterEntry",
">",
"entries",
"=",
"Collections",
".",
"unmodifiableList",
"(",
"new",
"ArrayList",
"<... | Returns an Iterator for the roster entries in the packet.
@return an Iterator for the roster entries in the packet. | [
"Returns",
"an",
"Iterator",
"for",
"the",
"roster",
"entries",
"in",
"the",
"packet",
"."
] | 870756997faec1e1bfabfac0cd6c2395b04da873 | https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-legacy/src/main/java/org/jivesoftware/smackx/xroster/packet/RosterExchange.java#L136-L141 |
26,668 | igniterealtime/Smack | smack-legacy/src/main/java/org/jivesoftware/smackx/xroster/packet/RosterExchange.java | RosterExchange.toXML | @Override
public String toXML(org.jivesoftware.smack.packet.XmlEnvironment enclosingNamespace) {
StringBuilder buf = new StringBuilder();
buf.append('<').append(getElementName()).append(" xmlns=\"").append(getNamespace()).append(
"\">");
// Loop through all roster entries and app... | java | @Override
public String toXML(org.jivesoftware.smack.packet.XmlEnvironment enclosingNamespace) {
StringBuilder buf = new StringBuilder();
buf.append('<').append(getElementName()).append(" xmlns=\"").append(getNamespace()).append(
"\">");
// Loop through all roster entries and app... | [
"@",
"Override",
"public",
"String",
"toXML",
"(",
"org",
".",
"jivesoftware",
".",
"smack",
".",
"packet",
".",
"XmlEnvironment",
"enclosingNamespace",
")",
"{",
"StringBuilder",
"buf",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"buf",
".",
"append",
"(",
... | Returns the XML representation of a Roster Item Exchange according the specification.
Usually the XML representation will be inside of a Message XML representation like
in the following example:
<pre>
<message id="MlIpV-4" to="gato1@gato.home" from="gato3@gato.home/Smack">
<subject>Any subject you want<... | [
"Returns",
"the",
"XML",
"representation",
"of",
"a",
"Roster",
"Item",
"Exchange",
"according",
"the",
"specification",
"."
] | 870756997faec1e1bfabfac0cd6c2395b04da873 | https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-legacy/src/main/java/org/jivesoftware/smackx/xroster/packet/RosterExchange.java#L169-L181 |
26,669 | igniterealtime/Smack | smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/mediaimpl/jspeex/SpeexMediaManager.java | SpeexMediaManager.createMediaSession | @Override
public JingleMediaSession createMediaSession(PayloadType payloadType, final TransportCandidate remote, final TransportCandidate local, final JingleSession jingleSession) {
return new AudioMediaSession(payloadType, remote, local, null,null);
} | java | @Override
public JingleMediaSession createMediaSession(PayloadType payloadType, final TransportCandidate remote, final TransportCandidate local, final JingleSession jingleSession) {
return new AudioMediaSession(payloadType, remote, local, null,null);
} | [
"@",
"Override",
"public",
"JingleMediaSession",
"createMediaSession",
"(",
"PayloadType",
"payloadType",
",",
"final",
"TransportCandidate",
"remote",
",",
"final",
"TransportCandidate",
"local",
",",
"final",
"JingleSession",
"jingleSession",
")",
"{",
"return",
"new"... | Returns a new jingleMediaSession.
@param payloadType payloadType
@param remote remote Candidate
@param local local Candidate
@return JingleMediaSession | [
"Returns",
"a",
"new",
"jingleMediaSession",
"."
] | 870756997faec1e1bfabfac0cd6c2395b04da873 | https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/mediaimpl/jspeex/SpeexMediaManager.java#L63-L66 |
26,670 | igniterealtime/Smack | smack-core/src/main/java/org/jivesoftware/smack/util/Objects.java | Objects.requireNonNullNorEmpty | public static <T extends Collection<?>> T requireNonNullNorEmpty(T collection, String message) {
if (requireNonNull(collection).isEmpty()) {
throw new IllegalArgumentException(message);
}
return collection;
} | java | public static <T extends Collection<?>> T requireNonNullNorEmpty(T collection, String message) {
if (requireNonNull(collection).isEmpty()) {
throw new IllegalArgumentException(message);
}
return collection;
} | [
"public",
"static",
"<",
"T",
"extends",
"Collection",
"<",
"?",
">",
">",
"T",
"requireNonNullNorEmpty",
"(",
"T",
"collection",
",",
"String",
"message",
")",
"{",
"if",
"(",
"requireNonNull",
"(",
"collection",
")",
".",
"isEmpty",
"(",
")",
")",
"{",... | Require a collection to be neither null, nor empty.
@param collection collection
@param message error message
@param <T> Collection type
@return collection | [
"Require",
"a",
"collection",
"to",
"be",
"neither",
"null",
"nor",
"empty",
"."
] | 870756997faec1e1bfabfac0cd6c2395b04da873 | https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-core/src/main/java/org/jivesoftware/smack/util/Objects.java#L42-L47 |
26,671 | igniterealtime/Smack | smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/nat/BridgedResolver.java | BridgedResolver.resolve | @Override
public synchronized void resolve(JingleSession session) throws XMPPException, NotConnectedException, InterruptedException {
setResolveInit();
clearCandidates();
sid = random.nextInt(Integer.MAX_VALUE);
RTPBridge rtpBridge = RTPBridge.getRTPBridge(connection, String.valu... | java | @Override
public synchronized void resolve(JingleSession session) throws XMPPException, NotConnectedException, InterruptedException {
setResolveInit();
clearCandidates();
sid = random.nextInt(Integer.MAX_VALUE);
RTPBridge rtpBridge = RTPBridge.getRTPBridge(connection, String.valu... | [
"@",
"Override",
"public",
"synchronized",
"void",
"resolve",
"(",
"JingleSession",
"session",
")",
"throws",
"XMPPException",
",",
"NotConnectedException",
",",
"InterruptedException",
"{",
"setResolveInit",
"(",
")",
";",
"clearCandidates",
"(",
")",
";",
"sid",
... | 1
Resolve Bridged Candidate.
The BridgedResolver takes the IP address and ports of a jmf proxy service.
@throws NotConnectedException
@throws InterruptedException | [
"1",
"Resolve",
"Bridged",
"Candidate",
"."
] | 870756997faec1e1bfabfac0cd6c2395b04da873 | https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/nat/BridgedResolver.java#L70-L106 |
26,672 | igniterealtime/Smack | smack-core/src/main/java/org/jivesoftware/smack/packet/Message.java | Message.addSubject | public Subject addSubject(String language, String subject) {
language = determineLanguage(language);
Subject messageSubject = new Subject(language, subject);
subjects.add(messageSubject);
return messageSubject;
} | java | public Subject addSubject(String language, String subject) {
language = determineLanguage(language);
Subject messageSubject = new Subject(language, subject);
subjects.add(messageSubject);
return messageSubject;
} | [
"public",
"Subject",
"addSubject",
"(",
"String",
"language",
",",
"String",
"subject",
")",
"{",
"language",
"=",
"determineLanguage",
"(",
"language",
")",
";",
"Subject",
"messageSubject",
"=",
"new",
"Subject",
"(",
"language",
",",
"subject",
")",
";",
... | Adds a subject with a corresponding language.
@param language the language of the subject being added.
@param subject the subject being added to the message.
@return the new {@link org.jivesoftware.smack.packet.Message.Subject}
@throws NullPointerException if the subject is null, a null pointer exception is thrown | [
"Adds",
"a",
"subject",
"with",
"a",
"corresponding",
"language",
"."
] | 870756997faec1e1bfabfac0cd6c2395b04da873 | https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-core/src/main/java/org/jivesoftware/smack/packet/Message.java#L237-L242 |
26,673 | igniterealtime/Smack | smack-core/src/main/java/org/jivesoftware/smack/packet/Message.java | Message.removeSubject | public boolean removeSubject(String language) {
language = determineLanguage(language);
for (Subject subject : subjects) {
if (language.equals(subject.language)) {
return subjects.remove(subject);
}
}
return false;
} | java | public boolean removeSubject(String language) {
language = determineLanguage(language);
for (Subject subject : subjects) {
if (language.equals(subject.language)) {
return subjects.remove(subject);
}
}
return false;
} | [
"public",
"boolean",
"removeSubject",
"(",
"String",
"language",
")",
"{",
"language",
"=",
"determineLanguage",
"(",
"language",
")",
";",
"for",
"(",
"Subject",
"subject",
":",
"subjects",
")",
"{",
"if",
"(",
"language",
".",
"equals",
"(",
"subject",
"... | Removes the subject with the given language from the message.
@param language the language of the subject which is to be removed
@return true if a subject was removed and false if it was not. | [
"Removes",
"the",
"subject",
"with",
"the",
"given",
"language",
"from",
"the",
"message",
"."
] | 870756997faec1e1bfabfac0cd6c2395b04da873 | https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-core/src/main/java/org/jivesoftware/smack/packet/Message.java#L250-L258 |
26,674 | igniterealtime/Smack | smack-core/src/main/java/org/jivesoftware/smack/packet/Message.java | Message.getSubjectLanguages | public List<String> getSubjectLanguages() {
Subject defaultSubject = getMessageSubject(null);
List<String> languages = new ArrayList<String>();
for (Subject subject : subjects) {
if (!subject.equals(defaultSubject)) {
languages.add(subject.language);
}
... | java | public List<String> getSubjectLanguages() {
Subject defaultSubject = getMessageSubject(null);
List<String> languages = new ArrayList<String>();
for (Subject subject : subjects) {
if (!subject.equals(defaultSubject)) {
languages.add(subject.language);
}
... | [
"public",
"List",
"<",
"String",
">",
"getSubjectLanguages",
"(",
")",
"{",
"Subject",
"defaultSubject",
"=",
"getMessageSubject",
"(",
"null",
")",
";",
"List",
"<",
"String",
">",
"languages",
"=",
"new",
"ArrayList",
"<",
"String",
">",
"(",
")",
";",
... | Returns all the languages being used for the subjects, not including the default subject.
@return the languages being used for the subjects. | [
"Returns",
"all",
"the",
"languages",
"being",
"used",
"for",
"the",
"subjects",
"not",
"including",
"the",
"default",
"subject",
"."
] | 870756997faec1e1bfabfac0cd6c2395b04da873 | https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-core/src/main/java/org/jivesoftware/smack/packet/Message.java#L275-L284 |
26,675 | igniterealtime/Smack | smack-core/src/main/java/org/jivesoftware/smack/packet/Message.java | Message.setBody | public void setBody(CharSequence body) {
String bodyString;
if (body != null) {
bodyString = body.toString();
} else {
bodyString = null;
}
setBody(bodyString);
} | java | public void setBody(CharSequence body) {
String bodyString;
if (body != null) {
bodyString = body.toString();
} else {
bodyString = null;
}
setBody(bodyString);
} | [
"public",
"void",
"setBody",
"(",
"CharSequence",
"body",
")",
"{",
"String",
"bodyString",
";",
"if",
"(",
"body",
"!=",
"null",
")",
"{",
"bodyString",
"=",
"body",
".",
"toString",
"(",
")",
";",
"}",
"else",
"{",
"bodyString",
"=",
"null",
";",
"... | Sets the body of the message.
@param body the body of the message.
@see #setBody(String)
@since 4.2 | [
"Sets",
"the",
"body",
"of",
"the",
"message",
"."
] | 870756997faec1e1bfabfac0cd6c2395b04da873 | https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-core/src/main/java/org/jivesoftware/smack/packet/Message.java#L348-L356 |
26,676 | igniterealtime/Smack | smack-core/src/main/java/org/jivesoftware/smack/packet/Message.java | Message.addBody | public Body addBody(String language, String body) {
language = determineLanguage(language);
removeBody(language);
Body messageBody = new Body(language, body);
addExtension(messageBody);
return messageBody;
} | java | public Body addBody(String language, String body) {
language = determineLanguage(language);
removeBody(language);
Body messageBody = new Body(language, body);
addExtension(messageBody);
return messageBody;
} | [
"public",
"Body",
"addBody",
"(",
"String",
"language",
",",
"String",
"body",
")",
"{",
"language",
"=",
"determineLanguage",
"(",
"language",
")",
";",
"removeBody",
"(",
"language",
")",
";",
"Body",
"messageBody",
"=",
"new",
"Body",
"(",
"language",
"... | Adds a body with a corresponding language.
@param language the language of the body being added.
@param body the body being added to the message.
@return the new {@link org.jivesoftware.smack.packet.Message.Body}
@throws NullPointerException if the body is null, a null pointer exception is thrown
@since 3.0.2 | [
"Adds",
"a",
"body",
"with",
"a",
"corresponding",
"language",
"."
] | 870756997faec1e1bfabfac0cd6c2395b04da873 | https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-core/src/main/java/org/jivesoftware/smack/packet/Message.java#L380-L388 |
26,677 | igniterealtime/Smack | smack-core/src/main/java/org/jivesoftware/smack/packet/Message.java | Message.removeBody | public boolean removeBody(String language) {
language = determineLanguage(language);
for (Body body : getBodies()) {
String bodyLanguage = body.getLanguage();
if (Objects.equals(bodyLanguage, language)) {
removeExtension(body);
return true;
... | java | public boolean removeBody(String language) {
language = determineLanguage(language);
for (Body body : getBodies()) {
String bodyLanguage = body.getLanguage();
if (Objects.equals(bodyLanguage, language)) {
removeExtension(body);
return true;
... | [
"public",
"boolean",
"removeBody",
"(",
"String",
"language",
")",
"{",
"language",
"=",
"determineLanguage",
"(",
"language",
")",
";",
"for",
"(",
"Body",
"body",
":",
"getBodies",
"(",
")",
")",
"{",
"String",
"bodyLanguage",
"=",
"body",
".",
"getLangu... | Removes the body with the given language from the message.
@param language the language of the body which is to be removed
@return true if a body was removed and false if it was not. | [
"Removes",
"the",
"body",
"with",
"the",
"given",
"language",
"from",
"the",
"message",
"."
] | 870756997faec1e1bfabfac0cd6c2395b04da873 | https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-core/src/main/java/org/jivesoftware/smack/packet/Message.java#L396-L406 |
26,678 | igniterealtime/Smack | smack-core/src/main/java/org/jivesoftware/smack/packet/Message.java | Message.getBodyLanguages | public List<String> getBodyLanguages() {
Body defaultBody = getMessageBody(null);
List<String> languages = new ArrayList<String>();
for (Body body : getBodies()) {
if (!body.equals(defaultBody)) {
languages.add(body.language);
}
}
return Co... | java | public List<String> getBodyLanguages() {
Body defaultBody = getMessageBody(null);
List<String> languages = new ArrayList<String>();
for (Body body : getBodies()) {
if (!body.equals(defaultBody)) {
languages.add(body.language);
}
}
return Co... | [
"public",
"List",
"<",
"String",
">",
"getBodyLanguages",
"(",
")",
"{",
"Body",
"defaultBody",
"=",
"getMessageBody",
"(",
"null",
")",
";",
"List",
"<",
"String",
">",
"languages",
"=",
"new",
"ArrayList",
"<",
"String",
">",
"(",
")",
";",
"for",
"(... | Returns all the languages being used for the bodies, not including the default body.
@return the languages being used for the bodies.
@since 3.0.2 | [
"Returns",
"all",
"the",
"languages",
"being",
"used",
"for",
"the",
"bodies",
"not",
"including",
"the",
"default",
"body",
"."
] | 870756997faec1e1bfabfac0cd6c2395b04da873 | https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-core/src/main/java/org/jivesoftware/smack/packet/Message.java#L426-L435 |
26,679 | igniterealtime/Smack | smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/provider/JingleContentProvider.java | JingleContentProvider.parse | @Override
public JingleContent parse(XmlPullParser parser, int initialDepth, XmlEnvironment xmlEnvironment) {
String elementName = parser.getName();
String creator = parser.getAttributeValue("", JingleContent.CREATOR);
String name = parser.getAttributeValue("", JingleContent.NAME);
... | java | @Override
public JingleContent parse(XmlPullParser parser, int initialDepth, XmlEnvironment xmlEnvironment) {
String elementName = parser.getName();
String creator = parser.getAttributeValue("", JingleContent.CREATOR);
String name = parser.getAttributeValue("", JingleContent.NAME);
... | [
"@",
"Override",
"public",
"JingleContent",
"parse",
"(",
"XmlPullParser",
"parser",
",",
"int",
"initialDepth",
",",
"XmlEnvironment",
"xmlEnvironment",
")",
"{",
"String",
"elementName",
"=",
"parser",
".",
"getName",
"(",
")",
";",
"String",
"creator",
"=",
... | Parse a JingleContent extension. | [
"Parse",
"a",
"JingleContent",
"extension",
"."
] | 870756997faec1e1bfabfac0cd6c2395b04da873 | https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/provider/JingleContentProvider.java#L36-L44 |
26,680 | igniterealtime/Smack | smack-tcp/src/main/java/org/jivesoftware/smack/sm/SMUtils.java | SMUtils.calculateDelta | public static long calculateDelta(long reportedHandledCount, long lastKnownHandledCount) {
if (lastKnownHandledCount > reportedHandledCount) {
throw new IllegalStateException("Illegal Stream Management State: Last known handled count (" + lastKnownHandledCount + ") is greater than reported handled c... | java | public static long calculateDelta(long reportedHandledCount, long lastKnownHandledCount) {
if (lastKnownHandledCount > reportedHandledCount) {
throw new IllegalStateException("Illegal Stream Management State: Last known handled count (" + lastKnownHandledCount + ") is greater than reported handled c... | [
"public",
"static",
"long",
"calculateDelta",
"(",
"long",
"reportedHandledCount",
",",
"long",
"lastKnownHandledCount",
")",
"{",
"if",
"(",
"lastKnownHandledCount",
">",
"reportedHandledCount",
")",
"{",
"throw",
"new",
"IllegalStateException",
"(",
"\"Illegal Stream ... | Calculates the delta of the last known stanza handled count and the new
reported stanza handled count while considering that the new value may be
wrapped after 2^32-1.
@param reportedHandledCount
@param lastKnownHandledCount
@return the delta | [
"Calculates",
"the",
"delta",
"of",
"the",
"last",
"known",
"stanza",
"handled",
"count",
"and",
"the",
"new",
"reported",
"stanza",
"handled",
"count",
"while",
"considering",
"that",
"the",
"new",
"value",
"may",
"be",
"wrapped",
"after",
"2^32",
"-",
"1",... | 870756997faec1e1bfabfac0cd6c2395b04da873 | https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-tcp/src/main/java/org/jivesoftware/smack/sm/SMUtils.java#L49-L54 |
26,681 | igniterealtime/Smack | smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/JingleSessionRequest.java | JingleSessionRequest.accept | public synchronized JingleSession accept() throws XMPPException, SmackException, InterruptedException {
JingleSession session;
synchronized (manager) {
session = manager.createIncomingJingleSession(this);
// Acknowledge the IQ reception
session.setSid(this.getSessionI... | java | public synchronized JingleSession accept() throws XMPPException, SmackException, InterruptedException {
JingleSession session;
synchronized (manager) {
session = manager.createIncomingJingleSession(this);
// Acknowledge the IQ reception
session.setSid(this.getSessionI... | [
"public",
"synchronized",
"JingleSession",
"accept",
"(",
")",
"throws",
"XMPPException",
",",
"SmackException",
",",
"InterruptedException",
"{",
"JingleSession",
"session",
";",
"synchronized",
"(",
"manager",
")",
"{",
"session",
"=",
"manager",
".",
"createIncom... | Accepts this request and creates the incoming Jingle session.
@return Returns the IncomingJingleSession on which the
negotiation can be carried out.
@throws SmackException
@throws InterruptedException | [
"Accepts",
"this",
"request",
"and",
"creates",
"the",
"incoming",
"Jingle",
"session",
"."
] | 870756997faec1e1bfabfac0cd6c2395b04da873 | https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/JingleSessionRequest.java#L115-L126 |
26,682 | igniterealtime/Smack | smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/JingleSessionRequest.java | JingleSessionRequest.reject | public synchronized void reject() {
JingleSession session;
synchronized (manager) {
try {
session = manager.createIncomingJingleSession(this);
// Acknowledge the IQ reception
session.setSid(this.getSessionID());
// session.sendA... | java | public synchronized void reject() {
JingleSession session;
synchronized (manager) {
try {
session = manager.createIncomingJingleSession(this);
// Acknowledge the IQ reception
session.setSid(this.getSessionID());
// session.sendA... | [
"public",
"synchronized",
"void",
"reject",
"(",
")",
"{",
"JingleSession",
"session",
";",
"synchronized",
"(",
"manager",
")",
"{",
"try",
"{",
"session",
"=",
"manager",
".",
"createIncomingJingleSession",
"(",
"this",
")",
";",
"// Acknowledge the IQ reception... | Rejects the session request. | [
"Rejects",
"the",
"session",
"request",
"."
] | 870756997faec1e1bfabfac0cd6c2395b04da873 | https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/JingleSessionRequest.java#L131-L145 |
26,683 | igniterealtime/Smack | smack-extensions/src/main/java/org/jivesoftware/smackx/disco/packet/DiscoverInfo.java | DiscoverInfo.addFeatures | public void addFeatures(Collection<String> featuresToAdd) {
if (featuresToAdd == null) return;
for (String feature : featuresToAdd) {
addFeature(feature);
}
} | java | public void addFeatures(Collection<String> featuresToAdd) {
if (featuresToAdd == null) return;
for (String feature : featuresToAdd) {
addFeature(feature);
}
} | [
"public",
"void",
"addFeatures",
"(",
"Collection",
"<",
"String",
">",
"featuresToAdd",
")",
"{",
"if",
"(",
"featuresToAdd",
"==",
"null",
")",
"return",
";",
"for",
"(",
"String",
"feature",
":",
"featuresToAdd",
")",
"{",
"addFeature",
"(",
"feature",
... | Adds a collection of features to the packet. Does noting if featuresToAdd is null.
@param featuresToAdd | [
"Adds",
"a",
"collection",
"of",
"features",
"to",
"the",
"packet",
".",
"Does",
"noting",
"if",
"featuresToAdd",
"is",
"null",
"."
] | 870756997faec1e1bfabfac0cd6c2395b04da873 | https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-extensions/src/main/java/org/jivesoftware/smackx/disco/packet/DiscoverInfo.java#L96-L101 |
26,684 | igniterealtime/Smack | smack-extensions/src/main/java/org/jivesoftware/smackx/disco/packet/DiscoverInfo.java | DiscoverInfo.addIdentity | public void addIdentity(Identity identity) {
identities.add(identity);
identitiesSet.add(identity.getKey());
} | java | public void addIdentity(Identity identity) {
identities.add(identity);
identitiesSet.add(identity.getKey());
} | [
"public",
"void",
"addIdentity",
"(",
"Identity",
"identity",
")",
"{",
"identities",
".",
"add",
"(",
"identity",
")",
";",
"identitiesSet",
".",
"add",
"(",
"identity",
".",
"getKey",
"(",
")",
")",
";",
"}"
] | Adds a new identity of the requested entity to the discovered information.
@param identity the discovered entity's identity | [
"Adds",
"a",
"new",
"identity",
"of",
"the",
"requested",
"entity",
"to",
"the",
"discovered",
"information",
"."
] | 870756997faec1e1bfabfac0cd6c2395b04da873 | https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-extensions/src/main/java/org/jivesoftware/smackx/disco/packet/DiscoverInfo.java#L126-L129 |
26,685 | igniterealtime/Smack | smack-extensions/src/main/java/org/jivesoftware/smackx/disco/packet/DiscoverInfo.java | DiscoverInfo.addIdentities | public void addIdentities(Collection<Identity> identitiesToAdd) {
if (identitiesToAdd == null) return;
for (Identity identity : identitiesToAdd) {
addIdentity(identity);
}
} | java | public void addIdentities(Collection<Identity> identitiesToAdd) {
if (identitiesToAdd == null) return;
for (Identity identity : identitiesToAdd) {
addIdentity(identity);
}
} | [
"public",
"void",
"addIdentities",
"(",
"Collection",
"<",
"Identity",
">",
"identitiesToAdd",
")",
"{",
"if",
"(",
"identitiesToAdd",
"==",
"null",
")",
"return",
";",
"for",
"(",
"Identity",
"identity",
":",
"identitiesToAdd",
")",
"{",
"addIdentity",
"(",
... | Adds identities to the DiscoverInfo stanza.
@param identitiesToAdd | [
"Adds",
"identities",
"to",
"the",
"DiscoverInfo",
"stanza",
"."
] | 870756997faec1e1bfabfac0cd6c2395b04da873 | https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-extensions/src/main/java/org/jivesoftware/smackx/disco/packet/DiscoverInfo.java#L136-L141 |
26,686 | igniterealtime/Smack | smack-extensions/src/main/java/org/jivesoftware/smackx/disco/packet/DiscoverInfo.java | DiscoverInfo.hasIdentity | public boolean hasIdentity(String category, String type) {
String key = XmppStringUtils.generateKey(category, type);
return identitiesSet.contains(key);
} | java | public boolean hasIdentity(String category, String type) {
String key = XmppStringUtils.generateKey(category, type);
return identitiesSet.contains(key);
} | [
"public",
"boolean",
"hasIdentity",
"(",
"String",
"category",
",",
"String",
"type",
")",
"{",
"String",
"key",
"=",
"XmppStringUtils",
".",
"generateKey",
"(",
"category",
",",
"type",
")",
";",
"return",
"identitiesSet",
".",
"contains",
"(",
"key",
")",
... | Returns true if this DiscoverInfo contains at least one Identity of the given category and type.
@param category the category to look for.
@param type the type to look for.
@return true if this DiscoverInfo contains a Identity of the given category and type. | [
"Returns",
"true",
"if",
"this",
"DiscoverInfo",
"contains",
"at",
"least",
"one",
"Identity",
"of",
"the",
"given",
"category",
"and",
"type",
"."
] | 870756997faec1e1bfabfac0cd6c2395b04da873 | https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-extensions/src/main/java/org/jivesoftware/smackx/disco/packet/DiscoverInfo.java#L159-L162 |
26,687 | igniterealtime/Smack | smack-extensions/src/main/java/org/jivesoftware/smackx/disco/packet/DiscoverInfo.java | DiscoverInfo.getIdentities | public List<Identity> getIdentities(String category, String type) {
List<Identity> res = new ArrayList<>(identities.size());
for (Identity identity : identities) {
if (identity.getCategory().equals(category) && identity.getType().equals(type)) {
res.add(identity);
... | java | public List<Identity> getIdentities(String category, String type) {
List<Identity> res = new ArrayList<>(identities.size());
for (Identity identity : identities) {
if (identity.getCategory().equals(category) && identity.getType().equals(type)) {
res.add(identity);
... | [
"public",
"List",
"<",
"Identity",
">",
"getIdentities",
"(",
"String",
"category",
",",
"String",
"type",
")",
"{",
"List",
"<",
"Identity",
">",
"res",
"=",
"new",
"ArrayList",
"<>",
"(",
"identities",
".",
"size",
"(",
")",
")",
";",
"for",
"(",
"... | Returns all Identities of the given category and type of this DiscoverInfo.
@param category category the category to look for.
@param type type the type to look for.
@return a list of Identites with the given category and type. | [
"Returns",
"all",
"Identities",
"of",
"the",
"given",
"category",
"and",
"type",
"of",
"this",
"DiscoverInfo",
"."
] | 870756997faec1e1bfabfac0cd6c2395b04da873 | https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-extensions/src/main/java/org/jivesoftware/smackx/disco/packet/DiscoverInfo.java#L171-L179 |
26,688 | igniterealtime/Smack | smack-extensions/src/main/java/org/jivesoftware/smackx/disco/packet/DiscoverInfo.java | DiscoverInfo.containsDuplicateIdentities | public boolean containsDuplicateIdentities() {
List<Identity> checkedIdentities = new LinkedList<>();
for (Identity i : identities) {
for (Identity i2 : checkedIdentities) {
if (i.equals(i2))
return true;
}
checkedIdentities.add(i);... | java | public boolean containsDuplicateIdentities() {
List<Identity> checkedIdentities = new LinkedList<>();
for (Identity i : identities) {
for (Identity i2 : checkedIdentities) {
if (i.equals(i2))
return true;
}
checkedIdentities.add(i);... | [
"public",
"boolean",
"containsDuplicateIdentities",
"(",
")",
"{",
"List",
"<",
"Identity",
">",
"checkedIdentities",
"=",
"new",
"LinkedList",
"<>",
"(",
")",
";",
"for",
"(",
"Identity",
"i",
":",
"identities",
")",
"{",
"for",
"(",
"Identity",
"i2",
":"... | Test if a DiscoverInfo response contains duplicate identities.
@return true if duplicate identities where found, otherwise false | [
"Test",
"if",
"a",
"DiscoverInfo",
"response",
"contains",
"duplicate",
"identities",
"."
] | 870756997faec1e1bfabfac0cd6c2395b04da873 | https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-extensions/src/main/java/org/jivesoftware/smackx/disco/packet/DiscoverInfo.java#L236-L246 |
26,689 | igniterealtime/Smack | smack-im/src/main/java/org/jivesoftware/smack/roster/RosterEntry.java | RosterEntry.setName | public synchronized void setName(String name) throws NotConnectedException, NoResponseException, XMPPErrorException, InterruptedException {
// Do nothing if the name hasn't changed.
if (name != null && name.equals(getName())) {
return;
}
RosterPacket packet = new RosterPacke... | java | public synchronized void setName(String name) throws NotConnectedException, NoResponseException, XMPPErrorException, InterruptedException {
// Do nothing if the name hasn't changed.
if (name != null && name.equals(getName())) {
return;
}
RosterPacket packet = new RosterPacke... | [
"public",
"synchronized",
"void",
"setName",
"(",
"String",
"name",
")",
"throws",
"NotConnectedException",
",",
"NoResponseException",
",",
"XMPPErrorException",
",",
"InterruptedException",
"{",
"// Do nothing if the name hasn't changed.",
"if",
"(",
"name",
"!=",
"null... | Sets the name associated with this entry.
@param name the name.
@throws NotConnectedException
@throws XMPPErrorException
@throws NoResponseException
@throws InterruptedException | [
"Sets",
"the",
"name",
"associated",
"with",
"this",
"entry",
"."
] | 870756997faec1e1bfabfac0cd6c2395b04da873 | https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-im/src/main/java/org/jivesoftware/smack/roster/RosterEntry.java#L101-L117 |
26,690 | igniterealtime/Smack | smack-im/src/main/java/org/jivesoftware/smack/roster/RosterEntry.java | RosterEntry.getGroups | public List<RosterGroup> getGroups() {
List<RosterGroup> results = new ArrayList<>();
// Loop through all roster groups and find the ones that contain this
// entry. This algorithm should be fine
for (RosterGroup group : roster.getGroups()) {
if (group.contains(this)) {
... | java | public List<RosterGroup> getGroups() {
List<RosterGroup> results = new ArrayList<>();
// Loop through all roster groups and find the ones that contain this
// entry. This algorithm should be fine
for (RosterGroup group : roster.getGroups()) {
if (group.contains(this)) {
... | [
"public",
"List",
"<",
"RosterGroup",
">",
"getGroups",
"(",
")",
"{",
"List",
"<",
"RosterGroup",
">",
"results",
"=",
"new",
"ArrayList",
"<>",
"(",
")",
";",
"// Loop through all roster groups and find the ones that contain this",
"// entry. This algorithm should be fi... | Returns an copied list of the roster groups that this entry belongs to.
@return an iterator for the groups this entry belongs to. | [
"Returns",
"an",
"copied",
"list",
"of",
"the",
"roster",
"groups",
"that",
"this",
"entry",
"belongs",
"to",
"."
] | 870756997faec1e1bfabfac0cd6c2395b04da873 | https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-im/src/main/java/org/jivesoftware/smack/roster/RosterEntry.java#L143-L153 |
26,691 | igniterealtime/Smack | smack-im/src/main/java/org/jivesoftware/smack/roster/RosterEntry.java | RosterEntry.cancelSubscription | public void cancelSubscription() throws NotConnectedException, InterruptedException {
Presence unsubscribed = new Presence(item.getJid(), Type.unsubscribed);
connection().sendStanza(unsubscribed);
} | java | public void cancelSubscription() throws NotConnectedException, InterruptedException {
Presence unsubscribed = new Presence(item.getJid(), Type.unsubscribed);
connection().sendStanza(unsubscribed);
} | [
"public",
"void",
"cancelSubscription",
"(",
")",
"throws",
"NotConnectedException",
",",
"InterruptedException",
"{",
"Presence",
"unsubscribed",
"=",
"new",
"Presence",
"(",
"item",
".",
"getJid",
"(",
")",
",",
"Type",
".",
"unsubscribed",
")",
";",
"connecti... | Cancel the presence subscription the XMPP entity representing this roster entry has with us.
@throws NotConnectedException
@throws InterruptedException
@since 4.2 | [
"Cancel",
"the",
"presence",
"subscription",
"the",
"XMPP",
"entity",
"representing",
"this",
"roster",
"entry",
"has",
"with",
"us",
"."
] | 870756997faec1e1bfabfac0cd6c2395b04da873 | https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-im/src/main/java/org/jivesoftware/smack/roster/RosterEntry.java#L219-L222 |
26,692 | igniterealtime/Smack | smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/media/MediaNegotiator.java | MediaNegotiator.receiveContentAcceptAction | private IQ receiveContentAcceptAction(Jingle jingle, JingleDescription description) throws XMPPException, NotConnectedException, InterruptedException {
IQ response;
List<PayloadType> offeredPayloads = description.getAudioPayloadTypesList();
bestCommonAudioPt = calculateBestCommonAudioPt(offered... | java | private IQ receiveContentAcceptAction(Jingle jingle, JingleDescription description) throws XMPPException, NotConnectedException, InterruptedException {
IQ response;
List<PayloadType> offeredPayloads = description.getAudioPayloadTypesList();
bestCommonAudioPt = calculateBestCommonAudioPt(offered... | [
"private",
"IQ",
"receiveContentAcceptAction",
"(",
"Jingle",
"jingle",
",",
"JingleDescription",
"description",
")",
"throws",
"XMPPException",
",",
"NotConnectedException",
",",
"InterruptedException",
"{",
"IQ",
"response",
";",
"List",
"<",
"PayloadType",
">",
"of... | The other side has sent us a content-accept. The payload types in that message may not match with what
we sent, but XEP-167 says that the other side should retain the order of the payload types we first sent.
This means we can walk through our list, in order, until we find one from their list that matches. This
will... | [
"The",
"other",
"side",
"has",
"sent",
"us",
"a",
"content",
"-",
"accept",
".",
"The",
"payload",
"types",
"in",
"that",
"message",
"may",
"not",
"match",
"with",
"what",
"we",
"sent",
"but",
"XEP",
"-",
"167",
"says",
"that",
"the",
"other",
"side",
... | 870756997faec1e1bfabfac0cd6c2395b04da873 | https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/media/MediaNegotiator.java#L210-L231 |
26,693 | igniterealtime/Smack | smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/media/MediaNegotiator.java | MediaNegotiator.receiveSessionInitiateAction | private IQ receiveSessionInitiateAction(Jingle jingle, JingleDescription description) {
IQ response = null;
List<PayloadType> offeredPayloads = description.getAudioPayloadTypesList();
bestCommonAudioPt = calculateBestCommonAudioPt(offeredPayloads);
synchronized (remoteAudioPts) {
... | java | private IQ receiveSessionInitiateAction(Jingle jingle, JingleDescription description) {
IQ response = null;
List<PayloadType> offeredPayloads = description.getAudioPayloadTypesList();
bestCommonAudioPt = calculateBestCommonAudioPt(offeredPayloads);
synchronized (remoteAudioPts) {
... | [
"private",
"IQ",
"receiveSessionInitiateAction",
"(",
"Jingle",
"jingle",
",",
"JingleDescription",
"description",
")",
"{",
"IQ",
"response",
"=",
"null",
";",
"List",
"<",
"PayloadType",
">",
"offeredPayloads",
"=",
"description",
".",
"getAudioPayloadTypesList",
... | Receive a session-initiate packet.
@param jingle
@param description
@return the iq | [
"Receive",
"a",
"session",
"-",
"initiate",
"packet",
"."
] | 870756997faec1e1bfabfac0cd6c2395b04da873 | https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/media/MediaNegotiator.java#L239-L260 |
26,694 | igniterealtime/Smack | smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/media/MediaNegotiator.java | MediaNegotiator.receiveSessionInfoAction | private IQ receiveSessionInfoAction(Jingle jingle, JingleDescription description) throws JingleException {
IQ response = null;
PayloadType oldBestCommonAudioPt = bestCommonAudioPt;
List<PayloadType> offeredPayloads;
boolean ptChange = false;
offeredPayloads = description.getAudi... | java | private IQ receiveSessionInfoAction(Jingle jingle, JingleDescription description) throws JingleException {
IQ response = null;
PayloadType oldBestCommonAudioPt = bestCommonAudioPt;
List<PayloadType> offeredPayloads;
boolean ptChange = false;
offeredPayloads = description.getAudi... | [
"private",
"IQ",
"receiveSessionInfoAction",
"(",
"Jingle",
"jingle",
",",
"JingleDescription",
"description",
")",
"throws",
"JingleException",
"{",
"IQ",
"response",
"=",
"null",
";",
"PayloadType",
"oldBestCommonAudioPt",
"=",
"bestCommonAudioPt",
";",
"List",
"<",... | A content info has been received. This is done for publishing the
list of payload types...
@param jingle
The input packet
@return a Jingle packet
@throws JingleException | [
"A",
"content",
"info",
"has",
"been",
"received",
".",
"This",
"is",
"done",
"for",
"publishing",
"the",
"list",
"of",
"payload",
"types",
"..."
] | 870756997faec1e1bfabfac0cd6c2395b04da873 | https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/media/MediaNegotiator.java#L271-L300 |
26,695 | igniterealtime/Smack | smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/media/MediaNegotiator.java | MediaNegotiator.receiveSessionAcceptAction | private IQ receiveSessionAcceptAction(Jingle jingle, JingleDescription description) throws JingleException {
IQ response = null;
PayloadType.Audio agreedCommonAudioPt;
if (bestCommonAudioPt == null) {
// Update the best common audio PT
bestCommonAudioPt = calculateBestCo... | java | private IQ receiveSessionAcceptAction(Jingle jingle, JingleDescription description) throws JingleException {
IQ response = null;
PayloadType.Audio agreedCommonAudioPt;
if (bestCommonAudioPt == null) {
// Update the best common audio PT
bestCommonAudioPt = calculateBestCo... | [
"private",
"IQ",
"receiveSessionAcceptAction",
"(",
"Jingle",
"jingle",
",",
"JingleDescription",
"description",
")",
"throws",
"JingleException",
"{",
"IQ",
"response",
"=",
"null",
";",
"PayloadType",
".",
"Audio",
"agreedCommonAudioPt",
";",
"if",
"(",
"bestCommo... | A jmf description has been accepted. In this case, we must save the
accepted payload type and notify any listener...
@param jin
The input packet
@return a Jingle packet
@throws JingleException | [
"A",
"jmf",
"description",
"has",
"been",
"accepted",
".",
"In",
"this",
"case",
"we",
"must",
"save",
"the",
"accepted",
"payload",
"type",
"and",
"notify",
"any",
"listener",
"..."
] | 870756997faec1e1bfabfac0cd6c2395b04da873 | https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/media/MediaNegotiator.java#L311-L339 |
26,696 | igniterealtime/Smack | smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/media/MediaNegotiator.java | MediaNegotiator.addRemoteAudioPayloadType | public void addRemoteAudioPayloadType(PayloadType.Audio pt) {
if (pt != null) {
synchronized (remoteAudioPts) {
remoteAudioPts.add(pt);
}
}
} | java | public void addRemoteAudioPayloadType(PayloadType.Audio pt) {
if (pt != null) {
synchronized (remoteAudioPts) {
remoteAudioPts.add(pt);
}
}
} | [
"public",
"void",
"addRemoteAudioPayloadType",
"(",
"PayloadType",
".",
"Audio",
"pt",
")",
"{",
"if",
"(",
"pt",
"!=",
"null",
")",
"{",
"synchronized",
"(",
"remoteAudioPts",
")",
"{",
"remoteAudioPts",
".",
"add",
"(",
"pt",
")",
";",
"}",
"}",
"}"
] | Adds a payload type to the list of remote payloads.
@param pt
the remote payload type | [
"Adds",
"a",
"payload",
"type",
"to",
"the",
"list",
"of",
"remote",
"payloads",
"."
] | 870756997faec1e1bfabfac0cd6c2395b04da873 | https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/media/MediaNegotiator.java#L414-L420 |
26,697 | igniterealtime/Smack | smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/media/MediaNegotiator.java | MediaNegotiator.triggerMediaClosed | protected void triggerMediaClosed(PayloadType currPt) {
List<JingleListener> listeners = getListenersList();
for (JingleListener li : listeners) {
if (li instanceof JingleMediaListener) {
JingleMediaListener mli = (JingleMediaListener) li;
mli.mediaClosed(curr... | java | protected void triggerMediaClosed(PayloadType currPt) {
List<JingleListener> listeners = getListenersList();
for (JingleListener li : listeners) {
if (li instanceof JingleMediaListener) {
JingleMediaListener mli = (JingleMediaListener) li;
mli.mediaClosed(curr... | [
"protected",
"void",
"triggerMediaClosed",
"(",
"PayloadType",
"currPt",
")",
"{",
"List",
"<",
"JingleListener",
">",
"listeners",
"=",
"getListenersList",
"(",
")",
";",
"for",
"(",
"JingleListener",
"li",
":",
"listeners",
")",
"{",
"if",
"(",
"li",
"inst... | Trigger a jmf closed event.
@param currPt
current payload type that is cancelled. | [
"Trigger",
"a",
"jmf",
"closed",
"event",
"."
] | 870756997faec1e1bfabfac0cd6c2395b04da873 | https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/media/MediaNegotiator.java#L498-L506 |
26,698 | igniterealtime/Smack | smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/media/MediaNegotiator.java | MediaNegotiator.getJingleDescription | public JingleDescription getJingleDescription() {
JingleDescription result = null;
PayloadType payloadType = getBestCommonAudioPt();
if (payloadType != null) {
result = new JingleDescription.Audio(payloadType);
} else {
// If we haven't settled on a best payload t... | java | public JingleDescription getJingleDescription() {
JingleDescription result = null;
PayloadType payloadType = getBestCommonAudioPt();
if (payloadType != null) {
result = new JingleDescription.Audio(payloadType);
} else {
// If we haven't settled on a best payload t... | [
"public",
"JingleDescription",
"getJingleDescription",
"(",
")",
"{",
"JingleDescription",
"result",
"=",
"null",
";",
"PayloadType",
"payloadType",
"=",
"getBestCommonAudioPt",
"(",
")",
";",
"if",
"(",
"payloadType",
"!=",
"null",
")",
"{",
"result",
"=",
"new... | Create a JingleDescription that matches this negotiator. | [
"Create",
"a",
"JingleDescription",
"that",
"matches",
"this",
"negotiator",
"."
] | 870756997faec1e1bfabfac0cd6c2395b04da873 | https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/media/MediaNegotiator.java#L528-L539 |
26,699 | igniterealtime/Smack | smack-im/src/main/java/org/jivesoftware/smack/chat/ChatManager.java | ChatManager.getInstanceFor | public static synchronized ChatManager getInstanceFor(XMPPConnection connection) {
ChatManager manager = INSTANCES.get(connection);
if (manager == null)
manager = new ChatManager(connection);
return manager;
} | java | public static synchronized ChatManager getInstanceFor(XMPPConnection connection) {
ChatManager manager = INSTANCES.get(connection);
if (manager == null)
manager = new ChatManager(connection);
return manager;
} | [
"public",
"static",
"synchronized",
"ChatManager",
"getInstanceFor",
"(",
"XMPPConnection",
"connection",
")",
"{",
"ChatManager",
"manager",
"=",
"INSTANCES",
".",
"get",
"(",
"connection",
")",
";",
"if",
"(",
"manager",
"==",
"null",
")",
"manager",
"=",
"n... | Returns the ChatManager instance associated with a given XMPPConnection.
@param connection the connection used to look for the proper ServiceDiscoveryManager.
@return the ChatManager associated with a given XMPPConnection. | [
"Returns",
"the",
"ChatManager",
"instance",
"associated",
"with",
"a",
"given",
"XMPPConnection",
"."
] | 870756997faec1e1bfabfac0cd6c2395b04da873 | https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-im/src/main/java/org/jivesoftware/smack/chat/ChatManager.java#L82-L87 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.