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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
145,600 | respoke/respoke-sdk-android | respokeSDK/src/main/java/com/digium/respokesdk/RespokeClient.java | RespokeClient.unregisterFromPushServices | public void unregisterFromPushServices(final Respoke.TaskCompletionListener completionListener) {
if (isConnected()) {
SharedPreferences prefs = appContext.getSharedPreferences(appContext.getPackageName(), Context.MODE_PRIVATE);
if (null != prefs) {
String lastKnownPushT... | java | public void unregisterFromPushServices(final Respoke.TaskCompletionListener completionListener) {
if (isConnected()) {
SharedPreferences prefs = appContext.getSharedPreferences(appContext.getPackageName(), Context.MODE_PRIVATE);
if (null != prefs) {
String lastKnownPushT... | [
"public",
"void",
"unregisterFromPushServices",
"(",
"final",
"Respoke",
".",
"TaskCompletionListener",
"completionListener",
")",
"{",
"if",
"(",
"isConnected",
"(",
")",
")",
"{",
"SharedPreferences",
"prefs",
"=",
"appContext",
".",
"getSharedPreferences",
"(",
"... | Unregister this client from the push service so that no more notifications will be received for this endpoint ID
@param completionListener A listener to receive the notification on the success or failure of the asynchronous operation | [
"Unregister",
"this",
"client",
"from",
"the",
"push",
"service",
"so",
"that",
"no",
"more",
"notifications",
"will",
"be",
"received",
"for",
"this",
"endpoint",
"ID"
] | 34a15f0558d29b1f1bc8481bbc5c505e855e05ef | https://github.com/respoke/respoke-sdk-android/blob/34a15f0558d29b1f1bc8481bbc5c505e855e05ef/respokeSDK/src/main/java/com/digium/respokesdk/RespokeClient.java#L998-L1034 |
145,601 | respoke/respoke-sdk-android | respokeSDK/src/main/java/com/digium/respokesdk/RespokeClient.java | RespokeClient.postConnectError | private void postConnectError(final ConnectCompletionListener completionListener, final String errorMessage) {
new Handler(Looper.getMainLooper()).post(new Runnable() {
@Override
public void run() {
if (null != completionListener) {
completionListener.... | java | private void postConnectError(final ConnectCompletionListener completionListener, final String errorMessage) {
new Handler(Looper.getMainLooper()).post(new Runnable() {
@Override
public void run() {
if (null != completionListener) {
completionListener.... | [
"private",
"void",
"postConnectError",
"(",
"final",
"ConnectCompletionListener",
"completionListener",
",",
"final",
"String",
"errorMessage",
")",
"{",
"new",
"Handler",
"(",
"Looper",
".",
"getMainLooper",
"(",
")",
")",
".",
"post",
"(",
"new",
"Runnable",
"... | A convenience method for posting errors to a ConnectCompletionListener
@param completionListener The listener to notify
@param errorMessage The human-readable error message that occurred | [
"A",
"convenience",
"method",
"for",
"posting",
"errors",
"to",
"a",
"ConnectCompletionListener"
] | 34a15f0558d29b1f1bc8481bbc5c505e855e05ef | https://github.com/respoke/respoke-sdk-android/blob/34a15f0558d29b1f1bc8481bbc5c505e855e05ef/respokeSDK/src/main/java/com/digium/respokesdk/RespokeClient.java#L1072-L1081 |
145,602 | respoke/respoke-sdk-android | respokeSDK/src/main/java/com/digium/respokesdk/RespokeClient.java | RespokeClient.postJoinGroupMembersError | private void postJoinGroupMembersError(final JoinGroupCompletionListener completionListener, final String errorMessage) {
new Handler(Looper.getMainLooper()).post(new Runnable() {
@Override
public void run() {
if (null != completionListener) {
completi... | java | private void postJoinGroupMembersError(final JoinGroupCompletionListener completionListener, final String errorMessage) {
new Handler(Looper.getMainLooper()).post(new Runnable() {
@Override
public void run() {
if (null != completionListener) {
completi... | [
"private",
"void",
"postJoinGroupMembersError",
"(",
"final",
"JoinGroupCompletionListener",
"completionListener",
",",
"final",
"String",
"errorMessage",
")",
"{",
"new",
"Handler",
"(",
"Looper",
".",
"getMainLooper",
"(",
")",
")",
".",
"post",
"(",
"new",
"Run... | A convenience method for posting errors to a JoinGroupCompletionListener
@param completionListener The listener to notify
@param errorMessage The human-readable error message that occurred | [
"A",
"convenience",
"method",
"for",
"posting",
"errors",
"to",
"a",
"JoinGroupCompletionListener"
] | 34a15f0558d29b1f1bc8481bbc5c505e855e05ef | https://github.com/respoke/respoke-sdk-android/blob/34a15f0558d29b1f1bc8481bbc5c505e855e05ef/respokeSDK/src/main/java/com/digium/respokesdk/RespokeClient.java#L1089-L1098 |
145,603 | respoke/respoke-sdk-android | respokeSDK/src/main/java/com/digium/respokesdk/RespokeClient.java | RespokeClient.performReconnect | private void performReconnect() {
if (null != applicationID) {
reconnectCount++;
new java.util.Timer().schedule(
new java.util.TimerTask() {
@Override
public void run() {
actuallyReconnect();
... | java | private void performReconnect() {
if (null != applicationID) {
reconnectCount++;
new java.util.Timer().schedule(
new java.util.TimerTask() {
@Override
public void run() {
actuallyReconnect();
... | [
"private",
"void",
"performReconnect",
"(",
")",
"{",
"if",
"(",
"null",
"!=",
"applicationID",
")",
"{",
"reconnectCount",
"++",
";",
"new",
"java",
".",
"util",
".",
"Timer",
"(",
")",
".",
"schedule",
"(",
"new",
"java",
".",
"util",
".",
"TimerTask... | Attempt to reconnect the client after a small delay | [
"Attempt",
"to",
"reconnect",
"the",
"client",
"after",
"a",
"small",
"delay"
] | 34a15f0558d29b1f1bc8481bbc5c505e855e05ef | https://github.com/respoke/respoke-sdk-android/blob/34a15f0558d29b1f1bc8481bbc5c505e855e05ef/respokeSDK/src/main/java/com/digium/respokesdk/RespokeClient.java#L1139-L1153 |
145,604 | respoke/respoke-sdk-android | respokeSDK/src/main/java/com/digium/respokesdk/RespokeClient.java | RespokeClient.actuallyReconnect | private void actuallyReconnect() {
if (((null == signalingChannel) || !signalingChannel.connected) && reconnect) {
if (connectionInProgress) {
// The client app must have initiated a connection manually during the timeout period. Try again later
performReconnect();
... | java | private void actuallyReconnect() {
if (((null == signalingChannel) || !signalingChannel.connected) && reconnect) {
if (connectionInProgress) {
// The client app must have initiated a connection manually during the timeout period. Try again later
performReconnect();
... | [
"private",
"void",
"actuallyReconnect",
"(",
")",
"{",
"if",
"(",
"(",
"(",
"null",
"==",
"signalingChannel",
")",
"||",
"!",
"signalingChannel",
".",
"connected",
")",
"&&",
"reconnect",
")",
"{",
"if",
"(",
"connectionInProgress",
")",
"{",
"// The client ... | Attempt to reconnect the client if it is not already trying in another thread | [
"Attempt",
"to",
"reconnect",
"the",
"client",
"if",
"it",
"is",
"not",
"already",
"trying",
"in",
"another",
"thread"
] | 34a15f0558d29b1f1bc8481bbc5c505e855e05ef | https://github.com/respoke/respoke-sdk-android/blob/34a15f0558d29b1f1bc8481bbc5c505e855e05ef/respokeSDK/src/main/java/com/digium/respokesdk/RespokeClient.java#L1158-L1185 |
145,605 | respoke/respoke-sdk-android | respokeSDK/src/main/java/com/digium/respokesdk/RespokeClient.java | RespokeClient.buildGroupMessage | private RespokeGroupMessage buildGroupMessage(JSONObject source) throws JSONException {
if (source == null) {
throw new IllegalArgumentException("source cannot be null");
}
final JSONObject header = source.getJSONObject("header");
final String endpointID = header.getString("... | java | private RespokeGroupMessage buildGroupMessage(JSONObject source) throws JSONException {
if (source == null) {
throw new IllegalArgumentException("source cannot be null");
}
final JSONObject header = source.getJSONObject("header");
final String endpointID = header.getString("... | [
"private",
"RespokeGroupMessage",
"buildGroupMessage",
"(",
"JSONObject",
"source",
")",
"throws",
"JSONException",
"{",
"if",
"(",
"source",
"==",
"null",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"source cannot be null\"",
")",
";",
"}",
"final"... | Build a group message from a JSON object. The format of the JSON object would be the
format that comes over the wire from Respoke when receiving a pubsub message. This same
format is used when retrieving message history.
@param source The source JSON object to build the RespokeGroupMessage from
@return The built Respo... | [
"Build",
"a",
"group",
"message",
"from",
"a",
"JSON",
"object",
".",
"The",
"format",
"of",
"the",
"JSON",
"object",
"would",
"be",
"the",
"format",
"that",
"comes",
"over",
"the",
"wire",
"from",
"Respoke",
"when",
"receiving",
"a",
"pubsub",
"message",
... | 34a15f0558d29b1f1bc8481bbc5c505e855e05ef | https://github.com/respoke/respoke-sdk-android/blob/34a15f0558d29b1f1bc8481bbc5c505e855e05ef/respokeSDK/src/main/java/com/digium/respokesdk/RespokeClient.java#L1576-L1604 |
145,606 | respoke/respoke-sdk-android | respokeSDK/src/main/java/com/digium/respokesdk/RespokeDirectConnection.java | RespokeDirectConnection.setListener | public void setListener(Listener listener) {
if (null != listener) {
listenerReference = new WeakReference<Listener>(listener);
} else {
listenerReference = null;
}
} | java | public void setListener(Listener listener) {
if (null != listener) {
listenerReference = new WeakReference<Listener>(listener);
} else {
listenerReference = null;
}
} | [
"public",
"void",
"setListener",
"(",
"Listener",
"listener",
")",
"{",
"if",
"(",
"null",
"!=",
"listener",
")",
"{",
"listenerReference",
"=",
"new",
"WeakReference",
"<",
"Listener",
">",
"(",
"listener",
")",
";",
"}",
"else",
"{",
"listenerReference",
... | Set a receiver for the Listener interface
@param listener The new receiver for events from the Listener interface for this instance | [
"Set",
"a",
"receiver",
"for",
"the",
"Listener",
"interface"
] | 34a15f0558d29b1f1bc8481bbc5c505e855e05ef | https://github.com/respoke/respoke-sdk-android/blob/34a15f0558d29b1f1bc8481bbc5c505e855e05ef/respokeSDK/src/main/java/com/digium/respokesdk/RespokeDirectConnection.java#L92-L98 |
145,607 | respoke/respoke-sdk-android | respokeSDK/src/main/java/com/digium/respokesdk/RespokeDirectConnection.java | RespokeDirectConnection.accept | public void accept(Context context) {
if (null != callReference) {
RespokeCall call = callReference.get();
if (null != call) {
call.directConnectionDidAccept(context);
}
}
} | java | public void accept(Context context) {
if (null != callReference) {
RespokeCall call = callReference.get();
if (null != call) {
call.directConnectionDidAccept(context);
}
}
} | [
"public",
"void",
"accept",
"(",
"Context",
"context",
")",
"{",
"if",
"(",
"null",
"!=",
"callReference",
")",
"{",
"RespokeCall",
"call",
"=",
"callReference",
".",
"get",
"(",
")",
";",
"if",
"(",
"null",
"!=",
"call",
")",
"{",
"call",
".",
"dire... | Accept the direct connection and start the process of obtaining media.
@param context An application context with which to access system resources | [
"Accept",
"the",
"direct",
"connection",
"and",
"start",
"the",
"process",
"of",
"obtaining",
"media",
"."
] | 34a15f0558d29b1f1bc8481bbc5c505e855e05ef | https://github.com/respoke/respoke-sdk-android/blob/34a15f0558d29b1f1bc8481bbc5c505e855e05ef/respokeSDK/src/main/java/com/digium/respokesdk/RespokeDirectConnection.java#L106-L113 |
145,608 | respoke/respoke-sdk-android | respokeSDK/src/main/java/com/digium/respokesdk/RespokeDirectConnection.java | RespokeDirectConnection.sendMessage | public void sendMessage(String message, final Respoke.TaskCompletionListener completionListener) {
if (isActive()) {
JSONObject jsonMessage = new JSONObject();
try {
jsonMessage.put("message", message);
byte[] rawMessage = jsonMessage.toString().getBytes(C... | java | public void sendMessage(String message, final Respoke.TaskCompletionListener completionListener) {
if (isActive()) {
JSONObject jsonMessage = new JSONObject();
try {
jsonMessage.put("message", message);
byte[] rawMessage = jsonMessage.toString().getBytes(C... | [
"public",
"void",
"sendMessage",
"(",
"String",
"message",
",",
"final",
"Respoke",
".",
"TaskCompletionListener",
"completionListener",
")",
"{",
"if",
"(",
"isActive",
"(",
")",
")",
"{",
"JSONObject",
"jsonMessage",
"=",
"new",
"JSONObject",
"(",
")",
";",
... | Send a message to the remote client through the direct connection.
@param message The message to send
@param completionListener A listener to receive a notification on the success of the asynchronous operation | [
"Send",
"a",
"message",
"to",
"the",
"remote",
"client",
"through",
"the",
"direct",
"connection",
"."
] | 34a15f0558d29b1f1bc8481bbc5c505e855e05ef | https://github.com/respoke/respoke-sdk-android/blob/34a15f0558d29b1f1bc8481bbc5c505e855e05ef/respokeSDK/src/main/java/com/digium/respokesdk/RespokeDirectConnection.java#L146-L168 |
145,609 | respoke/respoke-sdk-android | respokeSDK/src/main/java/com/digium/respokesdk/RespokeDirectConnection.java | RespokeDirectConnection.createDataChannel | public void createDataChannel() {
if (null != callReference) {
RespokeCall call = callReference.get();
if (null != call) {
PeerConnection peerConnection = call.getPeerConnection();
dataChannel = peerConnection.createDataChannel("respokeDataChannel", new Da... | java | public void createDataChannel() {
if (null != callReference) {
RespokeCall call = callReference.get();
if (null != call) {
PeerConnection peerConnection = call.getPeerConnection();
dataChannel = peerConnection.createDataChannel("respokeDataChannel", new Da... | [
"public",
"void",
"createDataChannel",
"(",
")",
"{",
"if",
"(",
"null",
"!=",
"callReference",
")",
"{",
"RespokeCall",
"call",
"=",
"callReference",
".",
"get",
"(",
")",
";",
"if",
"(",
"null",
"!=",
"call",
")",
"{",
"PeerConnection",
"peerConnection",... | Establish a new direct connection instance with the peer connection for the call. This is used internally to the SDK and should not be called directly by your client application. | [
"Establish",
"a",
"new",
"direct",
"connection",
"instance",
"with",
"the",
"peer",
"connection",
"for",
"the",
"call",
".",
"This",
"is",
"used",
"internally",
"to",
"the",
"SDK",
"and",
"should",
"not",
"be",
"called",
"directly",
"by",
"your",
"client",
... | 34a15f0558d29b1f1bc8481bbc5c505e855e05ef | https://github.com/respoke/respoke-sdk-android/blob/34a15f0558d29b1f1bc8481bbc5c505e855e05ef/respokeSDK/src/main/java/com/digium/respokesdk/RespokeDirectConnection.java#L174-L183 |
145,610 | respoke/respoke-sdk-android | respokeSDK/src/main/java/com/digium/respokesdk/RespokeDirectConnection.java | RespokeDirectConnection.peerConnectionDidOpenDataChannel | public void peerConnectionDidOpenDataChannel(DataChannel newDataChannel) {
if (null != dataChannel) {
// Replacing the previous connection, so disable observer messages from the old instance
dataChannel.unregisterObserver();
} else {
new Handler(Looper.getMainLooper()... | java | public void peerConnectionDidOpenDataChannel(DataChannel newDataChannel) {
if (null != dataChannel) {
// Replacing the previous connection, so disable observer messages from the old instance
dataChannel.unregisterObserver();
} else {
new Handler(Looper.getMainLooper()... | [
"public",
"void",
"peerConnectionDidOpenDataChannel",
"(",
"DataChannel",
"newDataChannel",
")",
"{",
"if",
"(",
"null",
"!=",
"dataChannel",
")",
"{",
"// Replacing the previous connection, so disable observer messages from the old instance",
"dataChannel",
".",
"unregisterObser... | Notify the direct connection instance that the peer connection has opened the specified data channel
@param newDataChannel The DataChannel that has opened | [
"Notify",
"the",
"direct",
"connection",
"instance",
"that",
"the",
"peer",
"connection",
"has",
"opened",
"the",
"specified",
"data",
"channel"
] | 34a15f0558d29b1f1bc8481bbc5c505e855e05ef | https://github.com/respoke/respoke-sdk-android/blob/34a15f0558d29b1f1bc8481bbc5c505e855e05ef/respokeSDK/src/main/java/com/digium/respokesdk/RespokeDirectConnection.java#L191-L210 |
145,611 | respoke/respoke-sdk-android | respokeSDK/src/main/java/com/digium/respokesdk/RespokeDirectConnection.java | RespokeDirectConnection.onStateChange | public void onStateChange() {
switch (dataChannel.state()) {
case CONNECTING:
break;
case OPEN: {
if (null != callReference) {
RespokeCall call = callReference.get();
if (null != call) {
... | java | public void onStateChange() {
switch (dataChannel.state()) {
case CONNECTING:
break;
case OPEN: {
if (null != callReference) {
RespokeCall call = callReference.get();
if (null != call) {
... | [
"public",
"void",
"onStateChange",
"(",
")",
"{",
"switch",
"(",
"dataChannel",
".",
"state",
"(",
")",
")",
"{",
"case",
"CONNECTING",
":",
"break",
";",
"case",
"OPEN",
":",
"{",
"if",
"(",
"null",
"!=",
"callReference",
")",
"{",
"RespokeCall",
"cal... | org.webrtc.DataChannel.Observer methods | [
"org",
".",
"webrtc",
".",
"DataChannel",
".",
"Observer",
"methods"
] | 34a15f0558d29b1f1bc8481bbc5c505e855e05ef | https://github.com/respoke/respoke-sdk-android/blob/34a15f0558d29b1f1bc8481bbc5c505e855e05ef/respokeSDK/src/main/java/com/digium/respokesdk/RespokeDirectConnection.java#L216-L266 |
145,612 | flow/commons | src/main/java/com/flowpowered/commons/store/block/impl/AtomicShortIntArray.java | AtomicShortIntArray.set | public void set(int[] initial) {
resizeLock.lock();
try {
if (initial.length != length) {
throw new IllegalArgumentException("Array length mismatch, expected " + length + ", got " + initial.length);
}
int unique = AtomicShortIntArray.getUnique(initial)... | java | public void set(int[] initial) {
resizeLock.lock();
try {
if (initial.length != length) {
throw new IllegalArgumentException("Array length mismatch, expected " + length + ", got " + initial.length);
}
int unique = AtomicShortIntArray.getUnique(initial)... | [
"public",
"void",
"set",
"(",
"int",
"[",
"]",
"initial",
")",
"{",
"resizeLock",
".",
"lock",
"(",
")",
";",
"try",
"{",
"if",
"(",
"initial",
".",
"length",
"!=",
"length",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"Array length mism... | Sets the array equal to the given array. The array should be the same length as this array
@param initial the array containing the new values | [
"Sets",
"the",
"array",
"equal",
"to",
"the",
"given",
"array",
".",
"The",
"array",
"should",
"be",
"the",
"same",
"length",
"as",
"this",
"array"
] | 0690efdac06fd728fcd7e9cf10f2b1319379c45b | https://github.com/flow/commons/blob/0690efdac06fd728fcd7e9cf10f2b1319379c45b/src/main/java/com/flowpowered/commons/store/block/impl/AtomicShortIntArray.java#L144-L162 |
145,613 | flow/commons | src/main/java/com/flowpowered/commons/store/block/impl/AtomicShortIntArray.java | AtomicShortIntArray.uncompressedSet | public void uncompressedSet(int[] initial) {
resizeLock.lock();
try {
if (initial.length != length) {
throw new IllegalArgumentException("Array length mismatch, expected " + length + ", got " + initial.length);
}
store.set(new AtomicShortIntDirectBacki... | java | public void uncompressedSet(int[] initial) {
resizeLock.lock();
try {
if (initial.length != length) {
throw new IllegalArgumentException("Array length mismatch, expected " + length + ", got " + initial.length);
}
store.set(new AtomicShortIntDirectBacki... | [
"public",
"void",
"uncompressedSet",
"(",
"int",
"[",
"]",
"initial",
")",
"{",
"resizeLock",
".",
"lock",
"(",
")",
";",
"try",
"{",
"if",
"(",
"initial",
".",
"length",
"!=",
"length",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"Array... | Sets the array equal to the given array without automatically compressing the data. The array should be the same length as this array
@param initial the array containing the new values | [
"Sets",
"the",
"array",
"equal",
"to",
"the",
"given",
"array",
"without",
"automatically",
"compressing",
"the",
"data",
".",
"The",
"array",
"should",
"be",
"the",
"same",
"length",
"as",
"this",
"array"
] | 0690efdac06fd728fcd7e9cf10f2b1319379c45b | https://github.com/flow/commons/blob/0690efdac06fd728fcd7e9cf10f2b1319379c45b/src/main/java/com/flowpowered/commons/store/block/impl/AtomicShortIntArray.java#L169-L179 |
145,614 | flow/commons | src/main/java/com/flowpowered/commons/store/block/impl/AtomicShortIntArray.java | AtomicShortIntArray.set | public void set(int[] palette, int blockArrayWidth, int[] variableWidthBlockArray) {
resizeLock.lock();
try {
if (palette.length == 0) {
store.set(new AtomicShortIntDirectBackingArray(length, variableWidthBlockArray));
} else if (palette.length == 1) {
... | java | public void set(int[] palette, int blockArrayWidth, int[] variableWidthBlockArray) {
resizeLock.lock();
try {
if (palette.length == 0) {
store.set(new AtomicShortIntDirectBackingArray(length, variableWidthBlockArray));
} else if (palette.length == 1) {
... | [
"public",
"void",
"set",
"(",
"int",
"[",
"]",
"palette",
",",
"int",
"blockArrayWidth",
",",
"int",
"[",
"]",
"variableWidthBlockArray",
")",
"{",
"resizeLock",
".",
"lock",
"(",
")",
";",
"try",
"{",
"if",
"(",
"palette",
".",
"length",
"==",
"0",
... | Sets the array equal to the given palette based array. The main array should be the same length as this array
@param palette the palette, if the palette is of length 0, variableWidthBlockArray contains the data, in flat format
@param blockArrayWidth the with of each entry in the main array
@param variableWidthBlockAr... | [
"Sets",
"the",
"array",
"equal",
"to",
"the",
"given",
"palette",
"based",
"array",
".",
"The",
"main",
"array",
"should",
"be",
"the",
"same",
"length",
"as",
"this",
"array"
] | 0690efdac06fd728fcd7e9cf10f2b1319379c45b | https://github.com/flow/commons/blob/0690efdac06fd728fcd7e9cf10f2b1319379c45b/src/main/java/com/flowpowered/commons/store/block/impl/AtomicShortIntArray.java#L188-L201 |
145,615 | flow/commons | src/main/java/com/flowpowered/commons/store/block/impl/AtomicShortIntArray.java | AtomicShortIntArray.compress | public void compress() {
resizeLock.lock();
try {
AtomicShortIntBackingArray s = store.get();
if (s instanceof AtomicShortIntUniformBackingArray) {
return;
}
int unique = s.getUnique();
if (AtomicShortIntPaletteBackingArray.roun... | java | public void compress() {
resizeLock.lock();
try {
AtomicShortIntBackingArray s = store.get();
if (s instanceof AtomicShortIntUniformBackingArray) {
return;
}
int unique = s.getUnique();
if (AtomicShortIntPaletteBackingArray.roun... | [
"public",
"void",
"compress",
"(",
")",
"{",
"resizeLock",
".",
"lock",
"(",
")",
";",
"try",
"{",
"AtomicShortIntBackingArray",
"s",
"=",
"store",
".",
"get",
"(",
")",
";",
"if",
"(",
"s",
"instanceof",
"AtomicShortIntUniformBackingArray",
")",
"{",
"ret... | Attempts to compress the array | [
"Attempts",
"to",
"compress",
"the",
"array"
] | 0690efdac06fd728fcd7e9cf10f2b1319379c45b | https://github.com/flow/commons/blob/0690efdac06fd728fcd7e9cf10f2b1319379c45b/src/main/java/com/flowpowered/commons/store/block/impl/AtomicShortIntArray.java#L238-L260 |
145,616 | respoke/respoke-sdk-android | respokeSDK/src/main/java/com/digium/respokesdk/RespokeGroup.java | RespokeGroup.getMembers | public void getMembers(final GetGroupMembersCompletionListener completionListener) {
if (isJoined()) {
if ((null != groupID) && (groupID.length() > 0)) {
String urlEndpoint = "/v1/channels/" + groupID + "/subscribers/";
signalingChannel.sendRESTMessage("get", urlEndp... | java | public void getMembers(final GetGroupMembersCompletionListener completionListener) {
if (isJoined()) {
if ((null != groupID) && (groupID.length() > 0)) {
String urlEndpoint = "/v1/channels/" + groupID + "/subscribers/";
signalingChannel.sendRESTMessage("get", urlEndp... | [
"public",
"void",
"getMembers",
"(",
"final",
"GetGroupMembersCompletionListener",
"completionListener",
")",
"{",
"if",
"(",
"isJoined",
"(",
")",
")",
"{",
"if",
"(",
"(",
"null",
"!=",
"groupID",
")",
"&&",
"(",
"groupID",
".",
"length",
"(",
")",
">",
... | Get an array containing the members of the group.
@param completionListener A listener to receive a notification on the success of the asynchronous operation | [
"Get",
"an",
"array",
"containing",
"the",
"members",
"of",
"the",
"group",
"."
] | 34a15f0558d29b1f1bc8481bbc5c505e855e05ef | https://github.com/respoke/respoke-sdk-android/blob/34a15f0558d29b1f1bc8481bbc5c505e855e05ef/respokeSDK/src/main/java/com/digium/respokesdk/RespokeGroup.java#L133-L208 |
145,617 | respoke/respoke-sdk-android | respokeSDK/src/main/java/com/digium/respokesdk/RespokeGroup.java | RespokeGroup.join | public void join(final Respoke.TaskCompletionListener completionListener) {
if (!isConnected()) {
Respoke.postTaskError(completionListener, "Can't complete request when not connected. " +
"Please reconnect!");
return;
}
if ((groupID == null) || (group... | java | public void join(final Respoke.TaskCompletionListener completionListener) {
if (!isConnected()) {
Respoke.postTaskError(completionListener, "Can't complete request when not connected. " +
"Please reconnect!");
return;
}
if ((groupID == null) || (group... | [
"public",
"void",
"join",
"(",
"final",
"Respoke",
".",
"TaskCompletionListener",
"completionListener",
")",
"{",
"if",
"(",
"!",
"isConnected",
"(",
")",
")",
"{",
"Respoke",
".",
"postTaskError",
"(",
"completionListener",
",",
"\"Can't complete request when not c... | Join this group
@param completionListener A listener to receive a notification upon completion of this
async operation | [
"Join",
"this",
"group"
] | 34a15f0558d29b1f1bc8481bbc5c505e855e05ef | https://github.com/respoke/respoke-sdk-android/blob/34a15f0558d29b1f1bc8481bbc5c505e855e05ef/respokeSDK/src/main/java/com/digium/respokesdk/RespokeGroup.java#L217-L242 |
145,618 | respoke/respoke-sdk-android | respokeSDK/src/main/java/com/digium/respokesdk/RespokeGroup.java | RespokeGroup.leave | public void leave(final Respoke.TaskCompletionListener completionListener) {
if (isJoined()) {
if ((null != groupID) && (groupID.length() > 0)) {
String urlEndpoint = "/v1/groups";
JSONArray groupList = new JSONArray();
groupList.put(groupID);
... | java | public void leave(final Respoke.TaskCompletionListener completionListener) {
if (isJoined()) {
if ((null != groupID) && (groupID.length() > 0)) {
String urlEndpoint = "/v1/groups";
JSONArray groupList = new JSONArray();
groupList.put(groupID);
... | [
"public",
"void",
"leave",
"(",
"final",
"Respoke",
".",
"TaskCompletionListener",
"completionListener",
")",
"{",
"if",
"(",
"isJoined",
"(",
")",
")",
"{",
"if",
"(",
"(",
"null",
"!=",
"groupID",
")",
"&&",
"(",
"groupID",
".",
"length",
"(",
")",
"... | Leave this group
@param completionListener A listener to receive a notification on the success of the asynchronous operation | [
"Leave",
"this",
"group"
] | 34a15f0558d29b1f1bc8481bbc5c505e855e05ef | https://github.com/respoke/respoke-sdk-android/blob/34a15f0558d29b1f1bc8481bbc5c505e855e05ef/respokeSDK/src/main/java/com/digium/respokesdk/RespokeGroup.java#L250-L284 |
145,619 | respoke/respoke-sdk-android | respokeSDK/src/main/java/com/digium/respokesdk/RespokeGroup.java | RespokeGroup.sendMessage | public void sendMessage(String message, boolean push, boolean persist,
final Respoke.TaskCompletionListener completionListener) {
if (isJoined()) {
if ((null != groupID) && (groupID.length() > 0)) {
RespokeClient client = clientReference.get();
... | java | public void sendMessage(String message, boolean push, boolean persist,
final Respoke.TaskCompletionListener completionListener) {
if (isJoined()) {
if ((null != groupID) && (groupID.length() > 0)) {
RespokeClient client = clientReference.get();
... | [
"public",
"void",
"sendMessage",
"(",
"String",
"message",
",",
"boolean",
"push",
",",
"boolean",
"persist",
",",
"final",
"Respoke",
".",
"TaskCompletionListener",
"completionListener",
")",
"{",
"if",
"(",
"isJoined",
"(",
")",
")",
"{",
"if",
"(",
"(",
... | Send a message to the entire group.
@param message The message to send
@param push A flag indicating if a push notification should be sent for this message
@param persist A flag indicating if history should be maintained for this message.
@param completionListener A listener to ... | [
"Send",
"a",
"message",
"to",
"the",
"entire",
"group",
"."
] | 34a15f0558d29b1f1bc8481bbc5c505e855e05ef | https://github.com/respoke/respoke-sdk-android/blob/34a15f0558d29b1f1bc8481bbc5c505e855e05ef/respokeSDK/src/main/java/com/digium/respokesdk/RespokeGroup.java#L318-L358 |
145,620 | respoke/respoke-sdk-android | respokeSDK/src/main/java/com/digium/respokesdk/RespokeGroup.java | RespokeGroup.connectionDidJoin | public void connectionDidJoin(final RespokeConnection connection) {
members.add(connection);
new Handler(Looper.getMainLooper()).post(new Runnable() {
@Override
public void run() {
Listener listener = listenerReference.get();
if (null != listener)... | java | public void connectionDidJoin(final RespokeConnection connection) {
members.add(connection);
new Handler(Looper.getMainLooper()).post(new Runnable() {
@Override
public void run() {
Listener listener = listenerReference.get();
if (null != listener)... | [
"public",
"void",
"connectionDidJoin",
"(",
"final",
"RespokeConnection",
"connection",
")",
"{",
"members",
".",
"add",
"(",
"connection",
")",
";",
"new",
"Handler",
"(",
"Looper",
".",
"getMainLooper",
"(",
")",
")",
".",
"post",
"(",
"new",
"Runnable",
... | Notify the group that a connection has joined. This is used internally to the SDK and should not be called directly by your client application.
@param connection The connection that has joined the group | [
"Notify",
"the",
"group",
"that",
"a",
"connection",
"has",
"joined",
".",
"This",
"is",
"used",
"internally",
"to",
"the",
"SDK",
"and",
"should",
"not",
"be",
"called",
"directly",
"by",
"your",
"client",
"application",
"."
] | 34a15f0558d29b1f1bc8481bbc5c505e855e05ef | https://github.com/respoke/respoke-sdk-android/blob/34a15f0558d29b1f1bc8481bbc5c505e855e05ef/respokeSDK/src/main/java/com/digium/respokesdk/RespokeGroup.java#L370-L382 |
145,621 | respoke/respoke-sdk-android | respokeSDK/src/main/java/com/digium/respokesdk/RespokeGroup.java | RespokeGroup.connectionDidLeave | public void connectionDidLeave(final RespokeConnection connection) {
members.remove(connection);
new Handler(Looper.getMainLooper()).post(new Runnable() {
@Override
public void run() {
Listener listener = listenerReference.get();
if (null != liste... | java | public void connectionDidLeave(final RespokeConnection connection) {
members.remove(connection);
new Handler(Looper.getMainLooper()).post(new Runnable() {
@Override
public void run() {
Listener listener = listenerReference.get();
if (null != liste... | [
"public",
"void",
"connectionDidLeave",
"(",
"final",
"RespokeConnection",
"connection",
")",
"{",
"members",
".",
"remove",
"(",
"connection",
")",
";",
"new",
"Handler",
"(",
"Looper",
".",
"getMainLooper",
"(",
")",
")",
".",
"post",
"(",
"new",
"Runnable... | Notify the group that a connection has left. This is used internally to the SDK and should not be called directly by your client application.
@param connection The connection that has left the group | [
"Notify",
"the",
"group",
"that",
"a",
"connection",
"has",
"left",
".",
"This",
"is",
"used",
"internally",
"to",
"the",
"SDK",
"and",
"should",
"not",
"be",
"called",
"directly",
"by",
"your",
"client",
"application",
"."
] | 34a15f0558d29b1f1bc8481bbc5c505e855e05ef | https://github.com/respoke/respoke-sdk-android/blob/34a15f0558d29b1f1bc8481bbc5c505e855e05ef/respokeSDK/src/main/java/com/digium/respokesdk/RespokeGroup.java#L390-L402 |
145,622 | respoke/respoke-sdk-android | respokeSDK/src/main/java/com/digium/respokesdk/RespokeGroup.java | RespokeGroup.postGetGroupMembersError | private void postGetGroupMembersError(final GetGroupMembersCompletionListener completionListener, final String errorMessage) {
new Handler(Looper.getMainLooper()).post(new Runnable() {
@Override
public void run() {
if (null != completionListener) {
com... | java | private void postGetGroupMembersError(final GetGroupMembersCompletionListener completionListener, final String errorMessage) {
new Handler(Looper.getMainLooper()).post(new Runnable() {
@Override
public void run() {
if (null != completionListener) {
com... | [
"private",
"void",
"postGetGroupMembersError",
"(",
"final",
"GetGroupMembersCompletionListener",
"completionListener",
",",
"final",
"String",
"errorMessage",
")",
"{",
"new",
"Handler",
"(",
"Looper",
".",
"getMainLooper",
"(",
")",
")",
".",
"post",
"(",
"new",
... | A convenience method for posting errors to a GetGroupMembersCompletionListener
@param completionListener The listener to notify
@param errorMessage The human-readable error message that occurred | [
"A",
"convenience",
"method",
"for",
"posting",
"errors",
"to",
"a",
"GetGroupMembersCompletionListener"
] | 34a15f0558d29b1f1bc8481bbc5c505e855e05ef | https://github.com/respoke/respoke-sdk-android/blob/34a15f0558d29b1f1bc8481bbc5c505e855e05ef/respokeSDK/src/main/java/com/digium/respokesdk/RespokeGroup.java#L434-L443 |
145,623 | litsec/swedish-eid-shibboleth-base | shibboleth-base/shibboleth-extensions/src/main/java/se/litsec/shibboleth/idp/metadata/controller/AbstractMetadataPublishingController.java | AbstractMetadataPublishingController.getMetadata | public HttpEntity<byte[]> getMetadata(HttpServletRequest request, @RequestHeader(name = "Accept", required = false) String acceptHeader) {
logger.debug("Request to download metadata from {}", request.getRemoteAddr());
try {
// Check if the metadata is up-to-date according to how the container was confi... | java | public HttpEntity<byte[]> getMetadata(HttpServletRequest request, @RequestHeader(name = "Accept", required = false) String acceptHeader) {
logger.debug("Request to download metadata from {}", request.getRemoteAddr());
try {
// Check if the metadata is up-to-date according to how the container was confi... | [
"public",
"HttpEntity",
"<",
"byte",
"[",
"]",
">",
"getMetadata",
"(",
"HttpServletRequest",
"request",
",",
"@",
"RequestHeader",
"(",
"name",
"=",
"\"Accept\"",
",",
"required",
"=",
"false",
")",
"String",
"acceptHeader",
")",
"{",
"logger",
".",
"debug"... | Returns the metadata for the entity.
@param request
the HTTP request
@param acceptHeader
the Accept header value
@return an HttpEntity holding the SAML metadata | [
"Returns",
"the",
"metadata",
"for",
"the",
"entity",
"."
] | aaaa467ff61f07d7dfa31627fb36851a37da6804 | https://github.com/litsec/swedish-eid-shibboleth-base/blob/aaaa467ff61f07d7dfa31627fb36851a37da6804/shibboleth-base/shibboleth-extensions/src/main/java/se/litsec/shibboleth/idp/metadata/controller/AbstractMetadataPublishingController.java#L77-L120 |
145,624 | politie/cinch | src/main/java/eu/icolumbo/cinch/streaming/StreamingCinchJob.java | StreamingCinchJob.execute | @Override
public void execute(StreamingCinchContext cinchContext, SparkConf sparkConf) {
JavaStreamingContext streamingContext = new JavaStreamingContext(sparkConf, new Duration(durationInMillis));
defineJob(streamingContext, cinchContext);
streamingContext.start();
streamingConte... | java | @Override
public void execute(StreamingCinchContext cinchContext, SparkConf sparkConf) {
JavaStreamingContext streamingContext = new JavaStreamingContext(sparkConf, new Duration(durationInMillis));
defineJob(streamingContext, cinchContext);
streamingContext.start();
streamingConte... | [
"@",
"Override",
"public",
"void",
"execute",
"(",
"StreamingCinchContext",
"cinchContext",
",",
"SparkConf",
"sparkConf",
")",
"{",
"JavaStreamingContext",
"streamingContext",
"=",
"new",
"JavaStreamingContext",
"(",
"sparkConf",
",",
"new",
"Duration",
"(",
"duratio... | Execute cinch job with context and spark conf. | [
"Execute",
"cinch",
"job",
"with",
"context",
"and",
"spark",
"conf",
"."
] | 1986b16d397be343a4e1a3f372f14981f70d5de3 | https://github.com/politie/cinch/blob/1986b16d397be343a4e1a3f372f14981f70d5de3/src/main/java/eu/icolumbo/cinch/streaming/StreamingCinchJob.java#L22-L30 |
145,625 | febit/wit | wit-core/src/main/java/org/febit/wit/Template.java | Template.merge | public Context merge(final Map<String, Object> vars) {
return merge(Vars.of(vars));
} | java | public Context merge(final Map<String, Object> vars) {
return merge(Vars.of(vars));
} | [
"public",
"Context",
"merge",
"(",
"final",
"Map",
"<",
"String",
",",
"Object",
">",
"vars",
")",
"{",
"return",
"merge",
"(",
"Vars",
".",
"of",
"(",
"vars",
")",
")",
";",
"}"
] | Merge this template, and discard outputs.
@param vars
@return Context
@throws ScriptRuntimeException
@throws ParseException
@since 2.4.0 | [
"Merge",
"this",
"template",
"and",
"discard",
"outputs",
"."
] | 89ee29efbc5633b79c30c3c7b953c9f4130575af | https://github.com/febit/wit/blob/89ee29efbc5633b79c30c3c7b953c9f4130575af/wit-core/src/main/java/org/febit/wit/Template.java#L223-L225 |
145,626 | febit/wit | wit-core/src/main/java/org/febit/wit/Template.java | Template.debug | public Context debug(final Vars vars, final Out out, final BreakpointListener listener) {
try {
return Parser.parse(this, listener)
.execute(this, out, vars);
} catch (Exception e) {
throw completeException(e);
}
} | java | public Context debug(final Vars vars, final Out out, final BreakpointListener listener) {
try {
return Parser.parse(this, listener)
.execute(this, out, vars);
} catch (Exception e) {
throw completeException(e);
}
} | [
"public",
"Context",
"debug",
"(",
"final",
"Vars",
"vars",
",",
"final",
"Out",
"out",
",",
"final",
"BreakpointListener",
"listener",
")",
"{",
"try",
"{",
"return",
"Parser",
".",
"parse",
"(",
"this",
",",
"listener",
")",
".",
"execute",
"(",
"this"... | Debug this template.
@param vars
@param out
@param listener
@return Context
@throws ScriptRuntimeException
@throws ParseException | [
"Debug",
"this",
"template",
"."
] | 89ee29efbc5633b79c30c3c7b953c9f4130575af | https://github.com/febit/wit/blob/89ee29efbc5633b79c30c3c7b953c9f4130575af/wit-core/src/main/java/org/febit/wit/Template.java#L277-L284 |
145,627 | litsec/swedish-eid-shibboleth-base | shibboleth-base/shibboleth-extensions/src/main/java/se/litsec/shibboleth/idp/authn/actions/UpdateAssertionForProxyIdpAction.java | UpdateAssertionForProxyIdpAction.setAuthenticatingAuthority | protected void setAuthenticatingAuthority(Assertion assertion, Assertion proxiedAssertion) {
if (proxiedAssertion.getIssuer() == null || proxiedAssertion.getIssuer().getValue() == null) {
log.warn("No issuer element found in proxied assertion");
return;
}
if (assertion.getAuthnStatements().isEmp... | java | protected void setAuthenticatingAuthority(Assertion assertion, Assertion proxiedAssertion) {
if (proxiedAssertion.getIssuer() == null || proxiedAssertion.getIssuer().getValue() == null) {
log.warn("No issuer element found in proxied assertion");
return;
}
if (assertion.getAuthnStatements().isEmp... | [
"protected",
"void",
"setAuthenticatingAuthority",
"(",
"Assertion",
"assertion",
",",
"Assertion",
"proxiedAssertion",
")",
"{",
"if",
"(",
"proxiedAssertion",
".",
"getIssuer",
"(",
")",
"==",
"null",
"||",
"proxiedAssertion",
".",
"getIssuer",
"(",
")",
".",
... | Assigns the AuthenticatingAuthority element holding the issuer of the proxied assertion.
@param assertion
the assertion to update
@param proxiedAssertion
the proxied assertion | [
"Assigns",
"the",
"AuthenticatingAuthority",
"element",
"holding",
"the",
"issuer",
"of",
"the",
"proxied",
"assertion",
"."
] | aaaa467ff61f07d7dfa31627fb36851a37da6804 | https://github.com/litsec/swedish-eid-shibboleth-base/blob/aaaa467ff61f07d7dfa31627fb36851a37da6804/shibboleth-base/shibboleth-extensions/src/main/java/se/litsec/shibboleth/idp/authn/actions/UpdateAssertionForProxyIdpAction.java#L100-L124 |
145,628 | flow/commons | src/main/java/com/flowpowered/commons/ViewFrustum.java | ViewFrustum.update | public void update(Matrix4f projection, Matrix4f view) {
// http://www.crownandcutlass.com/features/technicaldetails/frustum.html
final float[] clip = projection.mul(view).toArray(true);
// Extract the numbers for the RIGHT plane
frustum[0][0] = clip[3] - clip[0];
frustum[0][1] =... | java | public void update(Matrix4f projection, Matrix4f view) {
// http://www.crownandcutlass.com/features/technicaldetails/frustum.html
final float[] clip = projection.mul(view).toArray(true);
// Extract the numbers for the RIGHT plane
frustum[0][0] = clip[3] - clip[0];
frustum[0][1] =... | [
"public",
"void",
"update",
"(",
"Matrix4f",
"projection",
",",
"Matrix4f",
"view",
")",
"{",
"// http://www.crownandcutlass.com/features/technicaldetails/frustum.html",
"final",
"float",
"[",
"]",
"clip",
"=",
"projection",
".",
"mul",
"(",
"view",
")",
".",
"toArr... | Updates the frustum to match the view and projection matrix.
@param projection The projection matrix
@param view The view matrix | [
"Updates",
"the",
"frustum",
"to",
"match",
"the",
"view",
"and",
"projection",
"matrix",
"."
] | 0690efdac06fd728fcd7e9cf10f2b1319379c45b | https://github.com/flow/commons/blob/0690efdac06fd728fcd7e9cf10f2b1319379c45b/src/main/java/com/flowpowered/commons/ViewFrustum.java#L46-L87 |
145,629 | flow/commons | src/main/java/com/flowpowered/commons/ViewFrustum.java | ViewFrustum.getNearPlane | public float getNearPlane() {
if (nearPlane == -1) {
// Recalculate the distance if the cache is invalid
final Vector3f nearPos = vertices[0].add(vertices[2]).add(vertices[4]).add(vertices[6]).div(4);
nearPlane = nearPos.sub(position).length();
}
return nearPl... | java | public float getNearPlane() {
if (nearPlane == -1) {
// Recalculate the distance if the cache is invalid
final Vector3f nearPos = vertices[0].add(vertices[2]).add(vertices[4]).add(vertices[6]).div(4);
nearPlane = nearPos.sub(position).length();
}
return nearPl... | [
"public",
"float",
"getNearPlane",
"(",
")",
"{",
"if",
"(",
"nearPlane",
"==",
"-",
"1",
")",
"{",
"// Recalculate the distance if the cache is invalid",
"final",
"Vector3f",
"nearPos",
"=",
"vertices",
"[",
"0",
"]",
".",
"add",
"(",
"vertices",
"[",
"2",
... | Returns the near plane distance of the frustum.
@return The near plane | [
"Returns",
"the",
"near",
"plane",
"distance",
"of",
"the",
"frustum",
"."
] | 0690efdac06fd728fcd7e9cf10f2b1319379c45b | https://github.com/flow/commons/blob/0690efdac06fd728fcd7e9cf10f2b1319379c45b/src/main/java/com/flowpowered/commons/ViewFrustum.java#L184-L191 |
145,630 | flow/commons | src/main/java/com/flowpowered/commons/ViewFrustum.java | ViewFrustum.getFarPlane | public float getFarPlane() {
if (farPlane == -1) {
// Recalculate the distance if the cache is invalid
final Vector3f farPos = vertices[1].add(vertices[3]).add(vertices[5]).add(vertices[7]).div(4);
farPlane = farPos.sub(position).length();
}
return farPlane;
... | java | public float getFarPlane() {
if (farPlane == -1) {
// Recalculate the distance if the cache is invalid
final Vector3f farPos = vertices[1].add(vertices[3]).add(vertices[5]).add(vertices[7]).div(4);
farPlane = farPos.sub(position).length();
}
return farPlane;
... | [
"public",
"float",
"getFarPlane",
"(",
")",
"{",
"if",
"(",
"farPlane",
"==",
"-",
"1",
")",
"{",
"// Recalculate the distance if the cache is invalid",
"final",
"Vector3f",
"farPos",
"=",
"vertices",
"[",
"1",
"]",
".",
"add",
"(",
"vertices",
"[",
"3",
"]"... | Returns the far plane distance of the frustum.
@return The far plane | [
"Returns",
"the",
"far",
"plane",
"distance",
"of",
"the",
"frustum",
"."
] | 0690efdac06fd728fcd7e9cf10f2b1319379c45b | https://github.com/flow/commons/blob/0690efdac06fd728fcd7e9cf10f2b1319379c45b/src/main/java/com/flowpowered/commons/ViewFrustum.java#L198-L205 |
145,631 | flow/commons | src/main/java/com/flowpowered/commons/ViewFrustum.java | ViewFrustum.distance | private float distance(int i, float x, float y, float z) {
return frustum[i][0] * x + frustum[i][1] * y + frustum[i][2] * z + frustum[i][3];
} | java | private float distance(int i, float x, float y, float z) {
return frustum[i][0] * x + frustum[i][1] * y + frustum[i][2] * z + frustum[i][3];
} | [
"private",
"float",
"distance",
"(",
"int",
"i",
",",
"float",
"x",
",",
"float",
"y",
",",
"float",
"z",
")",
"{",
"return",
"frustum",
"[",
"i",
"]",
"[",
"0",
"]",
"*",
"x",
"+",
"frustum",
"[",
"i",
"]",
"[",
"1",
"]",
"*",
"y",
"+",
"f... | Compute the distance between a point and the given plane.
@param i The id of the plane
@param x The x coordinate of the point
@param y The y coordinate of the point
@param z The z coordinate of the point
@return The distance | [
"Compute",
"the",
"distance",
"between",
"a",
"point",
"and",
"the",
"given",
"plane",
"."
] | 0690efdac06fd728fcd7e9cf10f2b1319379c45b | https://github.com/flow/commons/blob/0690efdac06fd728fcd7e9cf10f2b1319379c45b/src/main/java/com/flowpowered/commons/ViewFrustum.java#L216-L218 |
145,632 | litsec/swedish-eid-shibboleth-base | shibboleth-base/shibboleth-extensions/src/main/java/se/litsec/shibboleth/idp/context/ExtendedSpringStatusMessageLookupFunction.java | ExtendedSpringStatusMessageLookupFunction.getLocale | protected Locale getLocale(RequestContext context) {
return this.locale != null ? this.locale : context.getExternalContext().getLocale();
} | java | protected Locale getLocale(RequestContext context) {
return this.locale != null ? this.locale : context.getExternalContext().getLocale();
} | [
"protected",
"Locale",
"getLocale",
"(",
"RequestContext",
"context",
")",
"{",
"return",
"this",
".",
"locale",
"!=",
"null",
"?",
"this",
".",
"locale",
":",
"context",
".",
"getExternalContext",
"(",
")",
".",
"getLocale",
"(",
")",
";",
"}"
] | Returns the locale to use when resolving messages.
@param context
the request context
@return the locale to use | [
"Returns",
"the",
"locale",
"to",
"use",
"when",
"resolving",
"messages",
"."
] | aaaa467ff61f07d7dfa31627fb36851a37da6804 | https://github.com/litsec/swedish-eid-shibboleth-base/blob/aaaa467ff61f07d7dfa31627fb36851a37da6804/shibboleth-base/shibboleth-extensions/src/main/java/se/litsec/shibboleth/idp/context/ExtendedSpringStatusMessageLookupFunction.java#L96-L98 |
145,633 | javabits/pojo-mbean | pojo-mbean-impl/src/main/java/org/softee/management/helper/IntrospectedDynamicMBean.java | IntrospectedDynamicMBean.getParameterAnnotation | private static <A extends Annotation> A getParameterAnnotation(Method method,
int index, Class<A> annotationClass) {
for (Annotation a : method.getParameterAnnotations()[index]) {
if (annotationClass.isInstance(a)) {
return annotationClass.cast(a);
}
}... | java | private static <A extends Annotation> A getParameterAnnotation(Method method,
int index, Class<A> annotationClass) {
for (Annotation a : method.getParameterAnnotations()[index]) {
if (annotationClass.isInstance(a)) {
return annotationClass.cast(a);
}
}... | [
"private",
"static",
"<",
"A",
"extends",
"Annotation",
">",
"A",
"getParameterAnnotation",
"(",
"Method",
"method",
",",
"int",
"index",
",",
"Class",
"<",
"A",
">",
"annotationClass",
")",
"{",
"for",
"(",
"Annotation",
"a",
":",
"method",
".",
"getParam... | Find an annotation for a parameter on a method.
@param <A> The annotation.
@param method The method.
@param index The index (0 .. n-1) of the parameter in the parameters list
@param annotationClass The annotation class
@return The annotation, or null | [
"Find",
"an",
"annotation",
"for",
"a",
"parameter",
"on",
"a",
"method",
"."
] | 9aa7fb065e560ec1e3e63373b28cd95ad438b26a | https://github.com/javabits/pojo-mbean/blob/9aa7fb065e560ec1e3e63373b28cd95ad438b26a/pojo-mbean-impl/src/main/java/org/softee/management/helper/IntrospectedDynamicMBean.java#L476-L484 |
145,634 | javabits/pojo-mbean | pojo-mbean-impl/src/main/java/org/softee/management/helper/IntrospectedDynamicMBean.java | IntrospectedDynamicMBean.getAnnotation | private static <A extends Annotation> A getAnnotation(AnnotatedElement element, Class<A> annotationClass) {
return (element != null) ? element.getAnnotation(annotationClass) : null;
} | java | private static <A extends Annotation> A getAnnotation(AnnotatedElement element, Class<A> annotationClass) {
return (element != null) ? element.getAnnotation(annotationClass) : null;
} | [
"private",
"static",
"<",
"A",
"extends",
"Annotation",
">",
"A",
"getAnnotation",
"(",
"AnnotatedElement",
"element",
",",
"Class",
"<",
"A",
">",
"annotationClass",
")",
"{",
"return",
"(",
"element",
"!=",
"null",
")",
"?",
"element",
".",
"getAnnotation"... | Null safe annotation checker
@param <A>
@param element element or null
@param annotationClass
@return the annotation, if element is not null and the annotation is present. Otherwise null | [
"Null",
"safe",
"annotation",
"checker"
] | 9aa7fb065e560ec1e3e63373b28cd95ad438b26a | https://github.com/javabits/pojo-mbean/blob/9aa7fb065e560ec1e3e63373b28cd95ad438b26a/pojo-mbean-impl/src/main/java/org/softee/management/helper/IntrospectedDynamicMBean.java#L493-L495 |
145,635 | flow/commons | src/main/java/com/flowpowered/commons/datatable/SerializableHashMap.java | SerializableHashMap.serialize | @Override
public byte[] serialize() {
try {
ByteArrayOutputStream out = new ByteArrayOutputStream();
ObjectOutputStream oos = new ObjectOutputStream(out);
oos.writeObject(map);
return out.toByteArray();
} catch (IOException ex) {
throw new ... | java | @Override
public byte[] serialize() {
try {
ByteArrayOutputStream out = new ByteArrayOutputStream();
ObjectOutputStream oos = new ObjectOutputStream(out);
oos.writeObject(map);
return out.toByteArray();
} catch (IOException ex) {
throw new ... | [
"@",
"Override",
"public",
"byte",
"[",
"]",
"serialize",
"(",
")",
"{",
"try",
"{",
"ByteArrayOutputStream",
"out",
"=",
"new",
"ByteArrayOutputStream",
"(",
")",
";",
"ObjectOutputStream",
"oos",
"=",
"new",
"ObjectOutputStream",
"(",
"out",
")",
";",
"oos... | This serializes only the data, as opposed to the whole object. | [
"This",
"serializes",
"only",
"the",
"data",
"as",
"opposed",
"to",
"the",
"whole",
"object",
"."
] | 0690efdac06fd728fcd7e9cf10f2b1319379c45b | https://github.com/flow/commons/blob/0690efdac06fd728fcd7e9cf10f2b1319379c45b/src/main/java/com/flowpowered/commons/datatable/SerializableHashMap.java#L458-L468 |
145,636 | flow/commons | src/main/java/com/flowpowered/commons/datatable/SerializableHashMap.java | SerializableHashMap.deserialize | @Override
@SuppressWarnings ("unchecked")
public void deserialize(byte[] serializedData, boolean wipe) throws IOException {
if (wipe) {
map.clear();
}
InputStream in = new ByteArrayInputStream(serializedData);
ObjectInputStream ois = new ClassResolverObjectInputStream... | java | @Override
@SuppressWarnings ("unchecked")
public void deserialize(byte[] serializedData, boolean wipe) throws IOException {
if (wipe) {
map.clear();
}
InputStream in = new ByteArrayInputStream(serializedData);
ObjectInputStream ois = new ClassResolverObjectInputStream... | [
"@",
"Override",
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"public",
"void",
"deserialize",
"(",
"byte",
"[",
"]",
"serializedData",
",",
"boolean",
"wipe",
")",
"throws",
"IOException",
"{",
"if",
"(",
"wipe",
")",
"{",
"map",
".",
"clear",
"(",... | This deserializes only the data, as opposed to the whole object. | [
"This",
"deserializes",
"only",
"the",
"data",
"as",
"opposed",
"to",
"the",
"whole",
"object",
"."
] | 0690efdac06fd728fcd7e9cf10f2b1319379c45b | https://github.com/flow/commons/blob/0690efdac06fd728fcd7e9cf10f2b1319379c45b/src/main/java/com/flowpowered/commons/datatable/SerializableHashMap.java#L473-L493 |
145,637 | flow/commons | src/main/java/com/flowpowered/commons/queue/SubscribableQueue.java | SubscribableQueue.becomePublisher | public boolean becomePublisher() {
if (publisherThreadID.get() != -1) {
return false;
}
publisherThreadID.set(Thread.currentThread().getId());
return true;
} | java | public boolean becomePublisher() {
if (publisherThreadID.get() != -1) {
return false;
}
publisherThreadID.set(Thread.currentThread().getId());
return true;
} | [
"public",
"boolean",
"becomePublisher",
"(",
")",
"{",
"if",
"(",
"publisherThreadID",
".",
"get",
"(",
")",
"!=",
"-",
"1",
")",
"{",
"return",
"false",
";",
"}",
"publisherThreadID",
".",
"set",
"(",
"Thread",
".",
"currentThread",
"(",
")",
".",
"ge... | Attempts to make the thread the publisher, returning true if the attempt succeeded. This is only possible if there's no publisher.
@return Whether or not the thread became the publisher | [
"Attempts",
"to",
"make",
"the",
"thread",
"the",
"publisher",
"returning",
"true",
"if",
"the",
"attempt",
"succeeded",
".",
"This",
"is",
"only",
"possible",
"if",
"there",
"s",
"no",
"publisher",
"."
] | 0690efdac06fd728fcd7e9cf10f2b1319379c45b | https://github.com/flow/commons/blob/0690efdac06fd728fcd7e9cf10f2b1319379c45b/src/main/java/com/flowpowered/commons/queue/SubscribableQueue.java#L82-L88 |
145,638 | flow/commons | src/main/java/com/flowpowered/commons/queue/SubscribableQueue.java | SubscribableQueue.unsubscribe | public void unsubscribe() {
final long id = Thread.currentThread().getId();
queues.remove(id);
if (subscriberIdentifiers != null) {
for (Iterator<Entry<Object, Long>> iterator = subscriberIdentifiers.entrySet().iterator(); iterator.hasNext(); ) {
if (id == iterator.ne... | java | public void unsubscribe() {
final long id = Thread.currentThread().getId();
queues.remove(id);
if (subscriberIdentifiers != null) {
for (Iterator<Entry<Object, Long>> iterator = subscriberIdentifiers.entrySet().iterator(); iterator.hasNext(); ) {
if (id == iterator.ne... | [
"public",
"void",
"unsubscribe",
"(",
")",
"{",
"final",
"long",
"id",
"=",
"Thread",
".",
"currentThread",
"(",
")",
".",
"getId",
"(",
")",
";",
"queues",
".",
"remove",
"(",
"id",
")",
";",
"if",
"(",
"subscriberIdentifiers",
"!=",
"null",
")",
"{... | Unsubscribes the thread from the queue. | [
"Unsubscribes",
"the",
"thread",
"from",
"the",
"queue",
"."
] | 0690efdac06fd728fcd7e9cf10f2b1319379c45b | https://github.com/flow/commons/blob/0690efdac06fd728fcd7e9cf10f2b1319379c45b/src/main/java/com/flowpowered/commons/queue/SubscribableQueue.java#L124-L135 |
145,639 | flow/commons | src/main/java/com/flowpowered/commons/queue/SubscribableQueue.java | SubscribableQueue.addAll | public boolean addAll(Collection<? extends T> c, Object identifier) {
checkNotNullArgument(c);
if (isPublisherThread()) {
boolean changed = false;
if (identifier != null) {
final Long id = subscriberIdentifiers.get(identifier);
checkNotNullIdentifi... | java | public boolean addAll(Collection<? extends T> c, Object identifier) {
checkNotNullArgument(c);
if (isPublisherThread()) {
boolean changed = false;
if (identifier != null) {
final Long id = subscriberIdentifiers.get(identifier);
checkNotNullIdentifi... | [
"public",
"boolean",
"addAll",
"(",
"Collection",
"<",
"?",
"extends",
"T",
">",
"c",
",",
"Object",
"identifier",
")",
"{",
"checkNotNullArgument",
"(",
"c",
")",
";",
"if",
"(",
"isPublisherThread",
"(",
")",
")",
"{",
"boolean",
"changed",
"=",
"false... | Adds a collection of objects to the queue, targeting only the subscriber identified by the provided identifier object, unless said object is null. The added objects will only be visible to the
subscriber.
@param c The collection of objects to add
@param identifier The identifier object, can be null
@return True if thi... | [
"Adds",
"a",
"collection",
"of",
"objects",
"to",
"the",
"queue",
"targeting",
"only",
"the",
"subscriber",
"identified",
"by",
"the",
"provided",
"identifier",
"object",
"unless",
"said",
"object",
"is",
"null",
".",
"The",
"added",
"objects",
"will",
"only",... | 0690efdac06fd728fcd7e9cf10f2b1319379c45b | https://github.com/flow/commons/blob/0690efdac06fd728fcd7e9cf10f2b1319379c45b/src/main/java/com/flowpowered/commons/queue/SubscribableQueue.java#L195-L213 |
145,640 | agapsys/captcha-servlet | src/main/java/com/agapsys/captcha/CaptchaServlet.java | CaptchaServlet.isValid | public final boolean isValid(HttpServletRequest req, String token) {
String storedToken = getStoredToken(req);
if (storedToken == null)
return false;
return storedToken.equals(token);
} | java | public final boolean isValid(HttpServletRequest req, String token) {
String storedToken = getStoredToken(req);
if (storedToken == null)
return false;
return storedToken.equals(token);
} | [
"public",
"final",
"boolean",
"isValid",
"(",
"HttpServletRequest",
"req",
",",
"String",
"token",
")",
"{",
"String",
"storedToken",
"=",
"getStoredToken",
"(",
"req",
")",
";",
"if",
"(",
"storedToken",
"==",
"null",
")",
"return",
"false",
";",
"return",
... | Tests given token against stored one.
@param req request used to retrieve stored cookie
@param token token to be tested
@return a boolean indicating if given token is valid. | [
"Tests",
"given",
"token",
"against",
"stored",
"one",
"."
] | 35ec59de53f115646f41bfe72dc5f30187204ee4 | https://github.com/agapsys/captcha-servlet/blob/35ec59de53f115646f41bfe72dc5f30187204ee4/src/main/java/com/agapsys/captcha/CaptchaServlet.java#L53-L60 |
145,641 | agapsys/captcha-servlet | src/main/java/com/agapsys/captcha/CaptchaServlet.java | CaptchaServlet.store | protected void store(HttpServletRequest req, HttpServletResponse resp, String token) {
HttpSession session = req.getSession();
session.setAttribute(ATR_SESSION_TOKEN, token);
} | java | protected void store(HttpServletRequest req, HttpServletResponse resp, String token) {
HttpSession session = req.getSession();
session.setAttribute(ATR_SESSION_TOKEN, token);
} | [
"protected",
"void",
"store",
"(",
"HttpServletRequest",
"req",
",",
"HttpServletResponse",
"resp",
",",
"String",
"token",
")",
"{",
"HttpSession",
"session",
"=",
"req",
".",
"getSession",
"(",
")",
";",
"session",
".",
"setAttribute",
"(",
"ATR_SESSION_TOKEN"... | Associates a token with an user.
Default implementation stores the token into user session.
@param req HTTP request
@param resp HTTP response
@param token token to be associated with an user. | [
"Associates",
"a",
"token",
"with",
"an",
"user",
".",
"Default",
"implementation",
"stores",
"the",
"token",
"into",
"user",
"session",
"."
] | 35ec59de53f115646f41bfe72dc5f30187204ee4 | https://github.com/agapsys/captcha-servlet/blob/35ec59de53f115646f41bfe72dc5f30187204ee4/src/main/java/com/agapsys/captcha/CaptchaServlet.java#L69-L72 |
145,642 | agapsys/captcha-servlet | src/main/java/com/agapsys/captcha/CaptchaServlet.java | CaptchaServlet.getStoredToken | protected String getStoredToken(HttpServletRequest req) {
HttpSession session = req.getSession(false);
if (session == null)
return null;
return (String) session.getAttribute(ATR_SESSION_TOKEN);
} | java | protected String getStoredToken(HttpServletRequest req) {
HttpSession session = req.getSession(false);
if (session == null)
return null;
return (String) session.getAttribute(ATR_SESSION_TOKEN);
} | [
"protected",
"String",
"getStoredToken",
"(",
"HttpServletRequest",
"req",
")",
"{",
"HttpSession",
"session",
"=",
"req",
".",
"getSession",
"(",
"false",
")",
";",
"if",
"(",
"session",
"==",
"null",
")",
"return",
"null",
";",
"return",
"(",
"String",
"... | Returns the token previously associated with given request.
Default implementation retrieves the token from user session.
@param req HTTP request
@return associated token | [
"Returns",
"the",
"token",
"previously",
"associated",
"with",
"given",
"request",
".",
"Default",
"implementation",
"retrieves",
"the",
"token",
"from",
"user",
"session",
"."
] | 35ec59de53f115646f41bfe72dc5f30187204ee4 | https://github.com/agapsys/captcha-servlet/blob/35ec59de53f115646f41bfe72dc5f30187204ee4/src/main/java/com/agapsys/captcha/CaptchaServlet.java#L80-L87 |
145,643 | luontola/specsy | specsy-groovy/src/main/java/org/specsy/groovy/GroovySpecsy.java | GroovySpecsy.spec | public void spec(String name, Runnable body) {
context.spec(name, new GroovyClosure(body));
} | java | public void spec(String name, Runnable body) {
context.spec(name, new GroovyClosure(body));
} | [
"public",
"void",
"spec",
"(",
"String",
"name",
",",
"Runnable",
"body",
")",
"{",
"context",
".",
"spec",
"(",
"name",
",",
"new",
"GroovyClosure",
"(",
"body",
")",
")",
";",
"}"
] | Declares a child spec. | [
"Declares",
"a",
"child",
"spec",
"."
] | 32ea4792bd91ddcbef86d4a875438c3e00ed65fb | https://github.com/luontola/specsy/blob/32ea4792bd91ddcbef86d4a875438c3e00ed65fb/specsy-groovy/src/main/java/org/specsy/groovy/GroovySpecsy.java#L27-L29 |
145,644 | InferlyticsOSS/druidlet | src/main/java/com/inferlytics/druidlet/core/DruidIndices.java | DruidIndices.cache | public QueryableIndex cache(String dataSource, Iterable<InputRow> loader, IncrementalIndexSchema indexSchema)
throws IOException {
IncrementalIndex<?> incIndex = new OnheapIncrementalIndex(indexSchema, true, Integer.MAX_VALUE);
for (InputRow row : loader) {
incIndex.add(row);
... | java | public QueryableIndex cache(String dataSource, Iterable<InputRow> loader, IncrementalIndexSchema indexSchema)
throws IOException {
IncrementalIndex<?> incIndex = new OnheapIncrementalIndex(indexSchema, true, Integer.MAX_VALUE);
for (InputRow row : loader) {
incIndex.add(row);
... | [
"public",
"QueryableIndex",
"cache",
"(",
"String",
"dataSource",
",",
"Iterable",
"<",
"InputRow",
">",
"loader",
",",
"IncrementalIndexSchema",
"indexSchema",
")",
"throws",
"IOException",
"{",
"IncrementalIndex",
"<",
"?",
">",
"incIndex",
"=",
"new",
"OnheapIn... | Builds and caches a QueryableIndex from an Iterable by building, persisting and reloading an IncrementalIndex
@param dataSource Key to store the index under
@param loader Iterable<InputRow> object to read data rows from
@param indexSchema Schema of the index
@return QueryableIndex that was cached
@throws I... | [
"Builds",
"and",
"caches",
"a",
"QueryableIndex",
"from",
"an",
"Iterable",
"by",
"building",
"persisting",
"and",
"reloading",
"an",
"IncrementalIndex"
] | 984beb6519ae9f04df44961553ca2b195521c87d | https://github.com/InferlyticsOSS/druidlet/blob/984beb6519ae9f04df44961553ca2b195521c87d/src/main/java/com/inferlytics/druidlet/core/DruidIndices.java#L60-L85 |
145,645 | flow/commons | src/main/java/com/flowpowered/commons/StringUtil.java | StringUtil.startsWithIgnoreCase | public static boolean startsWithIgnoreCase(String input, String prefix) {
if (input == null || prefix == null || prefix.length() > input.length()) {
return false;
} else {
final char[] inputCharArray = input.toCharArray();
final char[] prefixCharArray = prefix.toCharA... | java | public static boolean startsWithIgnoreCase(String input, String prefix) {
if (input == null || prefix == null || prefix.length() > input.length()) {
return false;
} else {
final char[] inputCharArray = input.toCharArray();
final char[] prefixCharArray = prefix.toCharA... | [
"public",
"static",
"boolean",
"startsWithIgnoreCase",
"(",
"String",
"input",
",",
"String",
"prefix",
")",
"{",
"if",
"(",
"input",
"==",
"null",
"||",
"prefix",
"==",
"null",
"||",
"prefix",
".",
"length",
"(",
")",
">",
"input",
".",
"length",
"(",
... | Tests if this string starts with the specified prefix, ignoring case
@param input the input
@param prefix the prefix
@return True if the input starts with the prefix when ignoring case, False if not | [
"Tests",
"if",
"this",
"string",
"starts",
"with",
"the",
"specified",
"prefix",
"ignoring",
"case"
] | 0690efdac06fd728fcd7e9cf10f2b1319379c45b | https://github.com/flow/commons/blob/0690efdac06fd728fcd7e9cf10f2b1319379c45b/src/main/java/com/flowpowered/commons/StringUtil.java#L39-L52 |
145,646 | flow/commons | src/main/java/com/flowpowered/commons/StringUtil.java | StringUtil.matchName | public static <T extends Named> Collection<T> matchName(Collection<T> values, String name) {
List<T> result = new ArrayList<>();
for (T value : values) {
if (value == null) {
continue;
}
if (startsWithIgnoreCase(value.getName(), name)) {
... | java | public static <T extends Named> Collection<T> matchName(Collection<T> values, String name) {
List<T> result = new ArrayList<>();
for (T value : values) {
if (value == null) {
continue;
}
if (startsWithIgnoreCase(value.getName(), name)) {
... | [
"public",
"static",
"<",
"T",
"extends",
"Named",
">",
"Collection",
"<",
"T",
">",
"matchName",
"(",
"Collection",
"<",
"T",
">",
"values",
",",
"String",
"name",
")",
"{",
"List",
"<",
"T",
">",
"result",
"=",
"new",
"ArrayList",
"<>",
"(",
")",
... | Matches a named class using a name
@param values to look into
@param name to match against
@return a collection of values that matched | [
"Matches",
"a",
"named",
"class",
"using",
"a",
"name"
] | 0690efdac06fd728fcd7e9cf10f2b1319379c45b | https://github.com/flow/commons/blob/0690efdac06fd728fcd7e9cf10f2b1319379c45b/src/main/java/com/flowpowered/commons/StringUtil.java#L92-L103 |
145,647 | flow/commons | src/main/java/com/flowpowered/commons/StringUtil.java | StringUtil.toNamedString | public static String toNamedString(Object object, Object... components) {
StringBuilder b = new StringBuilder(components.length * 5 + 2);
if (object != null) {
b.append(object.getClass().getSimpleName()).append(' ');
}
b.append('{');
for (int i = 0; i < components.len... | java | public static String toNamedString(Object object, Object... components) {
StringBuilder b = new StringBuilder(components.length * 5 + 2);
if (object != null) {
b.append(object.getClass().getSimpleName()).append(' ');
}
b.append('{');
for (int i = 0; i < components.len... | [
"public",
"static",
"String",
"toNamedString",
"(",
"Object",
"object",
",",
"Object",
"...",
"components",
")",
"{",
"StringBuilder",
"b",
"=",
"new",
"StringBuilder",
"(",
"components",
".",
"length",
"*",
"5",
"+",
"2",
")",
";",
"if",
"(",
"object",
... | Wraps all components in between brackets delimited by ','-signs, appending the class name in front of it.
@param object name to append in front
@param components to turn into a String
@return a String representation of the input | [
"Wraps",
"all",
"components",
"in",
"between",
"brackets",
"delimited",
"by",
"-",
"signs",
"appending",
"the",
"class",
"name",
"in",
"front",
"of",
"it",
"."
] | 0690efdac06fd728fcd7e9cf10f2b1319379c45b | https://github.com/flow/commons/blob/0690efdac06fd728fcd7e9cf10f2b1319379c45b/src/main/java/com/flowpowered/commons/StringUtil.java#L182-L196 |
145,648 | litsec/swedish-eid-shibboleth-base | shibboleth-base/shibboleth-extensions/src/main/java/se/litsec/shibboleth/idp/attribute/resolver/SAML2AttributeNameToIdMapperService.java | SAML2AttributeNameToIdMapperService.getAttributeID | public String getAttributeID(String name) {
Map<String, String> m = this.getMapping();
return m != null ? m.get(name) : null;
} | java | public String getAttributeID(String name) {
Map<String, String> m = this.getMapping();
return m != null ? m.get(name) : null;
} | [
"public",
"String",
"getAttributeID",
"(",
"String",
"name",
")",
"{",
"Map",
"<",
"String",
",",
"String",
">",
"m",
"=",
"this",
".",
"getMapping",
"(",
")",
";",
"return",
"m",
"!=",
"null",
"?",
"m",
".",
"get",
"(",
"name",
")",
":",
"null",
... | Returns the Shibboleth attribute ID that corresponds to the supplied SAML2 attribute name.
@param name
the attribute name
@return the Shibboleth attribute ID or {@code null} if no mapping exists | [
"Returns",
"the",
"Shibboleth",
"attribute",
"ID",
"that",
"corresponds",
"to",
"the",
"supplied",
"SAML2",
"attribute",
"name",
"."
] | aaaa467ff61f07d7dfa31627fb36851a37da6804 | https://github.com/litsec/swedish-eid-shibboleth-base/blob/aaaa467ff61f07d7dfa31627fb36851a37da6804/shibboleth-base/shibboleth-extensions/src/main/java/se/litsec/shibboleth/idp/attribute/resolver/SAML2AttributeNameToIdMapperService.java#L81-L84 |
145,649 | litsec/swedish-eid-shibboleth-base | shibboleth-base/shibboleth-extensions/src/main/java/se/litsec/shibboleth/idp/authn/controller/AbstractExternalAuthenticationController.java | AbstractExternalAuthenticationController.initializeServices | protected void initializeServices(ProfileRequestContext<?, ?> profileRequestContext) throws ExternalAutenticationErrorCodeException {
this.authnContextService.initializeContext(profileRequestContext);
this.signSupportService.initializeContext(profileRequestContext);
} | java | protected void initializeServices(ProfileRequestContext<?, ?> profileRequestContext) throws ExternalAutenticationErrorCodeException {
this.authnContextService.initializeContext(profileRequestContext);
this.signSupportService.initializeContext(profileRequestContext);
} | [
"protected",
"void",
"initializeServices",
"(",
"ProfileRequestContext",
"<",
"?",
",",
"?",
">",
"profileRequestContext",
")",
"throws",
"ExternalAutenticationErrorCodeException",
"{",
"this",
".",
"authnContextService",
".",
"initializeContext",
"(",
"profileRequestContex... | Initializes the services for the controller. Subclasses should override this method to initialize their own
services.
@param profileRequestContext
the request context
@throws ExternalAutenticationErrorCodeException
for errors during initialization | [
"Initializes",
"the",
"services",
"for",
"the",
"controller",
".",
"Subclasses",
"should",
"override",
"this",
"method",
"to",
"initialize",
"their",
"own",
"services",
"."
] | aaaa467ff61f07d7dfa31627fb36851a37da6804 | https://github.com/litsec/swedish-eid-shibboleth-base/blob/aaaa467ff61f07d7dfa31627fb36851a37da6804/shibboleth-base/shibboleth-extensions/src/main/java/se/litsec/shibboleth/idp/authn/controller/AbstractExternalAuthenticationController.java#L212-L215 |
145,650 | litsec/swedish-eid-shibboleth-base | shibboleth-base/shibboleth-extensions/src/main/java/se/litsec/shibboleth/idp/authn/controller/AbstractExternalAuthenticationController.java | AbstractExternalAuthenticationController.servicesProcessRequest | protected void servicesProcessRequest(ProfileRequestContext<?, ?> profileRequestContext) throws ExternalAutenticationErrorCodeException {
this.authnContextService.processRequest(profileRequestContext);
this.signSupportService.processRequest(profileRequestContext);
} | java | protected void servicesProcessRequest(ProfileRequestContext<?, ?> profileRequestContext) throws ExternalAutenticationErrorCodeException {
this.authnContextService.processRequest(profileRequestContext);
this.signSupportService.processRequest(profileRequestContext);
} | [
"protected",
"void",
"servicesProcessRequest",
"(",
"ProfileRequestContext",
"<",
"?",
",",
"?",
">",
"profileRequestContext",
")",
"throws",
"ExternalAutenticationErrorCodeException",
"{",
"this",
".",
"authnContextService",
".",
"processRequest",
"(",
"profileRequestConte... | Invokes request processing for all installed services. Subclasses should override this method to invoke their own
services.
@param profileRequestContext
the request context
@throws ExternalAutenticationErrorCodeException
for errors during processing | [
"Invokes",
"request",
"processing",
"for",
"all",
"installed",
"services",
".",
"Subclasses",
"should",
"override",
"this",
"method",
"to",
"invoke",
"their",
"own",
"services",
"."
] | aaaa467ff61f07d7dfa31627fb36851a37da6804 | https://github.com/litsec/swedish-eid-shibboleth-base/blob/aaaa467ff61f07d7dfa31627fb36851a37da6804/shibboleth-base/shibboleth-extensions/src/main/java/se/litsec/shibboleth/idp/authn/controller/AbstractExternalAuthenticationController.java#L226-L229 |
145,651 | litsec/swedish-eid-shibboleth-base | shibboleth-base/shibboleth-extensions/src/main/java/se/litsec/shibboleth/idp/authn/controller/AbstractExternalAuthenticationController.java | AbstractExternalAuthenticationController.getExternalAuthenticationKey | protected String getExternalAuthenticationKey(HttpServletRequest httpRequest) throws ExternalAuthenticationException {
String key = (String) httpRequest.getSession().getAttribute(EXTAUTHN_KEY_ATTRIBUTE_NAME);
if (key == null) {
throw new ExternalAuthenticationException("No external authentication process ... | java | protected String getExternalAuthenticationKey(HttpServletRequest httpRequest) throws ExternalAuthenticationException {
String key = (String) httpRequest.getSession().getAttribute(EXTAUTHN_KEY_ATTRIBUTE_NAME);
if (key == null) {
throw new ExternalAuthenticationException("No external authentication process ... | [
"protected",
"String",
"getExternalAuthenticationKey",
"(",
"HttpServletRequest",
"httpRequest",
")",
"throws",
"ExternalAuthenticationException",
"{",
"String",
"key",
"=",
"(",
"String",
")",
"httpRequest",
".",
"getSession",
"(",
")",
".",
"getAttribute",
"(",
"EXT... | Returns the Shibboleth external authentication key for the current session.
@param httpRequest
the HTTP request
@return the Shibboleth external authentication key
@throws ExternalAuthenticationException
if no active session exists | [
"Returns",
"the",
"Shibboleth",
"external",
"authentication",
"key",
"for",
"the",
"current",
"session",
"."
] | aaaa467ff61f07d7dfa31627fb36851a37da6804 | https://github.com/litsec/swedish-eid-shibboleth-base/blob/aaaa467ff61f07d7dfa31627fb36851a37da6804/shibboleth-base/shibboleth-extensions/src/main/java/se/litsec/shibboleth/idp/authn/controller/AbstractExternalAuthenticationController.java#L267-L273 |
145,652 | litsec/swedish-eid-shibboleth-base | shibboleth-base/shibboleth-extensions/src/main/java/se/litsec/shibboleth/idp/authn/controller/AbstractExternalAuthenticationController.java | AbstractExternalAuthenticationController.success | protected void success(HttpServletRequest httpRequest, HttpServletResponse httpResponse, String principal, List<Attribute> attributes,
String authnContextClassUri, DateTime authnInstant, Boolean cacheForSSO) throws ExternalAuthenticationException, IOException {
SubjectBuilder builder = this.getSubjectBuilder... | java | protected void success(HttpServletRequest httpRequest, HttpServletResponse httpResponse, String principal, List<Attribute> attributes,
String authnContextClassUri, DateTime authnInstant, Boolean cacheForSSO) throws ExternalAuthenticationException, IOException {
SubjectBuilder builder = this.getSubjectBuilder... | [
"protected",
"void",
"success",
"(",
"HttpServletRequest",
"httpRequest",
",",
"HttpServletResponse",
"httpResponse",
",",
"String",
"principal",
",",
"List",
"<",
"Attribute",
">",
"attributes",
",",
"String",
"authnContextClassUri",
",",
"DateTime",
"authnInstant",
... | Method that should be invoked to exit the external authentication process with a successful result.
@param httpRequest
the HTTP request
@param httpResponse
the HTTP response
@param principal
the principal that was authenticated
@param attributes
the attributes to release
@param authnContextClassUri
the authentication ... | [
"Method",
"that",
"should",
"be",
"invoked",
"to",
"exit",
"the",
"external",
"authentication",
"process",
"with",
"a",
"successful",
"result",
"."
] | aaaa467ff61f07d7dfa31627fb36851a37da6804 | https://github.com/litsec/swedish-eid-shibboleth-base/blob/aaaa467ff61f07d7dfa31627fb36851a37da6804/shibboleth-base/shibboleth-extensions/src/main/java/se/litsec/shibboleth/idp/authn/controller/AbstractExternalAuthenticationController.java#L370-L380 |
145,653 | litsec/swedish-eid-shibboleth-base | shibboleth-base/shibboleth-extensions/src/main/java/se/litsec/shibboleth/idp/authn/controller/AbstractExternalAuthenticationController.java | AbstractExternalAuthenticationController.cancel | protected void cancel(HttpServletRequest httpRequest, HttpServletResponse httpResponse)
throws ExternalAuthenticationException, IOException {
this.error(httpRequest, httpResponse, ExtAuthnEventIds.CANCEL_AUTHN);
} | java | protected void cancel(HttpServletRequest httpRequest, HttpServletResponse httpResponse)
throws ExternalAuthenticationException, IOException {
this.error(httpRequest, httpResponse, ExtAuthnEventIds.CANCEL_AUTHN);
} | [
"protected",
"void",
"cancel",
"(",
"HttpServletRequest",
"httpRequest",
",",
"HttpServletResponse",
"httpResponse",
")",
"throws",
"ExternalAuthenticationException",
",",
"IOException",
"{",
"this",
".",
"error",
"(",
"httpRequest",
",",
"httpResponse",
",",
"ExtAuthnE... | Method that should be invoked before exiting the external authentication process and indicate that the user
cancelled the authentication.
@param httpRequest
the HTTP request
@param httpResponse
the HTTP response
@throws ExternalAuthenticationException
for Shibboleth session errors
@throws IOException
for IO errors | [
"Method",
"that",
"should",
"be",
"invoked",
"before",
"exiting",
"the",
"external",
"authentication",
"process",
"and",
"indicate",
"that",
"the",
"user",
"cancelled",
"the",
"authentication",
"."
] | aaaa467ff61f07d7dfa31627fb36851a37da6804 | https://github.com/litsec/swedish-eid-shibboleth-base/blob/aaaa467ff61f07d7dfa31627fb36851a37da6804/shibboleth-base/shibboleth-extensions/src/main/java/se/litsec/shibboleth/idp/authn/controller/AbstractExternalAuthenticationController.java#L433-L436 |
145,654 | litsec/swedish-eid-shibboleth-base | shibboleth-base/shibboleth-extensions/src/main/java/se/litsec/shibboleth/idp/authn/controller/AbstractExternalAuthenticationController.java | AbstractExternalAuthenticationController.error | protected void error(HttpServletRequest httpRequest, HttpServletResponse httpResponse, Status errorStatus)
throws ExternalAuthenticationException, IOException {
this.error(httpRequest, httpResponse, new IdpErrorStatusException(errorStatus));
} | java | protected void error(HttpServletRequest httpRequest, HttpServletResponse httpResponse, Status errorStatus)
throws ExternalAuthenticationException, IOException {
this.error(httpRequest, httpResponse, new IdpErrorStatusException(errorStatus));
} | [
"protected",
"void",
"error",
"(",
"HttpServletRequest",
"httpRequest",
",",
"HttpServletResponse",
"httpResponse",
",",
"Status",
"errorStatus",
")",
"throws",
"ExternalAuthenticationException",
",",
"IOException",
"{",
"this",
".",
"error",
"(",
"httpRequest",
",",
... | Method that should be invoked to exit the external authentication process with an error where the SAML status to
respond with is given.
@param httpRequest
the HTTP request
@param httpResponse
the HTTP response
@param errorStatus
the SAML status
@throws ExternalAuthenticationException
for Shibboleth session errors
@thr... | [
"Method",
"that",
"should",
"be",
"invoked",
"to",
"exit",
"the",
"external",
"authentication",
"process",
"with",
"an",
"error",
"where",
"the",
"SAML",
"status",
"to",
"respond",
"with",
"is",
"given",
"."
] | aaaa467ff61f07d7dfa31627fb36851a37da6804 | https://github.com/litsec/swedish-eid-shibboleth-base/blob/aaaa467ff61f07d7dfa31627fb36851a37da6804/shibboleth-base/shibboleth-extensions/src/main/java/se/litsec/shibboleth/idp/authn/controller/AbstractExternalAuthenticationController.java#L515-L518 |
145,655 | litsec/swedish-eid-shibboleth-base | shibboleth-base/shibboleth-extensions/src/main/java/se/litsec/shibboleth/idp/authn/controller/AbstractExternalAuthenticationController.java | AbstractExternalAuthenticationController.getBinding | protected String getBinding(ProfileRequestContext<?, ?> context) {
SAMLBindingContext samlBinding = this.samlBindingContextLookupStrategy.apply(context);
return samlBinding != null ? samlBinding.getBindingUri() : null;
} | java | protected String getBinding(ProfileRequestContext<?, ?> context) {
SAMLBindingContext samlBinding = this.samlBindingContextLookupStrategy.apply(context);
return samlBinding != null ? samlBinding.getBindingUri() : null;
} | [
"protected",
"String",
"getBinding",
"(",
"ProfileRequestContext",
"<",
"?",
",",
"?",
">",
"context",
")",
"{",
"SAMLBindingContext",
"samlBinding",
"=",
"this",
".",
"samlBindingContextLookupStrategy",
".",
"apply",
"(",
"context",
")",
";",
"return",
"samlBindi... | Utility method that may be used to obtain the binding that was used to pass the AuthnRequest message.
@param context
the profile context
@return the binding URI
@see #getBinding(HttpServletRequest) | [
"Utility",
"method",
"that",
"may",
"be",
"used",
"to",
"obtain",
"the",
"binding",
"that",
"was",
"used",
"to",
"pass",
"the",
"AuthnRequest",
"message",
"."
] | aaaa467ff61f07d7dfa31627fb36851a37da6804 | https://github.com/litsec/swedish-eid-shibboleth-base/blob/aaaa467ff61f07d7dfa31627fb36851a37da6804/shibboleth-base/shibboleth-extensions/src/main/java/se/litsec/shibboleth/idp/authn/controller/AbstractExternalAuthenticationController.java#L617-L620 |
145,656 | litsec/swedish-eid-shibboleth-base | shibboleth-base/shibboleth-extensions/src/main/java/se/litsec/shibboleth/idp/authn/controller/AbstractExternalAuthenticationController.java | AbstractExternalAuthenticationController.getRelayState | protected String getRelayState(ProfileRequestContext<?, ?> context) {
SAMLBindingContext samlBinding = this.samlBindingContextLookupStrategy.apply(context);
return samlBinding != null ? samlBinding.getRelayState() : null;
} | java | protected String getRelayState(ProfileRequestContext<?, ?> context) {
SAMLBindingContext samlBinding = this.samlBindingContextLookupStrategy.apply(context);
return samlBinding != null ? samlBinding.getRelayState() : null;
} | [
"protected",
"String",
"getRelayState",
"(",
"ProfileRequestContext",
"<",
"?",
",",
"?",
">",
"context",
")",
"{",
"SAMLBindingContext",
"samlBinding",
"=",
"this",
".",
"samlBindingContextLookupStrategy",
".",
"apply",
"(",
"context",
")",
";",
"return",
"samlBi... | Utility method that may be used to obtain the Relay State for the request.
@param context
the profile context
@return the relay state
@see #getRelayState(HttpServletRequest) | [
"Utility",
"method",
"that",
"may",
"be",
"used",
"to",
"obtain",
"the",
"Relay",
"State",
"for",
"the",
"request",
"."
] | aaaa467ff61f07d7dfa31627fb36851a37da6804 | https://github.com/litsec/swedish-eid-shibboleth-base/blob/aaaa467ff61f07d7dfa31627fb36851a37da6804/shibboleth-base/shibboleth-extensions/src/main/java/se/litsec/shibboleth/idp/authn/controller/AbstractExternalAuthenticationController.java#L643-L646 |
145,657 | flow/commons | src/main/java/com/flowpowered/commons/StringToUniqueIntegerMap.java | StringToUniqueIntegerMap.convertTo | public int convertTo(StringToUniqueIntegerMap other, int localId) {
if (other == null) {
throw new IllegalStateException("Other map is null");
}
String localKey = store.reverseGet(localId);
if (localKey == null) {
throw new IllegalArgumentException("Cannot convert... | java | public int convertTo(StringToUniqueIntegerMap other, int localId) {
if (other == null) {
throw new IllegalStateException("Other map is null");
}
String localKey = store.reverseGet(localId);
if (localKey == null) {
throw new IllegalArgumentException("Cannot convert... | [
"public",
"int",
"convertTo",
"(",
"StringToUniqueIntegerMap",
"other",
",",
"int",
"localId",
")",
"{",
"if",
"(",
"other",
"==",
"null",
")",
"{",
"throw",
"new",
"IllegalStateException",
"(",
"\"Other map is null\"",
")",
";",
"}",
"String",
"localKey",
"="... | Converts an id local to this map to a foreign id, local to another map.
@param other the other map
@param localId to convert
@return returns the foreign id, or 0 on failure | [
"Converts",
"an",
"id",
"local",
"to",
"this",
"map",
"to",
"a",
"foreign",
"id",
"local",
"to",
"another",
"map",
"."
] | 0690efdac06fd728fcd7e9cf10f2b1319379c45b | https://github.com/flow/commons/blob/0690efdac06fd728fcd7e9cf10f2b1319379c45b/src/main/java/com/flowpowered/commons/StringToUniqueIntegerMap.java#L105-L146 |
145,658 | flow/commons | src/main/java/com/flowpowered/commons/StringToUniqueIntegerMap.java | StringToUniqueIntegerMap.register | public int register(String key) {
Integer id = store.get(key);
if (id != null) {
return id;
}
int localId = nextId.getAndIncrement();
while (localId < maxId) {
if (store.setIfAbsent(key, localId)) {
return localId;
}
... | java | public int register(String key) {
Integer id = store.get(key);
if (id != null) {
return id;
}
int localId = nextId.getAndIncrement();
while (localId < maxId) {
if (store.setIfAbsent(key, localId)) {
return localId;
}
... | [
"public",
"int",
"register",
"(",
"String",
"key",
")",
"{",
"Integer",
"id",
"=",
"store",
".",
"get",
"(",
"key",
")",
";",
"if",
"(",
"id",
"!=",
"null",
")",
"{",
"return",
"id",
";",
"}",
"int",
"localId",
"=",
"nextId",
".",
"getAndIncrement"... | Registers a key with the map and returns the matching id.
The id corresponding to a key will be consistent if registered more than once, including over restarts, subject to the persistence of the store.
@param key the key to be added
@return returns the local id, or 0 on failure | [
"Registers",
"a",
"key",
"with",
"the",
"map",
"and",
"returns",
"the",
"matching",
"id",
"."
] | 0690efdac06fd728fcd7e9cf10f2b1319379c45b | https://github.com/flow/commons/blob/0690efdac06fd728fcd7e9cf10f2b1319379c45b/src/main/java/com/flowpowered/commons/StringToUniqueIntegerMap.java#L166-L188 |
145,659 | politie/cinch | src/main/java/eu/icolumbo/cinch/CinchContext.java | CinchContext.executeJob | public void executeJob() {
AbstractApplicationContext springContext = SpringContext.getContext(springConfigurationClass);
CinchJob cinchJob = springContext.getBean(CinchJob.class);
cinchJob.execute(this);
} | java | public void executeJob() {
AbstractApplicationContext springContext = SpringContext.getContext(springConfigurationClass);
CinchJob cinchJob = springContext.getBean(CinchJob.class);
cinchJob.execute(this);
} | [
"public",
"void",
"executeJob",
"(",
")",
"{",
"AbstractApplicationContext",
"springContext",
"=",
"SpringContext",
".",
"getContext",
"(",
"springConfigurationClass",
")",
";",
"CinchJob",
"cinchJob",
"=",
"springContext",
".",
"getBean",
"(",
"CinchJob",
".",
"cla... | Executes your job from the spring context. | [
"Executes",
"your",
"job",
"from",
"the",
"spring",
"context",
"."
] | 1986b16d397be343a4e1a3f372f14981f70d5de3 | https://github.com/politie/cinch/blob/1986b16d397be343a4e1a3f372f14981f70d5de3/src/main/java/eu/icolumbo/cinch/CinchContext.java#L29-L34 |
145,660 | politie/cinch | src/main/java/eu/icolumbo/cinch/CinchContext.java | CinchContext.function | public <T1, R> Function<T1, R> function(Class<? extends Function<T1, R>> springBeanClass) {
return new SpringFunction<>(springConfigurationClass, springBeanClass);
} | java | public <T1, R> Function<T1, R> function(Class<? extends Function<T1, R>> springBeanClass) {
return new SpringFunction<>(springConfigurationClass, springBeanClass);
} | [
"public",
"<",
"T1",
",",
"R",
">",
"Function",
"<",
"T1",
",",
"R",
">",
"function",
"(",
"Class",
"<",
"?",
"extends",
"Function",
"<",
"T1",
",",
"R",
">",
">",
"springBeanClass",
")",
"{",
"return",
"new",
"SpringFunction",
"<>",
"(",
"springConf... | Create a new SpringFunction, which implements Spark's Function interface. | [
"Create",
"a",
"new",
"SpringFunction",
"which",
"implements",
"Spark",
"s",
"Function",
"interface",
"."
] | 1986b16d397be343a4e1a3f372f14981f70d5de3 | https://github.com/politie/cinch/blob/1986b16d397be343a4e1a3f372f14981f70d5de3/src/main/java/eu/icolumbo/cinch/CinchContext.java#L39-L41 |
145,661 | politie/cinch | src/main/java/eu/icolumbo/cinch/CinchContext.java | CinchContext.voidFunction | public <T> VoidFunction<T> voidFunction(Class<? extends VoidFunction<T>> springBeanClass) {
return new SpringVoidFunction<>(springConfigurationClass, springBeanClass);
} | java | public <T> VoidFunction<T> voidFunction(Class<? extends VoidFunction<T>> springBeanClass) {
return new SpringVoidFunction<>(springConfigurationClass, springBeanClass);
} | [
"public",
"<",
"T",
">",
"VoidFunction",
"<",
"T",
">",
"voidFunction",
"(",
"Class",
"<",
"?",
"extends",
"VoidFunction",
"<",
"T",
">",
">",
"springBeanClass",
")",
"{",
"return",
"new",
"SpringVoidFunction",
"<>",
"(",
"springConfigurationClass",
",",
"sp... | Create a new SpringVoidFunction, which implements Spark's VoidFunction interface. | [
"Create",
"a",
"new",
"SpringVoidFunction",
"which",
"implements",
"Spark",
"s",
"VoidFunction",
"interface",
"."
] | 1986b16d397be343a4e1a3f372f14981f70d5de3 | https://github.com/politie/cinch/blob/1986b16d397be343a4e1a3f372f14981f70d5de3/src/main/java/eu/icolumbo/cinch/CinchContext.java#L46-L48 |
145,662 | politie/cinch | src/main/java/eu/icolumbo/cinch/CinchContext.java | CinchContext.flatMapFunction | public <T, R> FlatMapFunction<T, R> flatMapFunction(Class<? extends FlatMapFunction<T, R>> springBeanClass) {
return new SpringFlatMapFunction<>(springConfigurationClass, springBeanClass);
} | java | public <T, R> FlatMapFunction<T, R> flatMapFunction(Class<? extends FlatMapFunction<T, R>> springBeanClass) {
return new SpringFlatMapFunction<>(springConfigurationClass, springBeanClass);
} | [
"public",
"<",
"T",
",",
"R",
">",
"FlatMapFunction",
"<",
"T",
",",
"R",
">",
"flatMapFunction",
"(",
"Class",
"<",
"?",
"extends",
"FlatMapFunction",
"<",
"T",
",",
"R",
">",
">",
"springBeanClass",
")",
"{",
"return",
"new",
"SpringFlatMapFunction",
"... | Create a new SpringFlapMapFunction, which implements Spark's FlatMapFunction interface. | [
"Create",
"a",
"new",
"SpringFlapMapFunction",
"which",
"implements",
"Spark",
"s",
"FlatMapFunction",
"interface",
"."
] | 1986b16d397be343a4e1a3f372f14981f70d5de3 | https://github.com/politie/cinch/blob/1986b16d397be343a4e1a3f372f14981f70d5de3/src/main/java/eu/icolumbo/cinch/CinchContext.java#L53-L55 |
145,663 | respoke/respoke-sdk-android | respokeSDK/src/main/java/com/digium/respokesdk/RespokeEndpoint.java | RespokeEndpoint.sendMessage | public void sendMessage(String message, boolean push, boolean ccSelf, final Respoke.TaskCompletionListener completionListener) {
if ((null != signalingChannel) && (signalingChannel.connected)) {
try {
JSONObject data = new JSONObject();
data.put("to", endpointID);
... | java | public void sendMessage(String message, boolean push, boolean ccSelf, final Respoke.TaskCompletionListener completionListener) {
if ((null != signalingChannel) && (signalingChannel.connected)) {
try {
JSONObject data = new JSONObject();
data.put("to", endpointID);
... | [
"public",
"void",
"sendMessage",
"(",
"String",
"message",
",",
"boolean",
"push",
",",
"boolean",
"ccSelf",
",",
"final",
"Respoke",
".",
"TaskCompletionListener",
"completionListener",
")",
"{",
"if",
"(",
"(",
"null",
"!=",
"signalingChannel",
")",
"&&",
"(... | Send a message to the endpoint through the infrastructure.
@param message The message to send
@param push A flag indicating if a push notification should be sent for this message
@param ccSelf A flag indicating if the message should be copied to other devices the client might be... | [
"Send",
"a",
"message",
"to",
"the",
"endpoint",
"through",
"the",
"infrastructure",
"."
] | 34a15f0558d29b1f1bc8481bbc5c505e855e05ef | https://github.com/respoke/respoke-sdk-android/blob/34a15f0558d29b1f1bc8481bbc5c505e855e05ef/respokeSDK/src/main/java/com/digium/respokesdk/RespokeEndpoint.java#L106-L132 |
145,664 | respoke/respoke-sdk-android | respokeSDK/src/main/java/com/digium/respokesdk/RespokeEndpoint.java | RespokeEndpoint.startCall | public RespokeCall startCall(RespokeCall.Listener callListener, Context context, GLSurfaceView glView, boolean audioOnly) {
RespokeCall call = null;
if ((null != signalingChannel) && (signalingChannel.connected)) {
call = new RespokeCall(signalingChannel, this, false);
call.setL... | java | public RespokeCall startCall(RespokeCall.Listener callListener, Context context, GLSurfaceView glView, boolean audioOnly) {
RespokeCall call = null;
if ((null != signalingChannel) && (signalingChannel.connected)) {
call = new RespokeCall(signalingChannel, this, false);
call.setL... | [
"public",
"RespokeCall",
"startCall",
"(",
"RespokeCall",
".",
"Listener",
"callListener",
",",
"Context",
"context",
",",
"GLSurfaceView",
"glView",
",",
"boolean",
"audioOnly",
")",
"{",
"RespokeCall",
"call",
"=",
"null",
";",
"if",
"(",
"(",
"null",
"!=",
... | Create a new call with audio and optionally video.
@param callListener A listener to receive notifications of call related events
@param context An application context with which to access system resources
@param glView A GLSurfaceView into which video from the call should be rendered, or null if the cal... | [
"Create",
"a",
"new",
"call",
"with",
"audio",
"and",
"optionally",
"video",
"."
] | 34a15f0558d29b1f1bc8481bbc5c505e855e05ef | https://github.com/respoke/respoke-sdk-android/blob/34a15f0558d29b1f1bc8481bbc5c505e855e05ef/respokeSDK/src/main/java/com/digium/respokesdk/RespokeEndpoint.java#L145-L156 |
145,665 | respoke/respoke-sdk-android | respokeSDK/src/main/java/com/digium/respokesdk/RespokeEndpoint.java | RespokeEndpoint.getConnection | public RespokeConnection getConnection(String connectionID, boolean skipCreate) {
RespokeConnection connection = null;
for (RespokeConnection eachConnection : connections) {
if (eachConnection.connectionID.equals(connectionID)) {
connection = eachConnection;
... | java | public RespokeConnection getConnection(String connectionID, boolean skipCreate) {
RespokeConnection connection = null;
for (RespokeConnection eachConnection : connections) {
if (eachConnection.connectionID.equals(connectionID)) {
connection = eachConnection;
... | [
"public",
"RespokeConnection",
"getConnection",
"(",
"String",
"connectionID",
",",
"boolean",
"skipCreate",
")",
"{",
"RespokeConnection",
"connection",
"=",
"null",
";",
"for",
"(",
"RespokeConnection",
"eachConnection",
":",
"connections",
")",
"{",
"if",
"(",
... | Returns a connection with the specified ID, and optionally creates one if it does not exist
@param connectionID The ID of the connection
@param skipCreate Whether or not to create a new connection if it is not found
@return The connection that matches the specified ID, or null if not found and skipCreate is true | [
"Returns",
"a",
"connection",
"with",
"the",
"specified",
"ID",
"and",
"optionally",
"creates",
"one",
"if",
"it",
"does",
"not",
"exist"
] | 34a15f0558d29b1f1bc8481bbc5c505e855e05ef | https://github.com/respoke/respoke-sdk-android/blob/34a15f0558d29b1f1bc8481bbc5c505e855e05ef/respokeSDK/src/main/java/com/digium/respokesdk/RespokeEndpoint.java#L177-L193 |
145,666 | respoke/respoke-sdk-android | respokeSDK/src/main/java/com/digium/respokesdk/RespokeEndpoint.java | RespokeEndpoint.didSendMessage | public void didSendMessage(final String message, final Date timestamp) {
new Handler(Looper.getMainLooper()).post(new Runnable() {
@Override
public void run() {
if (null != listenerReference) {
Listener listener = listenerReference.get();
... | java | public void didSendMessage(final String message, final Date timestamp) {
new Handler(Looper.getMainLooper()).post(new Runnable() {
@Override
public void run() {
if (null != listenerReference) {
Listener listener = listenerReference.get();
... | [
"public",
"void",
"didSendMessage",
"(",
"final",
"String",
"message",
",",
"final",
"Date",
"timestamp",
")",
"{",
"new",
"Handler",
"(",
"Looper",
".",
"getMainLooper",
"(",
")",
")",
".",
"post",
"(",
"new",
"Runnable",
"(",
")",
"{",
"@",
"Override",... | Process a sent message. This is used internally to the SDK and should not be called directly by your client application.
@param message The body of the message
@param timestamp The message timestamp | [
"Process",
"a",
"sent",
"message",
".",
"This",
"is",
"used",
"internally",
"to",
"the",
"SDK",
"and",
"should",
"not",
"be",
"called",
"directly",
"by",
"your",
"client",
"application",
"."
] | 34a15f0558d29b1f1bc8481bbc5c505e855e05ef | https://github.com/respoke/respoke-sdk-android/blob/34a15f0558d29b1f1bc8481bbc5c505e855e05ef/respokeSDK/src/main/java/com/digium/respokesdk/RespokeEndpoint.java#L233-L245 |
145,667 | respoke/respoke-sdk-android | respokeSDK/src/main/java/com/digium/respokesdk/RespokeEndpoint.java | RespokeEndpoint.setDirectConnection | public void setDirectConnection(RespokeDirectConnection newDirectConnection) {
if (null != newDirectConnection) {
directConnectionReference = new WeakReference<RespokeDirectConnection>(newDirectConnection);
} else {
directConnectionReference = null;
}
} | java | public void setDirectConnection(RespokeDirectConnection newDirectConnection) {
if (null != newDirectConnection) {
directConnectionReference = new WeakReference<RespokeDirectConnection>(newDirectConnection);
} else {
directConnectionReference = null;
}
} | [
"public",
"void",
"setDirectConnection",
"(",
"RespokeDirectConnection",
"newDirectConnection",
")",
"{",
"if",
"(",
"null",
"!=",
"newDirectConnection",
")",
"{",
"directConnectionReference",
"=",
"new",
"WeakReference",
"<",
"RespokeDirectConnection",
">",
"(",
"newDi... | Associate a direct connection object with this endpoint. This method is used internally by the SDK should not be called by your client application.
@param newDirectConnection The direct connection to associate | [
"Associate",
"a",
"direct",
"connection",
"object",
"with",
"this",
"endpoint",
".",
"This",
"method",
"is",
"used",
"internally",
"by",
"the",
"SDK",
"should",
"not",
"be",
"called",
"by",
"your",
"client",
"application",
"."
] | 34a15f0558d29b1f1bc8481bbc5c505e855e05ef | https://github.com/respoke/respoke-sdk-android/blob/34a15f0558d29b1f1bc8481bbc5c505e855e05ef/respokeSDK/src/main/java/com/digium/respokesdk/RespokeEndpoint.java#L341-L347 |
145,668 | respoke/respoke-sdk-android | respokeSDK/src/main/java/com/digium/respokesdk/RespokeEndpoint.java | RespokeEndpoint.startDirectConnection | public RespokeDirectConnection startDirectConnection() {
// The constructor will call the setDirectConnection method on this endpoint instance with a reference to the new RespokeDirectConnection object
RespokeCall call = new RespokeCall(signalingChannel, this, true);
call.startCall(null, null, f... | java | public RespokeDirectConnection startDirectConnection() {
// The constructor will call the setDirectConnection method on this endpoint instance with a reference to the new RespokeDirectConnection object
RespokeCall call = new RespokeCall(signalingChannel, this, true);
call.startCall(null, null, f... | [
"public",
"RespokeDirectConnection",
"startDirectConnection",
"(",
")",
"{",
"// The constructor will call the setDirectConnection method on this endpoint instance with a reference to the new RespokeDirectConnection object",
"RespokeCall",
"call",
"=",
"new",
"RespokeCall",
"(",
"signaling... | Create a new DirectConnection. This method creates a new Call as well, attaching this DirectConnection to
it for the purposes of creating a peer-to-peer link for sending data such as messages to the other endpoint.
Information sent through a DirectConnection is not handled by the cloud infrastructure.
@return The Dir... | [
"Create",
"a",
"new",
"DirectConnection",
".",
"This",
"method",
"creates",
"a",
"new",
"Call",
"as",
"well",
"attaching",
"this",
"DirectConnection",
"to",
"it",
"for",
"the",
"purposes",
"of",
"creating",
"a",
"peer",
"-",
"to",
"-",
"peer",
"link",
"for... | 34a15f0558d29b1f1bc8481bbc5c505e855e05ef | https://github.com/respoke/respoke-sdk-android/blob/34a15f0558d29b1f1bc8481bbc5c505e855e05ef/respokeSDK/src/main/java/com/digium/respokesdk/RespokeEndpoint.java#L357-L363 |
145,669 | flow/commons | src/main/java/com/flowpowered/commons/typechecker/TypeChecker.java | TypeChecker.check | public final T check(Object object, T defaultValue) {
try {
return check(object);
} catch (ClassCastException e) {
return defaultValue;
}
} | java | public final T check(Object object, T defaultValue) {
try {
return check(object);
} catch (ClassCastException e) {
return defaultValue;
}
} | [
"public",
"final",
"T",
"check",
"(",
"Object",
"object",
",",
"T",
"defaultValue",
")",
"{",
"try",
"{",
"return",
"check",
"(",
"object",
")",
";",
"}",
"catch",
"(",
"ClassCastException",
"e",
")",
"{",
"return",
"defaultValue",
";",
"}",
"}"
] | Checks and casts an object to the specified type. If casting fails, a default value is returned.
@param object The object to be checked
@param defaultValue The default value to be returned if casting fails
@return The same object, cast to the specified class, or the default value, if casting fails | [
"Checks",
"and",
"casts",
"an",
"object",
"to",
"the",
"specified",
"type",
".",
"If",
"casting",
"fails",
"a",
"default",
"value",
"is",
"returned",
"."
] | 0690efdac06fd728fcd7e9cf10f2b1319379c45b | https://github.com/flow/commons/blob/0690efdac06fd728fcd7e9cf10f2b1319379c45b/src/main/java/com/flowpowered/commons/typechecker/TypeChecker.java#L249-L255 |
145,670 | InferlyticsOSS/druidlet | src/main/java/com/inferlytics/druidlet/app/DruidRunner.java | DruidRunner.run | public Server run() throws Exception {
if (server == null) {
server = new Server(port);
String basePath = "/druid";
buildSwagger(basePath);
HandlerList handlers = new HandlerList();
handlers.addHandler(buildContext(basePath));
server.setHan... | java | public Server run() throws Exception {
if (server == null) {
server = new Server(port);
String basePath = "/druid";
buildSwagger(basePath);
HandlerList handlers = new HandlerList();
handlers.addHandler(buildContext(basePath));
server.setHan... | [
"public",
"Server",
"run",
"(",
")",
"throws",
"Exception",
"{",
"if",
"(",
"server",
"==",
"null",
")",
"{",
"server",
"=",
"new",
"Server",
"(",
"port",
")",
";",
"String",
"basePath",
"=",
"\"/druid\"",
";",
"buildSwagger",
"(",
"basePath",
")",
";"... | Starts the Druid instance and returns the server it is running on
@return server hosting Druid
@throws Exception | [
"Starts",
"the",
"Druid",
"instance",
"and",
"returns",
"the",
"server",
"it",
"is",
"running",
"on"
] | 984beb6519ae9f04df44961553ca2b195521c87d | https://github.com/InferlyticsOSS/druidlet/blob/984beb6519ae9f04df44961553ca2b195521c87d/src/main/java/com/inferlytics/druidlet/app/DruidRunner.java#L65-L78 |
145,671 | InferlyticsOSS/druidlet | src/main/java/com/inferlytics/druidlet/app/DruidRunner.java | DruidRunner.buildSwagger | private static void buildSwagger(String basePath) {
// This configures Swagger
BeanConfig beanConfig = new BeanConfig();
beanConfig.setVersion("1.0.0");
beanConfig.setResourcePackage(QueryResource.class.getPackage().getName());
beanConfig.setBasePath(basePath);
beanConfig... | java | private static void buildSwagger(String basePath) {
// This configures Swagger
BeanConfig beanConfig = new BeanConfig();
beanConfig.setVersion("1.0.0");
beanConfig.setResourcePackage(QueryResource.class.getPackage().getName());
beanConfig.setBasePath(basePath);
beanConfig... | [
"private",
"static",
"void",
"buildSwagger",
"(",
"String",
"basePath",
")",
"{",
"// This configures Swagger",
"BeanConfig",
"beanConfig",
"=",
"new",
"BeanConfig",
"(",
")",
";",
"beanConfig",
".",
"setVersion",
"(",
"\"1.0.0\"",
")",
";",
"beanConfig",
".",
"... | Builds the Swagger documentation
@param basePath Base path where the resources reside | [
"Builds",
"the",
"Swagger",
"documentation"
] | 984beb6519ae9f04df44961553ca2b195521c87d | https://github.com/InferlyticsOSS/druidlet/blob/984beb6519ae9f04df44961553ca2b195521c87d/src/main/java/com/inferlytics/druidlet/app/DruidRunner.java#L85-L94 |
145,672 | InferlyticsOSS/druidlet | src/main/java/com/inferlytics/druidlet/app/DruidRunner.java | DruidRunner.buildContext | private static ContextHandler buildContext(String basePath) {
ResourceConfig resourceConfig = new ResourceConfig();
resourceConfig.packages(QueryResource.class.getPackage().getName(), ApiListingResource.class.getPackage().getName());
ServletContainer servletContainer = new ServletContainer(resou... | java | private static ContextHandler buildContext(String basePath) {
ResourceConfig resourceConfig = new ResourceConfig();
resourceConfig.packages(QueryResource.class.getPackage().getName(), ApiListingResource.class.getPackage().getName());
ServletContainer servletContainer = new ServletContainer(resou... | [
"private",
"static",
"ContextHandler",
"buildContext",
"(",
"String",
"basePath",
")",
"{",
"ResourceConfig",
"resourceConfig",
"=",
"new",
"ResourceConfig",
"(",
")",
";",
"resourceConfig",
".",
"packages",
"(",
"QueryResource",
".",
"class",
".",
"getPackage",
"... | Adds resources to the context to be run on the server
@param basePath Path to add the resources on
@return ContextHandler to add on the server | [
"Adds",
"resources",
"to",
"the",
"context",
"to",
"be",
"run",
"on",
"the",
"server"
] | 984beb6519ae9f04df44961553ca2b195521c87d | https://github.com/InferlyticsOSS/druidlet/blob/984beb6519ae9f04df44961553ca2b195521c87d/src/main/java/com/inferlytics/druidlet/app/DruidRunner.java#L102-L120 |
145,673 | InferlyticsOSS/druidlet | src/main/java/com/inferlytics/druidlet/app/DruidRunner.java | DruidRunner.stop | public void stop() throws Exception {
DruidIndices.getInstance().remove(String.valueOf(port));
server.stop();
} | java | public void stop() throws Exception {
DruidIndices.getInstance().remove(String.valueOf(port));
server.stop();
} | [
"public",
"void",
"stop",
"(",
")",
"throws",
"Exception",
"{",
"DruidIndices",
".",
"getInstance",
"(",
")",
".",
"remove",
"(",
"String",
".",
"valueOf",
"(",
"port",
")",
")",
";",
"server",
".",
"stop",
"(",
")",
";",
"}"
] | Stops the server and removes the index
@throws Exception | [
"Stops",
"the",
"server",
"and",
"removes",
"the",
"index"
] | 984beb6519ae9f04df44961553ca2b195521c87d | https://github.com/InferlyticsOSS/druidlet/blob/984beb6519ae9f04df44961553ca2b195521c87d/src/main/java/com/inferlytics/druidlet/app/DruidRunner.java#L136-L139 |
145,674 | OSSIndex/java-api | src/main/java/net/ossindex/common/PackageDescriptor.java | PackageDescriptor.getPmPackageId | public String getPmPackageId() {
StringBuilder sb = new StringBuilder();
if (pm != null) sb.append(pm);
sb.append(":");
if (group != null) sb.append(group);
sb.append(":");
if (name != null) sb.append(name);
sb.append(":");
if (version != null) sb.append(version);
sb.append(":");
return sb... | java | public String getPmPackageId() {
StringBuilder sb = new StringBuilder();
if (pm != null) sb.append(pm);
sb.append(":");
if (group != null) sb.append(group);
sb.append(":");
if (name != null) sb.append(name);
sb.append(":");
if (version != null) sb.append(version);
sb.append(":");
return sb... | [
"public",
"String",
"getPmPackageId",
"(",
")",
"{",
"StringBuilder",
"sb",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"if",
"(",
"pm",
"!=",
"null",
")",
"sb",
".",
"append",
"(",
"pm",
")",
";",
"sb",
".",
"append",
"(",
"\":\"",
")",
";",
"if",... | Get a reasonable unique ID for the package, including the package manager name.
@return The package ID | [
"Get",
"a",
"reasonable",
"unique",
"ID",
"for",
"the",
"package",
"including",
"the",
"package",
"manager",
"name",
"."
] | 9caca34f08a0ca4a6ec6bdad4102de24d1b3fe0f | https://github.com/OSSIndex/java-api/blob/9caca34f08a0ca4a6ec6bdad4102de24d1b3fe0f/src/main/java/net/ossindex/common/PackageDescriptor.java#L147-L158 |
145,675 | OSSIndex/java-api | src/main/java/net/ossindex/common/PackageDescriptor.java | PackageDescriptor.getPackageId | public String getPackageId() {
StringBuilder sb = new StringBuilder();
if (group != null) sb.append(group);
sb.append(":");
if (name != null) sb.append(name);
sb.append(":");
if (version != null) sb.append(version);
sb.append(":");
return sb.toString();
} | java | public String getPackageId() {
StringBuilder sb = new StringBuilder();
if (group != null) sb.append(group);
sb.append(":");
if (name != null) sb.append(name);
sb.append(":");
if (version != null) sb.append(version);
sb.append(":");
return sb.toString();
} | [
"public",
"String",
"getPackageId",
"(",
")",
"{",
"StringBuilder",
"sb",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"if",
"(",
"group",
"!=",
"null",
")",
"sb",
".",
"append",
"(",
"group",
")",
";",
"sb",
".",
"append",
"(",
"\":\"",
")",
";",
"... | Get a reasonable unique ID for the package.
@return The package ID | [
"Get",
"a",
"reasonable",
"unique",
"ID",
"for",
"the",
"package",
"."
] | 9caca34f08a0ca4a6ec6bdad4102de24d1b3fe0f | https://github.com/OSSIndex/java-api/blob/9caca34f08a0ca4a6ec6bdad4102de24d1b3fe0f/src/main/java/net/ossindex/common/PackageDescriptor.java#L164-L173 |
145,676 | litsec/swedish-eid-shibboleth-base | shibboleth-base/shibboleth-extensions/src/main/java/se/litsec/shibboleth/idp/authn/service/impl/AuthnContextServiceImpl.java | AuthnContextServiceImpl.toSignMessageURI | protected String toSignMessageURI(String uri) {
LoaEnum loa = LoaEnum.parse(uri);
if (loa == null) {
return null;
}
if (loa.isSignatureMessageUri()) {
return uri;
}
for (LoaEnum l : LoaEnum.values()) {
if (l.getBaseUri().equals(loa.getBaseUri()) && l.isSignatureMessageUri() && ... | java | protected String toSignMessageURI(String uri) {
LoaEnum loa = LoaEnum.parse(uri);
if (loa == null) {
return null;
}
if (loa.isSignatureMessageUri()) {
return uri;
}
for (LoaEnum l : LoaEnum.values()) {
if (l.getBaseUri().equals(loa.getBaseUri()) && l.isSignatureMessageUri() && ... | [
"protected",
"String",
"toSignMessageURI",
"(",
"String",
"uri",
")",
"{",
"LoaEnum",
"loa",
"=",
"LoaEnum",
".",
"parse",
"(",
"uri",
")",
";",
"if",
"(",
"loa",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"if",
"(",
"loa",
".",
"isSignature... | Given a base URI, the method returns its corresponding sigmessage URI.
@param uri
the URI to transform
@return the sigmessage URI, or {@code null} if no such exists | [
"Given",
"a",
"base",
"URI",
"the",
"method",
"returns",
"its",
"corresponding",
"sigmessage",
"URI",
"."
] | aaaa467ff61f07d7dfa31627fb36851a37da6804 | https://github.com/litsec/swedish-eid-shibboleth-base/blob/aaaa467ff61f07d7dfa31627fb36851a37da6804/shibboleth-base/shibboleth-extensions/src/main/java/se/litsec/shibboleth/idp/authn/service/impl/AuthnContextServiceImpl.java#L319-L333 |
145,677 | litsec/swedish-eid-shibboleth-base | shibboleth-base/shibboleth-extensions/src/main/java/se/litsec/shibboleth/idp/authn/service/impl/AuthnContextServiceImpl.java | AuthnContextServiceImpl.toBaseURI | protected String toBaseURI(String uri) {
LoaEnum loa = LoaEnum.parse(uri);
if (loa != null && loa.isSignatureMessageUri()) {
return LoaEnum.minusSigMessage(loa).getUri();
}
return uri;
} | java | protected String toBaseURI(String uri) {
LoaEnum loa = LoaEnum.parse(uri);
if (loa != null && loa.isSignatureMessageUri()) {
return LoaEnum.minusSigMessage(loa).getUri();
}
return uri;
} | [
"protected",
"String",
"toBaseURI",
"(",
"String",
"uri",
")",
"{",
"LoaEnum",
"loa",
"=",
"LoaEnum",
".",
"parse",
"(",
"uri",
")",
";",
"if",
"(",
"loa",
"!=",
"null",
"&&",
"loa",
".",
"isSignatureMessageUri",
"(",
")",
")",
"{",
"return",
"LoaEnum"... | Given an URI its base form is returned. This means that the URI minus any potential sigmessage extension.
@param uri
the URI to convert
@return the base URI | [
"Given",
"an",
"URI",
"its",
"base",
"form",
"is",
"returned",
".",
"This",
"means",
"that",
"the",
"URI",
"minus",
"any",
"potential",
"sigmessage",
"extension",
"."
] | aaaa467ff61f07d7dfa31627fb36851a37da6804 | https://github.com/litsec/swedish-eid-shibboleth-base/blob/aaaa467ff61f07d7dfa31627fb36851a37da6804/shibboleth-base/shibboleth-extensions/src/main/java/se/litsec/shibboleth/idp/authn/service/impl/AuthnContextServiceImpl.java#L342-L348 |
145,678 | javabits/pojo-mbean | pojo-mbean-impl/src/main/java/org/softee/management/helper/MBeanRegistration.java | MBeanRegistration.register | public void register() throws ManagementException {
try {
DynamicMBean dynamicMBean = new IntrospectedDynamicMBean(mBean);
mBeanServer.registerMBean(dynamicMBean, mBeanObjectName);
} catch (Exception e) {
throw new ManagementException(e);
}
} | java | public void register() throws ManagementException {
try {
DynamicMBean dynamicMBean = new IntrospectedDynamicMBean(mBean);
mBeanServer.registerMBean(dynamicMBean, mBeanObjectName);
} catch (Exception e) {
throw new ManagementException(e);
}
} | [
"public",
"void",
"register",
"(",
")",
"throws",
"ManagementException",
"{",
"try",
"{",
"DynamicMBean",
"dynamicMBean",
"=",
"new",
"IntrospectedDynamicMBean",
"(",
"mBean",
")",
";",
"mBeanServer",
".",
"registerMBean",
"(",
"dynamicMBean",
",",
"mBeanObjectName"... | Register the MXBean.
If the registration fails, a WARN message is logged
@throws java.beans.IntrospectionException
@throws IntrospectionException
@throws NotCompliantMBeanException
@throws MBeanRegistrationException
@throws InstanceAlreadyExistsException | [
"Register",
"the",
"MXBean",
".",
"If",
"the",
"registration",
"fails",
"a",
"WARN",
"message",
"is",
"logged"
] | 9aa7fb065e560ec1e3e63373b28cd95ad438b26a | https://github.com/javabits/pojo-mbean/blob/9aa7fb065e560ec1e3e63373b28cd95ad438b26a/pojo-mbean-impl/src/main/java/org/softee/management/helper/MBeanRegistration.java#L74-L81 |
145,679 | flow/commons | src/main/java/com/flowpowered/commons/ticking/Timer.java | Timer.sync | public void sync() {
if (nextTick < 0) {
throw new IllegalStateException("Timer was not started");
}
if (tps <= 0) {
return;
}
try {
// Sleep until the average sleep time is greater than the time remaining until next tick
for (long ... | java | public void sync() {
if (nextTick < 0) {
throw new IllegalStateException("Timer was not started");
}
if (tps <= 0) {
return;
}
try {
// Sleep until the average sleep time is greater than the time remaining until next tick
for (long ... | [
"public",
"void",
"sync",
"(",
")",
"{",
"if",
"(",
"nextTick",
"<",
"0",
")",
"{",
"throw",
"new",
"IllegalStateException",
"(",
"\"Timer was not started\"",
")",
";",
"}",
"if",
"(",
"tps",
"<=",
"0",
")",
"{",
"return",
";",
"}",
"try",
"{",
"// S... | An accurate sync method that will attempt to run at the tps. It should be called once every tick. | [
"An",
"accurate",
"sync",
"method",
"that",
"will",
"attempt",
"to",
"run",
"at",
"the",
"tps",
".",
"It",
"should",
"be",
"called",
"once",
"every",
"tick",
"."
] | 0690efdac06fd728fcd7e9cf10f2b1319379c45b | https://github.com/flow/commons/blob/0690efdac06fd728fcd7e9cf10f2b1319379c45b/src/main/java/com/flowpowered/commons/ticking/Timer.java#L98-L124 |
145,680 | flow/commons | src/main/java/com/flowpowered/commons/hashing/Int10TripleHashed.java | Int10TripleHashed.setBase | public final void setBase(int bx, int by, int bz) {
this.bx = bx;
this.by = by;
this.bz = bz;
} | java | public final void setBase(int bx, int by, int bz) {
this.bx = bx;
this.by = by;
this.bz = bz;
} | [
"public",
"final",
"void",
"setBase",
"(",
"int",
"bx",
",",
"int",
"by",
",",
"int",
"bz",
")",
"{",
"this",
".",
"bx",
"=",
"bx",
";",
"this",
".",
"by",
"=",
"by",
";",
"this",
".",
"bz",
"=",
"bz",
";",
"}"
] | Sets the base of the hash to the given values | [
"Sets",
"the",
"base",
"of",
"the",
"hash",
"to",
"the",
"given",
"values"
] | 0690efdac06fd728fcd7e9cf10f2b1319379c45b | https://github.com/flow/commons/blob/0690efdac06fd728fcd7e9cf10f2b1319379c45b/src/main/java/com/flowpowered/commons/hashing/Int10TripleHashed.java#L43-L47 |
145,681 | politie/cinch | src/main/java/eu/icolumbo/cinch/SpringContext.java | SpringContext.getContext | public static synchronized AbstractApplicationContext getContext(Class<?> springConfigurationClass) {
if (!CONTEXTS.containsKey(springConfigurationClass)) {
AbstractApplicationContext context = new AnnotationConfigApplicationContext(springConfigurationClass);
context.registerShutdownHook... | java | public static synchronized AbstractApplicationContext getContext(Class<?> springConfigurationClass) {
if (!CONTEXTS.containsKey(springConfigurationClass)) {
AbstractApplicationContext context = new AnnotationConfigApplicationContext(springConfigurationClass);
context.registerShutdownHook... | [
"public",
"static",
"synchronized",
"AbstractApplicationContext",
"getContext",
"(",
"Class",
"<",
"?",
">",
"springConfigurationClass",
")",
"{",
"if",
"(",
"!",
"CONTEXTS",
".",
"containsKey",
"(",
"springConfigurationClass",
")",
")",
"{",
"AbstractApplicationConte... | Get application context for configuration class. | [
"Get",
"application",
"context",
"for",
"configuration",
"class",
"."
] | 1986b16d397be343a4e1a3f372f14981f70d5de3 | https://github.com/politie/cinch/blob/1986b16d397be343a4e1a3f372f14981f70d5de3/src/main/java/eu/icolumbo/cinch/SpringContext.java#L19-L27 |
145,682 | flow/commons | src/main/java/com/flowpowered/commons/store/block/impl/AtomicShortIntPaletteBackingArray.java | AtomicShortIntPaletteBackingArray.getId | private int getId(int value) throws PaletteFullException {
short id = idLookup.get(value);
if (!idLookup.isEmptyValue(id)) {
return id;
} else {
id = (short) paletteCounter.getAndIncrement();
if (id >= paletteSize) {
throw new PaletteFullExcept... | java | private int getId(int value) throws PaletteFullException {
short id = idLookup.get(value);
if (!idLookup.isEmptyValue(id)) {
return id;
} else {
id = (short) paletteCounter.getAndIncrement();
if (id >= paletteSize) {
throw new PaletteFullExcept... | [
"private",
"int",
"getId",
"(",
"int",
"value",
")",
"throws",
"PaletteFullException",
"{",
"short",
"id",
"=",
"idLookup",
".",
"get",
"(",
"value",
")",
";",
"if",
"(",
"!",
"idLookup",
".",
"isEmptyValue",
"(",
"id",
")",
")",
"{",
"return",
"id",
... | Gets the id for the given value, allocating an id if required
@return the id | [
"Gets",
"the",
"id",
"for",
"the",
"given",
"value",
"allocating",
"an",
"id",
"if",
"required"
] | 0690efdac06fd728fcd7e9cf10f2b1319379c45b | https://github.com/flow/commons/blob/0690efdac06fd728fcd7e9cf10f2b1319379c45b/src/main/java/com/flowpowered/commons/store/block/impl/AtomicShortIntPaletteBackingArray.java#L166-L182 |
145,683 | respoke/respoke-sdk-android | respokeSDK/src/main/java/com/digium/respokesdk/RespokeCall.java | RespokeCall.sdpHasVideo | public static boolean sdpHasVideo(JSONObject sdp) {
boolean hasVideo = false;
if (null != sdp) {
try {
String sdpString = sdp.getString("sdp");
hasVideo = sdpString.contains("m=video");
} catch (JSONException e) {
// Bad SDP?
... | java | public static boolean sdpHasVideo(JSONObject sdp) {
boolean hasVideo = false;
if (null != sdp) {
try {
String sdpString = sdp.getString("sdp");
hasVideo = sdpString.contains("m=video");
} catch (JSONException e) {
// Bad SDP?
... | [
"public",
"static",
"boolean",
"sdpHasVideo",
"(",
"JSONObject",
"sdp",
")",
"{",
"boolean",
"hasVideo",
"=",
"false",
";",
"if",
"(",
"null",
"!=",
"sdp",
")",
"{",
"try",
"{",
"String",
"sdpString",
"=",
"sdp",
".",
"getString",
"(",
"\"sdp\"",
")",
... | Determines if the specified SDP data contains definitions for a video stream
@param sdp The SDP data to examine
@return True if a video stream definition is present, false otherwise | [
"Determines",
"if",
"the",
"specified",
"SDP",
"data",
"contains",
"definitions",
"for",
"a",
"video",
"stream"
] | 34a15f0558d29b1f1bc8481bbc5c505e855e05ef | https://github.com/respoke/respoke-sdk-android/blob/34a15f0558d29b1f1bc8481bbc5c505e855e05ef/respokeSDK/src/main/java/com/digium/respokesdk/RespokeCall.java#L138-L152 |
145,684 | respoke/respoke-sdk-android | respokeSDK/src/main/java/com/digium/respokesdk/RespokeCall.java | RespokeCall.commonConstructor | private void commonConstructor(RespokeSignalingChannel channel) {
signalingChannel = channel;
iceServers = new ArrayList<PeerConnection.IceServer>();
queuedLocalCandidates = new ArrayList<IceCandidate>();
queuedRemoteCandidates = new ArrayList<IceCandidate>();
collectedLocalCandi... | java | private void commonConstructor(RespokeSignalingChannel channel) {
signalingChannel = channel;
iceServers = new ArrayList<PeerConnection.IceServer>();
queuedLocalCandidates = new ArrayList<IceCandidate>();
queuedRemoteCandidates = new ArrayList<IceCandidate>();
collectedLocalCandi... | [
"private",
"void",
"commonConstructor",
"(",
"RespokeSignalingChannel",
"channel",
")",
"{",
"signalingChannel",
"=",
"channel",
";",
"iceServers",
"=",
"new",
"ArrayList",
"<",
"PeerConnection",
".",
"IceServer",
">",
"(",
")",
";",
"queuedLocalCandidates",
"=",
... | Common constructor logic
@param channel The signaling channel to use for the call | [
"Common",
"constructor",
"logic"
] | 34a15f0558d29b1f1bc8481bbc5c505e855e05ef | https://github.com/respoke/respoke-sdk-android/blob/34a15f0558d29b1f1bc8481bbc5c505e855e05ef/respokeSDK/src/main/java/com/digium/respokesdk/RespokeCall.java#L229-L248 |
145,685 | respoke/respoke-sdk-android | respokeSDK/src/main/java/com/digium/respokesdk/RespokeCall.java | RespokeCall.startCall | public void startCall(final Context context, GLSurfaceView glView, boolean isAudioOnly) {
caller = true;
audioOnly = isAudioOnly;
if (directConnectionOnly) {
if (null == directConnection) {
actuallyAddDirectConnection();
}
directConnectionDid... | java | public void startCall(final Context context, GLSurfaceView glView, boolean isAudioOnly) {
caller = true;
audioOnly = isAudioOnly;
if (directConnectionOnly) {
if (null == directConnection) {
actuallyAddDirectConnection();
}
directConnectionDid... | [
"public",
"void",
"startCall",
"(",
"final",
"Context",
"context",
",",
"GLSurfaceView",
"glView",
",",
"boolean",
"isAudioOnly",
")",
"{",
"caller",
"=",
"true",
";",
"audioOnly",
"=",
"isAudioOnly",
";",
"if",
"(",
"directConnectionOnly",
")",
"{",
"if",
"... | Start the outgoing call process. This method is used internally by the SDK and should never be called directly from your client application
@param context An application context with which to access shared resources
@param glView The GLSurfaceView on which to render video if applicable
@param isAudioOnly S... | [
"Start",
"the",
"outgoing",
"call",
"process",
".",
"This",
"method",
"is",
"used",
"internally",
"by",
"the",
"SDK",
"and",
"should",
"never",
"be",
"called",
"directly",
"from",
"your",
"client",
"application"
] | 34a15f0558d29b1f1bc8481bbc5c505e855e05ef | https://github.com/respoke/respoke-sdk-android/blob/34a15f0558d29b1f1bc8481bbc5c505e855e05ef/respokeSDK/src/main/java/com/digium/respokesdk/RespokeCall.java#L278-L306 |
145,686 | respoke/respoke-sdk-android | respokeSDK/src/main/java/com/digium/respokesdk/RespokeCall.java | RespokeCall.attachVideoRenderer | public void attachVideoRenderer(GLSurfaceView glView) {
if (null != glView) {
VideoRendererGui.setView(glView, new Runnable() {
@Override
public void run() {
Log.d(TAG, "VideoRendererGui GL Context ready");
}
});
... | java | public void attachVideoRenderer(GLSurfaceView glView) {
if (null != glView) {
VideoRendererGui.setView(glView, new Runnable() {
@Override
public void run() {
Log.d(TAG, "VideoRendererGui GL Context ready");
}
});
... | [
"public",
"void",
"attachVideoRenderer",
"(",
"GLSurfaceView",
"glView",
")",
"{",
"if",
"(",
"null",
"!=",
"glView",
")",
"{",
"VideoRendererGui",
".",
"setView",
"(",
"glView",
",",
"new",
"Runnable",
"(",
")",
"{",
"@",
"Override",
"public",
"void",
"ru... | Attach the call's video renderers to the specified GLSurfaceView
@param glView The GLSurfaceView on which to render video | [
"Attach",
"the",
"call",
"s",
"video",
"renderers",
"to",
"the",
"specified",
"GLSurfaceView"
] | 34a15f0558d29b1f1bc8481bbc5c505e855e05ef | https://github.com/respoke/respoke-sdk-android/blob/34a15f0558d29b1f1bc8481bbc5c505e855e05ef/respokeSDK/src/main/java/com/digium/respokesdk/RespokeCall.java#L314-L328 |
145,687 | respoke/respoke-sdk-android | respokeSDK/src/main/java/com/digium/respokesdk/RespokeCall.java | RespokeCall.answer | public void answer(final Context context, Listener newListener) {
if (!caller) {
listenerReference = new WeakReference<Listener>(newListener);
getTurnServerCredentials(new Respoke.TaskCompletionListener() {
@Override
public void onSuccess() {
... | java | public void answer(final Context context, Listener newListener) {
if (!caller) {
listenerReference = new WeakReference<Listener>(newListener);
getTurnServerCredentials(new Respoke.TaskCompletionListener() {
@Override
public void onSuccess() {
... | [
"public",
"void",
"answer",
"(",
"final",
"Context",
"context",
",",
"Listener",
"newListener",
")",
"{",
"if",
"(",
"!",
"caller",
")",
"{",
"listenerReference",
"=",
"new",
"WeakReference",
"<",
"Listener",
">",
"(",
"newListener",
")",
";",
"getTurnServer... | Answer the call and start the process of obtaining media. This method is called automatically on the caller's
side. This method must be called on the callee's side to indicate that the endpoint does wish to accept the
call.
@param context An application context with which to access shared resources
@param newList... | [
"Answer",
"the",
"call",
"and",
"start",
"the",
"process",
"of",
"obtaining",
"media",
".",
"This",
"method",
"is",
"called",
"automatically",
"on",
"the",
"caller",
"s",
"side",
".",
"This",
"method",
"must",
"be",
"called",
"on",
"the",
"callee",
"s",
... | 34a15f0558d29b1f1bc8481bbc5c505e855e05ef | https://github.com/respoke/respoke-sdk-android/blob/34a15f0558d29b1f1bc8481bbc5c505e855e05ef/respokeSDK/src/main/java/com/digium/respokesdk/RespokeCall.java#L339-L357 |
145,688 | respoke/respoke-sdk-android | respokeSDK/src/main/java/com/digium/respokesdk/RespokeCall.java | RespokeCall.hangup | public void hangup(boolean shouldSendHangupSignal) {
if (!isHangingUp) {
isHangingUp = true;
if (shouldSendHangupSignal) {
try {
JSONObject data = new JSONObject("{'signalType':'bye','version':'1.0'}");
data.put("target", directCo... | java | public void hangup(boolean shouldSendHangupSignal) {
if (!isHangingUp) {
isHangingUp = true;
if (shouldSendHangupSignal) {
try {
JSONObject data = new JSONObject("{'signalType':'bye','version':'1.0'}");
data.put("target", directCo... | [
"public",
"void",
"hangup",
"(",
"boolean",
"shouldSendHangupSignal",
")",
"{",
"if",
"(",
"!",
"isHangingUp",
")",
"{",
"isHangingUp",
"=",
"true",
";",
"if",
"(",
"shouldSendHangupSignal",
")",
"{",
"try",
"{",
"JSONObject",
"data",
"=",
"new",
"JSONObject... | Tear down the call and release resources
@param shouldSendHangupSignal Send a hangup signal to the remote party if signal is not false and we have not received a hangup signal from the remote party. | [
"Tear",
"down",
"the",
"call",
"and",
"release",
"resources"
] | 34a15f0558d29b1f1bc8481bbc5c505e855e05ef | https://github.com/respoke/respoke-sdk-android/blob/34a15f0558d29b1f1bc8481bbc5c505e855e05ef/respokeSDK/src/main/java/com/digium/respokesdk/RespokeCall.java#L365-L409 |
145,689 | respoke/respoke-sdk-android | respokeSDK/src/main/java/com/digium/respokesdk/RespokeCall.java | RespokeCall.muteVideo | public void muteVideo(boolean mute) {
if (!audioOnly && (null != localStream) && (isActive())) {
for (MediaStreamTrack eachTrack : localStream.videoTracks) {
eachTrack.setEnabled(!mute);
}
}
} | java | public void muteVideo(boolean mute) {
if (!audioOnly && (null != localStream) && (isActive())) {
for (MediaStreamTrack eachTrack : localStream.videoTracks) {
eachTrack.setEnabled(!mute);
}
}
} | [
"public",
"void",
"muteVideo",
"(",
"boolean",
"mute",
")",
"{",
"if",
"(",
"!",
"audioOnly",
"&&",
"(",
"null",
"!=",
"localStream",
")",
"&&",
"(",
"isActive",
"(",
")",
")",
")",
"{",
"for",
"(",
"MediaStreamTrack",
"eachTrack",
":",
"localStream",
... | Mute or unmute the local video
@param mute If true, mute the video. If false, unmute the video | [
"Mute",
"or",
"unmute",
"the",
"local",
"video"
] | 34a15f0558d29b1f1bc8481bbc5c505e855e05ef | https://github.com/respoke/respoke-sdk-android/blob/34a15f0558d29b1f1bc8481bbc5c505e855e05ef/respokeSDK/src/main/java/com/digium/respokesdk/RespokeCall.java#L417-L423 |
145,690 | respoke/respoke-sdk-android | respokeSDK/src/main/java/com/digium/respokesdk/RespokeCall.java | RespokeCall.videoIsMuted | public boolean videoIsMuted() {
boolean isMuted = true;
if (!audioOnly && (null != localStream)) {
for (MediaStreamTrack eachTrack : localStream.videoTracks) {
if (eachTrack.enabled()) {
isMuted = false;
}
}
}
... | java | public boolean videoIsMuted() {
boolean isMuted = true;
if (!audioOnly && (null != localStream)) {
for (MediaStreamTrack eachTrack : localStream.videoTracks) {
if (eachTrack.enabled()) {
isMuted = false;
}
}
}
... | [
"public",
"boolean",
"videoIsMuted",
"(",
")",
"{",
"boolean",
"isMuted",
"=",
"true",
";",
"if",
"(",
"!",
"audioOnly",
"&&",
"(",
"null",
"!=",
"localStream",
")",
")",
"{",
"for",
"(",
"MediaStreamTrack",
"eachTrack",
":",
"localStream",
".",
"videoTrac... | Indicates if the local video stream is muted
@return returns true if the local video stream is currently muted | [
"Indicates",
"if",
"the",
"local",
"video",
"stream",
"is",
"muted"
] | 34a15f0558d29b1f1bc8481bbc5c505e855e05ef | https://github.com/respoke/respoke-sdk-android/blob/34a15f0558d29b1f1bc8481bbc5c505e855e05ef/respokeSDK/src/main/java/com/digium/respokesdk/RespokeCall.java#L431-L443 |
145,691 | respoke/respoke-sdk-android | respokeSDK/src/main/java/com/digium/respokesdk/RespokeCall.java | RespokeCall.muteAudio | public void muteAudio(boolean mute) {
if ((null != localStream) && isActive()) {
for (MediaStreamTrack eachTrack : localStream.audioTracks) {
eachTrack.setEnabled(!mute);
}
}
} | java | public void muteAudio(boolean mute) {
if ((null != localStream) && isActive()) {
for (MediaStreamTrack eachTrack : localStream.audioTracks) {
eachTrack.setEnabled(!mute);
}
}
} | [
"public",
"void",
"muteAudio",
"(",
"boolean",
"mute",
")",
"{",
"if",
"(",
"(",
"null",
"!=",
"localStream",
")",
"&&",
"isActive",
"(",
")",
")",
"{",
"for",
"(",
"MediaStreamTrack",
"eachTrack",
":",
"localStream",
".",
"audioTracks",
")",
"{",
"eachT... | Mute or unmute the local audio
@param mute If true, mute the audio. If false, unmute the audio | [
"Mute",
"or",
"unmute",
"the",
"local",
"audio"
] | 34a15f0558d29b1f1bc8481bbc5c505e855e05ef | https://github.com/respoke/respoke-sdk-android/blob/34a15f0558d29b1f1bc8481bbc5c505e855e05ef/respokeSDK/src/main/java/com/digium/respokesdk/RespokeCall.java#L451-L457 |
145,692 | respoke/respoke-sdk-android | respokeSDK/src/main/java/com/digium/respokesdk/RespokeCall.java | RespokeCall.audioIsMuted | public boolean audioIsMuted() {
boolean isMuted = true;
if (null != localStream) {
for (MediaStreamTrack eachTrack : localStream.audioTracks) {
if (eachTrack.enabled()) {
isMuted = false;
}
}
}
return isMuted;
... | java | public boolean audioIsMuted() {
boolean isMuted = true;
if (null != localStream) {
for (MediaStreamTrack eachTrack : localStream.audioTracks) {
if (eachTrack.enabled()) {
isMuted = false;
}
}
}
return isMuted;
... | [
"public",
"boolean",
"audioIsMuted",
"(",
")",
"{",
"boolean",
"isMuted",
"=",
"true",
";",
"if",
"(",
"null",
"!=",
"localStream",
")",
"{",
"for",
"(",
"MediaStreamTrack",
"eachTrack",
":",
"localStream",
".",
"audioTracks",
")",
"{",
"if",
"(",
"eachTra... | Indicates if the local audio stream is muted
@return returns true if the local audio stream is currently muted | [
"Indicates",
"if",
"the",
"local",
"audio",
"stream",
"is",
"muted"
] | 34a15f0558d29b1f1bc8481bbc5c505e855e05ef | https://github.com/respoke/respoke-sdk-android/blob/34a15f0558d29b1f1bc8481bbc5c505e855e05ef/respokeSDK/src/main/java/com/digium/respokesdk/RespokeCall.java#L465-L477 |
145,693 | respoke/respoke-sdk-android | respokeSDK/src/main/java/com/digium/respokesdk/RespokeCall.java | RespokeCall.hangupReceived | public void hangupReceived() {
if (!isHangingUp) {
isHangingUp = true;
if (null != listenerReference) {
// Disconnect will clear the listenerReference, so grab a reference to the
// listener while it's still alive since the listener will be notified in a
... | java | public void hangupReceived() {
if (!isHangingUp) {
isHangingUp = true;
if (null != listenerReference) {
// Disconnect will clear the listenerReference, so grab a reference to the
// listener while it's still alive since the listener will be notified in a
... | [
"public",
"void",
"hangupReceived",
"(",
")",
"{",
"if",
"(",
"!",
"isHangingUp",
")",
"{",
"isHangingUp",
"=",
"true",
";",
"if",
"(",
"null",
"!=",
"listenerReference",
")",
"{",
"// Disconnect will clear the listenerReference, so grab a reference to the",
"// liste... | Process a hangup message received from the remote endpoint. This is used internally to the SDK and should not be called directly by your client application. | [
"Process",
"a",
"hangup",
"message",
"received",
"from",
"the",
"remote",
"endpoint",
".",
"This",
"is",
"used",
"internally",
"to",
"the",
"SDK",
"and",
"should",
"not",
"be",
"called",
"directly",
"by",
"your",
"client",
"application",
"."
] | 34a15f0558d29b1f1bc8481bbc5c505e855e05ef | https://github.com/respoke/respoke-sdk-android/blob/34a15f0558d29b1f1bc8481bbc5c505e855e05ef/respokeSDK/src/main/java/com/digium/respokesdk/RespokeCall.java#L504-L525 |
145,694 | respoke/respoke-sdk-android | respokeSDK/src/main/java/com/digium/respokesdk/RespokeCall.java | RespokeCall.answerReceived | public void answerReceived(JSONObject remoteSDP, String remoteConnection) {
if (isActive()) {
incomingSDP = remoteSDP;
toConnection = remoteConnection;
try {
JSONObject signalData = new JSONObject("{'signalType':'connected','version':'1.0'}");
... | java | public void answerReceived(JSONObject remoteSDP, String remoteConnection) {
if (isActive()) {
incomingSDP = remoteSDP;
toConnection = remoteConnection;
try {
JSONObject signalData = new JSONObject("{'signalType':'connected','version':'1.0'}");
... | [
"public",
"void",
"answerReceived",
"(",
"JSONObject",
"remoteSDP",
",",
"String",
"remoteConnection",
")",
"{",
"if",
"(",
"isActive",
"(",
")",
")",
"{",
"incomingSDP",
"=",
"remoteSDP",
";",
"toConnection",
"=",
"remoteConnection",
";",
"try",
"{",
"JSONObj... | Process an answer message received from the remote endpoint. This is used internally to the SDK and should not be called directly by your client application.
@param remoteSDP Remote SDP data
@param remoteConnection Remote connection that answered the call | [
"Process",
"an",
"answer",
"message",
"received",
"from",
"the",
"remote",
"endpoint",
".",
"This",
"is",
"used",
"internally",
"to",
"the",
"SDK",
"and",
"should",
"not",
"be",
"called",
"directly",
"by",
"your",
"client",
"application",
"."
] | 34a15f0558d29b1f1bc8481bbc5c505e855e05ef | https://github.com/respoke/respoke-sdk-android/blob/34a15f0558d29b1f1bc8481bbc5c505e855e05ef/respokeSDK/src/main/java/com/digium/respokesdk/RespokeCall.java#L534-L578 |
145,695 | respoke/respoke-sdk-android | respokeSDK/src/main/java/com/digium/respokesdk/RespokeCall.java | RespokeCall.connectedReceived | public void connectedReceived() {
if (null != listenerReference) {
final Listener listener = listenerReference.get();
if (null != listener) {
new Handler(Looper.getMainLooper()).post(new Runnable() {
public void run() {
if (isAc... | java | public void connectedReceived() {
if (null != listenerReference) {
final Listener listener = listenerReference.get();
if (null != listener) {
new Handler(Looper.getMainLooper()).post(new Runnable() {
public void run() {
if (isAc... | [
"public",
"void",
"connectedReceived",
"(",
")",
"{",
"if",
"(",
"null",
"!=",
"listenerReference",
")",
"{",
"final",
"Listener",
"listener",
"=",
"listenerReference",
".",
"get",
"(",
")",
";",
"if",
"(",
"null",
"!=",
"listener",
")",
"{",
"new",
"Han... | Process a connected messsage received from the remote endpoint. This is used internally to the SDK and should not be called directly by your client application. | [
"Process",
"a",
"connected",
"messsage",
"received",
"from",
"the",
"remote",
"endpoint",
".",
"This",
"is",
"used",
"internally",
"to",
"the",
"SDK",
"and",
"should",
"not",
"be",
"called",
"directly",
"by",
"your",
"client",
"application",
"."
] | 34a15f0558d29b1f1bc8481bbc5c505e855e05ef | https://github.com/respoke/respoke-sdk-android/blob/34a15f0558d29b1f1bc8481bbc5c505e855e05ef/respokeSDK/src/main/java/com/digium/respokesdk/RespokeCall.java#L584-L597 |
145,696 | respoke/respoke-sdk-android | respokeSDK/src/main/java/com/digium/respokesdk/RespokeCall.java | RespokeCall.iceCandidatesReceived | public void iceCandidatesReceived(JSONArray candidates) {
if (isActive()) {
for (int ii = 0; ii < candidates.length(); ii++) {
try {
JSONObject eachCandidate = (JSONObject) candidates.get(ii);
String mid = eachCandidate.getString("sdpMid");
... | java | public void iceCandidatesReceived(JSONArray candidates) {
if (isActive()) {
for (int ii = 0; ii < candidates.length(); ii++) {
try {
JSONObject eachCandidate = (JSONObject) candidates.get(ii);
String mid = eachCandidate.getString("sdpMid");
... | [
"public",
"void",
"iceCandidatesReceived",
"(",
"JSONArray",
"candidates",
")",
"{",
"if",
"(",
"isActive",
"(",
")",
")",
"{",
"for",
"(",
"int",
"ii",
"=",
"0",
";",
"ii",
"<",
"candidates",
".",
"length",
"(",
")",
";",
"ii",
"++",
")",
"{",
"tr... | Process ICE candidates suggested by the remote endpoint. This is used internally to the SDK and should not be called directly by your client application.
@param candidates Array of candidates to evaluate | [
"Process",
"ICE",
"candidates",
"suggested",
"by",
"the",
"remote",
"endpoint",
".",
"This",
"is",
"used",
"internally",
"to",
"the",
"SDK",
"and",
"should",
"not",
"be",
"called",
"directly",
"by",
"your",
"client",
"application",
"."
] | 34a15f0558d29b1f1bc8481bbc5c505e855e05ef | https://github.com/respoke/respoke-sdk-android/blob/34a15f0558d29b1f1bc8481bbc5c505e855e05ef/respokeSDK/src/main/java/com/digium/respokesdk/RespokeCall.java#L605-L637 |
145,697 | flow/commons | src/main/java/com/flowpowered/commons/hashing/SignedTenBitTripleHashed.java | SignedTenBitTripleHashed.add | public static int add(int key, int x, int y, int z) {
int offset = key(x, y, z);
return (key + offset) & mask;
} | java | public static int add(int key, int x, int y, int z) {
int offset = key(x, y, z);
return (key + offset) & mask;
} | [
"public",
"static",
"int",
"add",
"(",
"int",
"key",
",",
"int",
"x",
",",
"int",
"y",
",",
"int",
"z",
")",
"{",
"int",
"offset",
"=",
"key",
"(",
"x",
",",
"y",
",",
"z",
")",
";",
"return",
"(",
"key",
"+",
"offset",
")",
"&",
"mask",
";... | Adds the given offset to the packed key
@param key the base key
@param x the x offset
@param y the y offset
@param z the z offset
@return the new key | [
"Adds",
"the",
"given",
"offset",
"to",
"the",
"packed",
"key"
] | 0690efdac06fd728fcd7e9cf10f2b1319379c45b | https://github.com/flow/commons/blob/0690efdac06fd728fcd7e9cf10f2b1319379c45b/src/main/java/com/flowpowered/commons/hashing/SignedTenBitTripleHashed.java#L93-L96 |
145,698 | netheosgithub/pcs_api | java/src/main/java/net/netheos/pcsapi/utils/PcsUtils.java | PcsUtils.buildCStorageException | public static CStorageException buildCStorageException( CResponse response, String message, CPath path )
{
switch ( response.getStatus() ) {
case 401:
return new CAuthenticationException( message, response );
case 404:
message = "No file found at URL ... | java | public static CStorageException buildCStorageException( CResponse response, String message, CPath path )
{
switch ( response.getStatus() ) {
case 401:
return new CAuthenticationException( message, response );
case 404:
message = "No file found at URL ... | [
"public",
"static",
"CStorageException",
"buildCStorageException",
"(",
"CResponse",
"response",
",",
"String",
"message",
",",
"CPath",
"path",
")",
"{",
"switch",
"(",
"response",
".",
"getStatus",
"(",
")",
")",
"{",
"case",
"401",
":",
"return",
"new",
"... | Some common code between providers. Handles the different status codes, and generates a nice exception
@param response The wrapped HTTP response
@param message The error message (provided by the server or by the application)
@param path The file requested (which failed)
@return The exception | [
"Some",
"common",
"code",
"between",
"providers",
".",
"Handles",
"the",
"different",
"status",
"codes",
"and",
"generates",
"a",
"nice",
"exception"
] | 20691e52e144014f99ca75cb7dedc7ba0c18586c | https://github.com/netheosgithub/pcs_api/blob/20691e52e144014f99ca75cb7dedc7ba0c18586c/java/src/main/java/net/netheos/pcsapi/utils/PcsUtils.java#L117-L130 |
145,699 | netheosgithub/pcs_api | java/src/main/java/net/netheos/pcsapi/utils/PcsUtils.java | PcsUtils.abbreviate | public static String abbreviate( String source, int maxLen )
{
if ( source == null || source.length() <= maxLen ) {
return source;
}
return source.substring( 0, maxLen ) + "...";
} | java | public static String abbreviate( String source, int maxLen )
{
if ( source == null || source.length() <= maxLen ) {
return source;
}
return source.substring( 0, maxLen ) + "...";
} | [
"public",
"static",
"String",
"abbreviate",
"(",
"String",
"source",
",",
"int",
"maxLen",
")",
"{",
"if",
"(",
"source",
"==",
"null",
"||",
"source",
".",
"length",
"(",
")",
"<=",
"maxLen",
")",
"{",
"return",
"source",
";",
"}",
"return",
"source",... | Abbreviate a string if longer than maxLen.
@param source may be null
@param maxLen must be >= 0. Up to this length, string is not truncated; otherwise truncated to maxLen and
three dots as allipsis are added.
@return original or truncated string (up tomaxLen+3 characters). | [
"Abbreviate",
"a",
"string",
"if",
"longer",
"than",
"maxLen",
"."
] | 20691e52e144014f99ca75cb7dedc7ba0c18586c | https://github.com/netheosgithub/pcs_api/blob/20691e52e144014f99ca75cb7dedc7ba0c18586c/java/src/main/java/net/netheos/pcsapi/utils/PcsUtils.java#L151-L157 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.