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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
55,300 | facebookarchive/swift | swift-codec/src/main/java/com/facebook/swift/codec/internal/compiler/ThriftCodecByteCodeGenerator.java | ThriftCodecByteCodeGenerator.declareCodecFields | private Map<Short, FieldDefinition> declareCodecFields()
{
Map<Short, FieldDefinition> codecFields = new TreeMap<>();
for (ThriftFieldMetadata fieldMetadata : metadata.getFields()) {
if (needsCodec(fieldMetadata)) {
ThriftCodec<?> codec = codecManager.getCodec(fieldMetad... | java | private Map<Short, FieldDefinition> declareCodecFields()
{
Map<Short, FieldDefinition> codecFields = new TreeMap<>();
for (ThriftFieldMetadata fieldMetadata : metadata.getFields()) {
if (needsCodec(fieldMetadata)) {
ThriftCodec<?> codec = codecManager.getCodec(fieldMetad... | [
"private",
"Map",
"<",
"Short",
",",
"FieldDefinition",
">",
"declareCodecFields",
"(",
")",
"{",
"Map",
"<",
"Short",
",",
"FieldDefinition",
">",
"codecFields",
"=",
"new",
"TreeMap",
"<>",
"(",
")",
";",
"for",
"(",
"ThriftFieldMetadata",
"fieldMetadata",
... | Declares a field for each delegate codec
@return a map from field id to the codec for the field | [
"Declares",
"a",
"field",
"for",
"each",
"delegate",
"codec"
] | 3f1f098a50d6106f50cd6fe1c361dd373ede0197 | https://github.com/facebookarchive/swift/blob/3f1f098a50d6106f50cd6fe1c361dd373ede0197/swift-codec/src/main/java/com/facebook/swift/codec/internal/compiler/ThriftCodecByteCodeGenerator.java#L216-L233 |
55,301 | facebookarchive/swift | swift-codec/src/main/java/com/facebook/swift/codec/internal/compiler/ThriftCodecByteCodeGenerator.java | ThriftCodecByteCodeGenerator.defineConstructor | private void defineConstructor()
{
//
// declare the constructor
MethodDefinition constructor = new MethodDefinition(
a(PUBLIC),
"<init>",
type(void.class),
parameters.getParameters()
);
// invoke super (Object)... | java | private void defineConstructor()
{
//
// declare the constructor
MethodDefinition constructor = new MethodDefinition(
a(PUBLIC),
"<init>",
type(void.class),
parameters.getParameters()
);
// invoke super (Object)... | [
"private",
"void",
"defineConstructor",
"(",
")",
"{",
"//",
"// declare the constructor",
"MethodDefinition",
"constructor",
"=",
"new",
"MethodDefinition",
"(",
"a",
"(",
"PUBLIC",
")",
",",
"\"<init>\"",
",",
"type",
"(",
"void",
".",
"class",
")",
",",
"pa... | Defines the constructor with a parameter for the ThriftType and the delegate codecs. The
constructor simply assigns these parameters to the class fields. | [
"Defines",
"the",
"constructor",
"with",
"a",
"parameter",
"for",
"the",
"ThriftType",
"and",
"the",
"delegate",
"codecs",
".",
"The",
"constructor",
"simply",
"assigns",
"these",
"parameters",
"to",
"the",
"class",
"fields",
"."
] | 3f1f098a50d6106f50cd6fe1c361dd373ede0197 | https://github.com/facebookarchive/swift/blob/3f1f098a50d6106f50cd6fe1c361dd373ede0197/swift-codec/src/main/java/com/facebook/swift/codec/internal/compiler/ThriftCodecByteCodeGenerator.java#L239-L264 |
55,302 | facebookarchive/swift | swift-codec/src/main/java/com/facebook/swift/codec/internal/compiler/ThriftCodecByteCodeGenerator.java | ThriftCodecByteCodeGenerator.defineGetTypeMethod | private void defineGetTypeMethod()
{
classDefinition.addMethod(
new MethodDefinition(a(PUBLIC), "getType", type(ThriftType.class))
.loadThis()
.getField(codecType, typeField)
.retObject()
);
} | java | private void defineGetTypeMethod()
{
classDefinition.addMethod(
new MethodDefinition(a(PUBLIC), "getType", type(ThriftType.class))
.loadThis()
.getField(codecType, typeField)
.retObject()
);
} | [
"private",
"void",
"defineGetTypeMethod",
"(",
")",
"{",
"classDefinition",
".",
"addMethod",
"(",
"new",
"MethodDefinition",
"(",
"a",
"(",
"PUBLIC",
")",
",",
"\"getType\"",
",",
"type",
"(",
"ThriftType",
".",
"class",
")",
")",
".",
"loadThis",
"(",
")... | Defines the getType method which simply returns the value of the type field. | [
"Defines",
"the",
"getType",
"method",
"which",
"simply",
"returns",
"the",
"value",
"of",
"the",
"type",
"field",
"."
] | 3f1f098a50d6106f50cd6fe1c361dd373ede0197 | https://github.com/facebookarchive/swift/blob/3f1f098a50d6106f50cd6fe1c361dd373ede0197/swift-codec/src/main/java/com/facebook/swift/codec/internal/compiler/ThriftCodecByteCodeGenerator.java#L269-L277 |
55,303 | facebookarchive/swift | swift-codec/src/main/java/com/facebook/swift/codec/internal/compiler/ThriftCodecByteCodeGenerator.java | ThriftCodecByteCodeGenerator.defineReadStructMethod | private void defineReadStructMethod()
{
MethodDefinition read = new MethodDefinition(
a(PUBLIC),
"read",
structType,
arg("protocol", TProtocol.class)
).addException(Exception.class);
// TProtocolReader reader = new TProtocolRea... | java | private void defineReadStructMethod()
{
MethodDefinition read = new MethodDefinition(
a(PUBLIC),
"read",
structType,
arg("protocol", TProtocol.class)
).addException(Exception.class);
// TProtocolReader reader = new TProtocolRea... | [
"private",
"void",
"defineReadStructMethod",
"(",
")",
"{",
"MethodDefinition",
"read",
"=",
"new",
"MethodDefinition",
"(",
"a",
"(",
"PUBLIC",
")",
",",
"\"read\"",
",",
"structType",
",",
"arg",
"(",
"\"protocol\"",
",",
"TProtocol",
".",
"class",
")",
")... | Defines the read method for a struct. | [
"Defines",
"the",
"read",
"method",
"for",
"a",
"struct",
"."
] | 3f1f098a50d6106f50cd6fe1c361dd373ede0197 | https://github.com/facebookarchive/swift/blob/3f1f098a50d6106f50cd6fe1c361dd373ede0197/swift-codec/src/main/java/com/facebook/swift/codec/internal/compiler/ThriftCodecByteCodeGenerator.java#L282-L309 |
55,304 | facebookarchive/swift | swift-codec/src/main/java/com/facebook/swift/codec/internal/compiler/ThriftCodecByteCodeGenerator.java | ThriftCodecByteCodeGenerator.injectStructFields | private void injectStructFields(MethodDefinition read, LocalVariableDefinition instance, Map<Short, LocalVariableDefinition> structData)
{
for (ThriftFieldMetadata field : metadata.getFields(THRIFT_FIELD)) {
injectField(read, field, instance, structData.get(field.getId()));
}
} | java | private void injectStructFields(MethodDefinition read, LocalVariableDefinition instance, Map<Short, LocalVariableDefinition> structData)
{
for (ThriftFieldMetadata field : metadata.getFields(THRIFT_FIELD)) {
injectField(read, field, instance, structData.get(field.getId()));
}
} | [
"private",
"void",
"injectStructFields",
"(",
"MethodDefinition",
"read",
",",
"LocalVariableDefinition",
"instance",
",",
"Map",
"<",
"Short",
",",
"LocalVariableDefinition",
">",
"structData",
")",
"{",
"for",
"(",
"ThriftFieldMetadata",
"field",
":",
"metadata",
... | Defines the code to inject data into the struct public fields. | [
"Defines",
"the",
"code",
"to",
"inject",
"data",
"into",
"the",
"struct",
"public",
"fields",
"."
] | 3f1f098a50d6106f50cd6fe1c361dd373ede0197 | https://github.com/facebookarchive/swift/blob/3f1f098a50d6106f50cd6fe1c361dd373ede0197/swift-codec/src/main/java/com/facebook/swift/codec/internal/compiler/ThriftCodecByteCodeGenerator.java#L452-L457 |
55,305 | facebookarchive/swift | swift-codec/src/main/java/com/facebook/swift/codec/internal/compiler/ThriftCodecByteCodeGenerator.java | ThriftCodecByteCodeGenerator.injectStructMethods | private void injectStructMethods(MethodDefinition read, LocalVariableDefinition instance, Map<Short, LocalVariableDefinition> structData)
{
for (ThriftMethodInjection methodInjection : metadata.getMethodInjections()) {
injectMethod(read, methodInjection, instance, structData);
}
} | java | private void injectStructMethods(MethodDefinition read, LocalVariableDefinition instance, Map<Short, LocalVariableDefinition> structData)
{
for (ThriftMethodInjection methodInjection : metadata.getMethodInjections()) {
injectMethod(read, methodInjection, instance, structData);
}
} | [
"private",
"void",
"injectStructMethods",
"(",
"MethodDefinition",
"read",
",",
"LocalVariableDefinition",
"instance",
",",
"Map",
"<",
"Short",
",",
"LocalVariableDefinition",
">",
"structData",
")",
"{",
"for",
"(",
"ThriftMethodInjection",
"methodInjection",
":",
"... | Defines the code to inject data into the struct methods. | [
"Defines",
"the",
"code",
"to",
"inject",
"data",
"into",
"the",
"struct",
"methods",
"."
] | 3f1f098a50d6106f50cd6fe1c361dd373ede0197 | https://github.com/facebookarchive/swift/blob/3f1f098a50d6106f50cd6fe1c361dd373ede0197/swift-codec/src/main/java/com/facebook/swift/codec/internal/compiler/ThriftCodecByteCodeGenerator.java#L462-L467 |
55,306 | facebookarchive/swift | swift-codec/src/main/java/com/facebook/swift/codec/internal/compiler/ThriftCodecByteCodeGenerator.java | ThriftCodecByteCodeGenerator.defineReadUnionMethod | private void defineReadUnionMethod()
{
MethodDefinition read = new MethodDefinition(
a(PUBLIC),
"read",
structType,
arg("protocol", TProtocol.class)
).addException(Exception.class);
// TProtocolReader reader = new TProtocolRead... | java | private void defineReadUnionMethod()
{
MethodDefinition read = new MethodDefinition(
a(PUBLIC),
"read",
structType,
arg("protocol", TProtocol.class)
).addException(Exception.class);
// TProtocolReader reader = new TProtocolRead... | [
"private",
"void",
"defineReadUnionMethod",
"(",
")",
"{",
"MethodDefinition",
"read",
"=",
"new",
"MethodDefinition",
"(",
"a",
"(",
"PUBLIC",
")",
",",
"\"read\"",
",",
"structType",
",",
"arg",
"(",
"\"protocol\"",
",",
"TProtocol",
".",
"class",
")",
")"... | Defines the read method for an union. | [
"Defines",
"the",
"read",
"method",
"for",
"an",
"union",
"."
] | 3f1f098a50d6106f50cd6fe1c361dd373ede0197 | https://github.com/facebookarchive/swift/blob/3f1f098a50d6106f50cd6fe1c361dd373ede0197/swift-codec/src/main/java/com/facebook/swift/codec/internal/compiler/ThriftCodecByteCodeGenerator.java#L472-L502 |
55,307 | facebookarchive/swift | swift-codec/src/main/java/com/facebook/swift/codec/internal/compiler/ThriftCodecByteCodeGenerator.java | ThriftCodecByteCodeGenerator.readSingleFieldValue | private Map<Short, LocalVariableDefinition> readSingleFieldValue(MethodDefinition read)
{
LocalVariableDefinition protocol = read.getLocalVariable("reader");
// declare and init local variables here
Map<Short, LocalVariableDefinition> unionData = new TreeMap<>();
for (ThriftFieldMet... | java | private Map<Short, LocalVariableDefinition> readSingleFieldValue(MethodDefinition read)
{
LocalVariableDefinition protocol = read.getLocalVariable("reader");
// declare and init local variables here
Map<Short, LocalVariableDefinition> unionData = new TreeMap<>();
for (ThriftFieldMet... | [
"private",
"Map",
"<",
"Short",
",",
"LocalVariableDefinition",
">",
"readSingleFieldValue",
"(",
"MethodDefinition",
"read",
")",
"{",
"LocalVariableDefinition",
"protocol",
"=",
"read",
".",
"getLocalVariable",
"(",
"\"reader\"",
")",
";",
"// declare and init local v... | Defines the code to read all of the data from the protocol into local variables. | [
"Defines",
"the",
"code",
"to",
"read",
"all",
"of",
"the",
"data",
"from",
"the",
"protocol",
"into",
"local",
"variables",
"."
] | 3f1f098a50d6106f50cd6fe1c361dd373ede0197 | https://github.com/facebookarchive/swift/blob/3f1f098a50d6106f50cd6fe1c361dd373ede0197/swift-codec/src/main/java/com/facebook/swift/codec/internal/compiler/ThriftCodecByteCodeGenerator.java#L507-L598 |
55,308 | facebookarchive/swift | swift-codec/src/main/java/com/facebook/swift/codec/internal/compiler/ThriftCodecByteCodeGenerator.java | ThriftCodecByteCodeGenerator.invokeFactoryMethod | private void invokeFactoryMethod(MethodDefinition read, Map<Short, LocalVariableDefinition> structData, LocalVariableDefinition instance)
{
if (metadata.getBuilderMethod().isPresent()) {
ThriftMethodInjection builderMethod = metadata.getBuilderMethod().get();
read.loadVariable(instan... | java | private void invokeFactoryMethod(MethodDefinition read, Map<Short, LocalVariableDefinition> structData, LocalVariableDefinition instance)
{
if (metadata.getBuilderMethod().isPresent()) {
ThriftMethodInjection builderMethod = metadata.getBuilderMethod().get();
read.loadVariable(instan... | [
"private",
"void",
"invokeFactoryMethod",
"(",
"MethodDefinition",
"read",
",",
"Map",
"<",
"Short",
",",
"LocalVariableDefinition",
">",
"structData",
",",
"LocalVariableDefinition",
"instance",
")",
"{",
"if",
"(",
"metadata",
".",
"getBuilderMethod",
"(",
")",
... | Defines the code that calls the builder factory method. | [
"Defines",
"the",
"code",
"that",
"calls",
"the",
"builder",
"factory",
"method",
"."
] | 3f1f098a50d6106f50cd6fe1c361dd373ede0197 | https://github.com/facebookarchive/swift/blob/3f1f098a50d6106f50cd6fe1c361dd373ede0197/swift-codec/src/main/java/com/facebook/swift/codec/internal/compiler/ThriftCodecByteCodeGenerator.java#L769-L784 |
55,309 | facebookarchive/swift | swift-codec/src/main/java/com/facebook/swift/codec/internal/compiler/ThriftCodecByteCodeGenerator.java | ThriftCodecByteCodeGenerator.defineReadBridgeMethod | private void defineReadBridgeMethod()
{
classDefinition.addMethod(
new MethodDefinition(a(PUBLIC, BRIDGE, SYNTHETIC), "read", type(Object.class), arg("protocol", TProtocol.class))
.addException(Exception.class)
.loadThis()
... | java | private void defineReadBridgeMethod()
{
classDefinition.addMethod(
new MethodDefinition(a(PUBLIC, BRIDGE, SYNTHETIC), "read", type(Object.class), arg("protocol", TProtocol.class))
.addException(Exception.class)
.loadThis()
... | [
"private",
"void",
"defineReadBridgeMethod",
"(",
")",
"{",
"classDefinition",
".",
"addMethod",
"(",
"new",
"MethodDefinition",
"(",
"a",
"(",
"PUBLIC",
",",
"BRIDGE",
",",
"SYNTHETIC",
")",
",",
"\"read\"",
",",
"type",
"(",
"Object",
".",
"class",
")",
... | Defines the generics bridge method with untyped args to the type specific read method. | [
"Defines",
"the",
"generics",
"bridge",
"method",
"with",
"untyped",
"args",
"to",
"the",
"type",
"specific",
"read",
"method",
"."
] | 3f1f098a50d6106f50cd6fe1c361dd373ede0197 | https://github.com/facebookarchive/swift/blob/3f1f098a50d6106f50cd6fe1c361dd373ede0197/swift-codec/src/main/java/com/facebook/swift/codec/internal/compiler/ThriftCodecByteCodeGenerator.java#L1005-L1015 |
55,310 | facebookarchive/swift | swift-codec/src/main/java/com/facebook/swift/codec/internal/compiler/ThriftCodecByteCodeGenerator.java | ThriftCodecByteCodeGenerator.defineWriteBridgeMethod | private void defineWriteBridgeMethod()
{
classDefinition.addMethod(
new MethodDefinition(a(PUBLIC, BRIDGE, SYNTHETIC), "write", null, arg("struct", Object.class), arg("protocol", TProtocol.class))
.addException(Exception.class)
.loadThis()
... | java | private void defineWriteBridgeMethod()
{
classDefinition.addMethod(
new MethodDefinition(a(PUBLIC, BRIDGE, SYNTHETIC), "write", null, arg("struct", Object.class), arg("protocol", TProtocol.class))
.addException(Exception.class)
.loadThis()
... | [
"private",
"void",
"defineWriteBridgeMethod",
"(",
")",
"{",
"classDefinition",
".",
"addMethod",
"(",
"new",
"MethodDefinition",
"(",
"a",
"(",
"PUBLIC",
",",
"BRIDGE",
",",
"SYNTHETIC",
")",
",",
"\"write\"",
",",
"null",
",",
"arg",
"(",
"\"struct\"",
","... | Defines the generics bridge method with untyped args to the type specific write method. | [
"Defines",
"the",
"generics",
"bridge",
"method",
"with",
"untyped",
"args",
"to",
"the",
"type",
"specific",
"write",
"method",
"."
] | 3f1f098a50d6106f50cd6fe1c361dd373ede0197 | https://github.com/facebookarchive/swift/blob/3f1f098a50d6106f50cd6fe1c361dd373ede0197/swift-codec/src/main/java/com/facebook/swift/codec/internal/compiler/ThriftCodecByteCodeGenerator.java#L1020-L1037 |
55,311 | facebookarchive/swift | swift-service/src/main/java/com/facebook/swift/service/guice/ThriftServerModule.java | ThriftServerModule.bindFrameCodecFactory | public static ScopedBindingBuilder bindFrameCodecFactory(Binder binder, String key, Class<? extends ThriftFrameCodecFactory> frameCodecFactoryClass)
{
return newMapBinder(binder, String.class, ThriftFrameCodecFactory.class).addBinding(key).to(frameCodecFactoryClass);
} | java | public static ScopedBindingBuilder bindFrameCodecFactory(Binder binder, String key, Class<? extends ThriftFrameCodecFactory> frameCodecFactoryClass)
{
return newMapBinder(binder, String.class, ThriftFrameCodecFactory.class).addBinding(key).to(frameCodecFactoryClass);
} | [
"public",
"static",
"ScopedBindingBuilder",
"bindFrameCodecFactory",
"(",
"Binder",
"binder",
",",
"String",
"key",
",",
"Class",
"<",
"?",
"extends",
"ThriftFrameCodecFactory",
">",
"frameCodecFactoryClass",
")",
"{",
"return",
"newMapBinder",
"(",
"binder",
",",
"... | helpers for binding frame codec factories | [
"helpers",
"for",
"binding",
"frame",
"codec",
"factories"
] | 3f1f098a50d6106f50cd6fe1c361dd373ede0197 | https://github.com/facebookarchive/swift/blob/3f1f098a50d6106f50cd6fe1c361dd373ede0197/swift-service/src/main/java/com/facebook/swift/service/guice/ThriftServerModule.java#L91-L94 |
55,312 | facebookarchive/swift | swift-service/src/main/java/com/facebook/swift/service/guice/ThriftServerModule.java | ThriftServerModule.bindProtocolFactory | public static ScopedBindingBuilder bindProtocolFactory(Binder binder, String key, Class<? extends TDuplexProtocolFactory> protocolFactoryClass)
{
return newMapBinder(binder, String.class, TDuplexProtocolFactory.class).addBinding(key).to(protocolFactoryClass);
} | java | public static ScopedBindingBuilder bindProtocolFactory(Binder binder, String key, Class<? extends TDuplexProtocolFactory> protocolFactoryClass)
{
return newMapBinder(binder, String.class, TDuplexProtocolFactory.class).addBinding(key).to(protocolFactoryClass);
} | [
"public",
"static",
"ScopedBindingBuilder",
"bindProtocolFactory",
"(",
"Binder",
"binder",
",",
"String",
"key",
",",
"Class",
"<",
"?",
"extends",
"TDuplexProtocolFactory",
">",
"protocolFactoryClass",
")",
"{",
"return",
"newMapBinder",
"(",
"binder",
",",
"Strin... | helpers for binding protocol factories | [
"helpers",
"for",
"binding",
"protocol",
"factories"
] | 3f1f098a50d6106f50cd6fe1c361dd373ede0197 | https://github.com/facebookarchive/swift/blob/3f1f098a50d6106f50cd6fe1c361dd373ede0197/swift-service/src/main/java/com/facebook/swift/service/guice/ThriftServerModule.java#L103-L106 |
55,313 | facebookarchive/swift | swift-service/src/main/java/com/facebook/swift/service/guice/ThriftServerModule.java | ThriftServerModule.bindWorkerExecutor | public static ScopedBindingBuilder bindWorkerExecutor(Binder binder, String key, Class<? extends ExecutorService> executorServiceClass)
{
return workerExecutorBinder(binder).addBinding(key).to(executorServiceClass);
} | java | public static ScopedBindingBuilder bindWorkerExecutor(Binder binder, String key, Class<? extends ExecutorService> executorServiceClass)
{
return workerExecutorBinder(binder).addBinding(key).to(executorServiceClass);
} | [
"public",
"static",
"ScopedBindingBuilder",
"bindWorkerExecutor",
"(",
"Binder",
"binder",
",",
"String",
"key",
",",
"Class",
"<",
"?",
"extends",
"ExecutorService",
">",
"executorServiceClass",
")",
"{",
"return",
"workerExecutorBinder",
"(",
"binder",
")",
".",
... | Helpers for binding worker executors | [
"Helpers",
"for",
"binding",
"worker",
"executors"
] | 3f1f098a50d6106f50cd6fe1c361dd373ede0197 | https://github.com/facebookarchive/swift/blob/3f1f098a50d6106f50cd6fe1c361dd373ede0197/swift-service/src/main/java/com/facebook/swift/service/guice/ThriftServerModule.java#L115-L118 |
55,314 | facebookarchive/swift | swift-codec/src/main/java/com/facebook/swift/codec/metadata/ReflectionHelper.java | ReflectionHelper.findAnnotatedMethods | public static Collection<Method> findAnnotatedMethods(Class<?> type, Class<? extends Annotation> annotation)
{
List<Method> result = new ArrayList<>();
// gather all publicly available methods
// this returns everything, even if it's declared in a parent
for (Method method : type.ge... | java | public static Collection<Method> findAnnotatedMethods(Class<?> type, Class<? extends Annotation> annotation)
{
List<Method> result = new ArrayList<>();
// gather all publicly available methods
// this returns everything, even if it's declared in a parent
for (Method method : type.ge... | [
"public",
"static",
"Collection",
"<",
"Method",
">",
"findAnnotatedMethods",
"(",
"Class",
"<",
"?",
">",
"type",
",",
"Class",
"<",
"?",
"extends",
"Annotation",
">",
"annotation",
")",
"{",
"List",
"<",
"Method",
">",
"result",
"=",
"new",
"ArrayList",
... | Find methods that are tagged with a given annotation somewhere in the hierarchy | [
"Find",
"methods",
"that",
"are",
"tagged",
"with",
"a",
"given",
"annotation",
"somewhere",
"in",
"the",
"hierarchy"
] | 3f1f098a50d6106f50cd6fe1c361dd373ede0197 | https://github.com/facebookarchive/swift/blob/3f1f098a50d6106f50cd6fe1c361dd373ede0197/swift-codec/src/main/java/com/facebook/swift/codec/metadata/ReflectionHelper.java#L162-L186 |
55,315 | facebookarchive/swift | swift-codec/src/main/java/com/facebook/swift/codec/internal/builtin/VoidThriftCodec.java | VoidThriftCodec.read | @Override
public Void read(TProtocol protocol)
throws Exception
{
Preconditions.checkNotNull(protocol, "protocol is null");
return null;
} | java | @Override
public Void read(TProtocol protocol)
throws Exception
{
Preconditions.checkNotNull(protocol, "protocol is null");
return null;
} | [
"@",
"Override",
"public",
"Void",
"read",
"(",
"TProtocol",
"protocol",
")",
"throws",
"Exception",
"{",
"Preconditions",
".",
"checkNotNull",
"(",
"protocol",
",",
"\"protocol is null\"",
")",
";",
"return",
"null",
";",
"}"
] | Always returns null without reading anything from the stream. | [
"Always",
"returns",
"null",
"without",
"reading",
"anything",
"from",
"the",
"stream",
"."
] | 3f1f098a50d6106f50cd6fe1c361dd373ede0197 | https://github.com/facebookarchive/swift/blob/3f1f098a50d6106f50cd6fe1c361dd373ede0197/swift-codec/src/main/java/com/facebook/swift/codec/internal/builtin/VoidThriftCodec.java#L40-L46 |
55,316 | facebookarchive/swift | swift-codec/src/main/java/com/facebook/swift/codec/internal/builtin/VoidThriftCodec.java | VoidThriftCodec.write | @Override
public void write(Void value, TProtocol protocol)
throws Exception
{
Preconditions.checkNotNull(protocol, "protocol is null");
} | java | @Override
public void write(Void value, TProtocol protocol)
throws Exception
{
Preconditions.checkNotNull(protocol, "protocol is null");
} | [
"@",
"Override",
"public",
"void",
"write",
"(",
"Void",
"value",
",",
"TProtocol",
"protocol",
")",
"throws",
"Exception",
"{",
"Preconditions",
".",
"checkNotNull",
"(",
"protocol",
",",
"\"protocol is null\"",
")",
";",
"}"
] | Always returns without writing to the stream. | [
"Always",
"returns",
"without",
"writing",
"to",
"the",
"stream",
"."
] | 3f1f098a50d6106f50cd6fe1c361dd373ede0197 | https://github.com/facebookarchive/swift/blob/3f1f098a50d6106f50cd6fe1c361dd373ede0197/swift-codec/src/main/java/com/facebook/swift/codec/internal/builtin/VoidThriftCodec.java#L51-L56 |
55,317 | facebookarchive/swift | swift-service/src/main/java/com/facebook/swift/service/ThriftServerConfig.java | ThriftServerConfig.setMaxFrameSize | @Config("thrift.max-frame-size")
public ThriftServerConfig setMaxFrameSize(DataSize maxFrameSize)
{
checkArgument(maxFrameSize.toBytes() <= 0x3FFFFFFF);
this.maxFrameSize = maxFrameSize;
return this;
} | java | @Config("thrift.max-frame-size")
public ThriftServerConfig setMaxFrameSize(DataSize maxFrameSize)
{
checkArgument(maxFrameSize.toBytes() <= 0x3FFFFFFF);
this.maxFrameSize = maxFrameSize;
return this;
} | [
"@",
"Config",
"(",
"\"thrift.max-frame-size\"",
")",
"public",
"ThriftServerConfig",
"setMaxFrameSize",
"(",
"DataSize",
"maxFrameSize",
")",
"{",
"checkArgument",
"(",
"maxFrameSize",
".",
"toBytes",
"(",
")",
"<=",
"0x3FFFFFFF",
")",
";",
"this",
".",
"maxFrame... | Sets a maximum frame size
@param maxFrameSize
@return | [
"Sets",
"a",
"maximum",
"frame",
"size"
] | 3f1f098a50d6106f50cd6fe1c361dd373ede0197 | https://github.com/facebookarchive/swift/blob/3f1f098a50d6106f50cd6fe1c361dd373ede0197/swift-service/src/main/java/com/facebook/swift/service/ThriftServerConfig.java#L114-L120 |
55,318 | facebookarchive/swift | swift-service/src/main/java/com/facebook/swift/service/ThriftClientManager.java | ThriftClientManager.getRemoteAddress | public HostAndPort getRemoteAddress(Object client)
{
NiftyClientChannel niftyChannel = getNiftyChannel(client);
try {
Channel nettyChannel = niftyChannel.getNettyChannel();
SocketAddress address = nettyChannel.getRemoteAddress();
InetSocketAddress inetAddress = (... | java | public HostAndPort getRemoteAddress(Object client)
{
NiftyClientChannel niftyChannel = getNiftyChannel(client);
try {
Channel nettyChannel = niftyChannel.getNettyChannel();
SocketAddress address = nettyChannel.getRemoteAddress();
InetSocketAddress inetAddress = (... | [
"public",
"HostAndPort",
"getRemoteAddress",
"(",
"Object",
"client",
")",
"{",
"NiftyClientChannel",
"niftyChannel",
"=",
"getNiftyChannel",
"(",
"client",
")",
";",
"try",
"{",
"Channel",
"nettyChannel",
"=",
"niftyChannel",
".",
"getNettyChannel",
"(",
")",
";"... | Returns the remote address that a Swift client is connected to
@throws IllegalArgumentException if the client is not a Swift client or is not connected
through an internet socket | [
"Returns",
"the",
"remote",
"address",
"that",
"a",
"Swift",
"client",
"is",
"connected",
"to"
] | 3f1f098a50d6106f50cd6fe1c361dd373ede0197 | https://github.com/facebookarchive/swift/blob/3f1f098a50d6106f50cd6fe1c361dd373ede0197/swift-service/src/main/java/com/facebook/swift/service/ThriftClientManager.java#L335-L348 |
55,319 | facebookarchive/swift | swift-codec/src/main/java/com/facebook/swift/codec/metadata/AbstractThriftMetadataBuilder.java | AbstractThriftMetadataBuilder.inferThriftFieldIds | protected final Set<String> inferThriftFieldIds()
{
Set<String> fieldsWithConflictingIds = new HashSet<>();
// group fields by explicit name or by name extracted from field, method or property
Multimap<String, FieldMetadata> fieldsByExplicitOrExtractedName = Multimaps.index(fields, getOrExt... | java | protected final Set<String> inferThriftFieldIds()
{
Set<String> fieldsWithConflictingIds = new HashSet<>();
// group fields by explicit name or by name extracted from field, method or property
Multimap<String, FieldMetadata> fieldsByExplicitOrExtractedName = Multimaps.index(fields, getOrExt... | [
"protected",
"final",
"Set",
"<",
"String",
">",
"inferThriftFieldIds",
"(",
")",
"{",
"Set",
"<",
"String",
">",
"fieldsWithConflictingIds",
"=",
"new",
"HashSet",
"<>",
"(",
")",
";",
"// group fields by explicit name or by name extracted from field, method or property"... | Assigns all fields an id if possible. Fields are grouped by name and for each group, if there
is a single id, all fields in the group are assigned this id. If the group has multiple ids,
an error is reported. | [
"Assigns",
"all",
"fields",
"an",
"id",
"if",
"possible",
".",
"Fields",
"are",
"grouped",
"by",
"name",
"and",
"for",
"each",
"group",
"if",
"there",
"is",
"a",
"single",
"id",
"all",
"fields",
"in",
"the",
"group",
"are",
"assigned",
"this",
"id",
".... | 3f1f098a50d6106f50cd6fe1c361dd373ede0197 | https://github.com/facebookarchive/swift/blob/3f1f098a50d6106f50cd6fe1c361dd373ede0197/swift-codec/src/main/java/com/facebook/swift/codec/metadata/AbstractThriftMetadataBuilder.java#L552-L567 |
55,320 | facebookarchive/swift | swift-codec/src/main/java/com/facebook/swift/codec/metadata/AbstractThriftMetadataBuilder.java | AbstractThriftMetadataBuilder.verifyFieldType | protected final void verifyFieldType(short id, String name, Collection<FieldMetadata> fields, ThriftCatalog catalog)
{
boolean isSupportedType = true;
for (FieldMetadata field : fields) {
if (!catalog.isSupportedStructFieldType(field.getJavaType())) {
metadataErrors.addEr... | java | protected final void verifyFieldType(short id, String name, Collection<FieldMetadata> fields, ThriftCatalog catalog)
{
boolean isSupportedType = true;
for (FieldMetadata field : fields) {
if (!catalog.isSupportedStructFieldType(field.getJavaType())) {
metadataErrors.addEr... | [
"protected",
"final",
"void",
"verifyFieldType",
"(",
"short",
"id",
",",
"String",
"name",
",",
"Collection",
"<",
"FieldMetadata",
">",
"fields",
",",
"ThriftCatalog",
"catalog",
")",
"{",
"boolean",
"isSupportedType",
"=",
"true",
";",
"for",
"(",
"FieldMet... | Verifies that the the fields all have a supported Java type and that all fields map to the
exact same ThriftType. | [
"Verifies",
"that",
"the",
"the",
"fields",
"all",
"have",
"a",
"supported",
"Java",
"type",
"and",
"that",
"all",
"fields",
"map",
"to",
"the",
"exact",
"same",
"ThriftType",
"."
] | 3f1f098a50d6106f50cd6fe1c361dd373ede0197 | https://github.com/facebookarchive/swift/blob/3f1f098a50d6106f50cd6fe1c361dd373ede0197/swift-codec/src/main/java/com/facebook/swift/codec/metadata/AbstractThriftMetadataBuilder.java#L716-L738 |
55,321 | facebookarchive/swift | swift-javadoc/src/main/java/com/facebook/swift/javadoc/JavaDocProcessor.java | JavaDocProcessor.escapeJavaString | private static String escapeJavaString(String input)
{
int len = input.length();
// assume (for performance, not for correctness) that string will not expand by more than 10 chars
StringBuilder out = new StringBuilder(len + 10);
for (int i = 0; i < len; i++) {
char c = in... | java | private static String escapeJavaString(String input)
{
int len = input.length();
// assume (for performance, not for correctness) that string will not expand by more than 10 chars
StringBuilder out = new StringBuilder(len + 10);
for (int i = 0; i < len; i++) {
char c = in... | [
"private",
"static",
"String",
"escapeJavaString",
"(",
"String",
"input",
")",
"{",
"int",
"len",
"=",
"input",
".",
"length",
"(",
")",
";",
"// assume (for performance, not for correctness) that string will not expand by more than 10 chars",
"StringBuilder",
"out",
"=",
... | in Guava 15 when released | [
"in",
"Guava",
"15",
"when",
"released"
] | 3f1f098a50d6106f50cd6fe1c361dd373ede0197 | https://github.com/facebookarchive/swift/blob/3f1f098a50d6106f50cd6fe1c361dd373ede0197/swift-javadoc/src/main/java/com/facebook/swift/javadoc/JavaDocProcessor.java#L262-L287 |
55,322 | facebookarchive/swift | swift-codec/src/main/java/com/facebook/swift/codec/ThriftCodecManager.java | ThriftCodecManager.addCodec | public void addCodec(ThriftCodec<?> codec)
{
catalog.addThriftType(codec.getType());
typeCodecs.put(codec.getType(), codec);
} | java | public void addCodec(ThriftCodec<?> codec)
{
catalog.addThriftType(codec.getType());
typeCodecs.put(codec.getType(), codec);
} | [
"public",
"void",
"addCodec",
"(",
"ThriftCodec",
"<",
"?",
">",
"codec",
")",
"{",
"catalog",
".",
"addThriftType",
"(",
"codec",
".",
"getType",
"(",
")",
")",
";",
"typeCodecs",
".",
"put",
"(",
"codec",
".",
"getType",
"(",
")",
",",
"codec",
")"... | Adds or replaces the codec associated with the type contained in the codec. This does not
replace any current users of the existing codec associated with the type. | [
"Adds",
"or",
"replaces",
"the",
"codec",
"associated",
"with",
"the",
"type",
"contained",
"in",
"the",
"codec",
".",
"This",
"does",
"not",
"replace",
"any",
"current",
"users",
"of",
"the",
"existing",
"codec",
"associated",
"with",
"the",
"type",
"."
] | 3f1f098a50d6106f50cd6fe1c361dd373ede0197 | https://github.com/facebookarchive/swift/blob/3f1f098a50d6106f50cd6fe1c361dd373ede0197/swift-codec/src/main/java/com/facebook/swift/codec/ThriftCodecManager.java#L282-L286 |
55,323 | facebookarchive/swift | swift-generator/src/main/java/com/facebook/swift/generator/swift2thrift/Swift2ThriftGenerator.java | Swift2ThriftGenerator.convertToThrift | private Object convertToThrift(Class<?> cls)
{
Set<ThriftService> serviceAnnotations = ReflectionHelper.getEffectiveClassAnnotations(cls, ThriftService.class);
if (!serviceAnnotations.isEmpty()) {
// it's a service
ThriftServiceMetadata serviceMetadata = new ThriftServiceMeta... | java | private Object convertToThrift(Class<?> cls)
{
Set<ThriftService> serviceAnnotations = ReflectionHelper.getEffectiveClassAnnotations(cls, ThriftService.class);
if (!serviceAnnotations.isEmpty()) {
// it's a service
ThriftServiceMetadata serviceMetadata = new ThriftServiceMeta... | [
"private",
"Object",
"convertToThrift",
"(",
"Class",
"<",
"?",
">",
"cls",
")",
"{",
"Set",
"<",
"ThriftService",
">",
"serviceAnnotations",
"=",
"ReflectionHelper",
".",
"getEffectiveClassAnnotations",
"(",
"cls",
",",
"ThriftService",
".",
"class",
")",
";",
... | returns ThriftType, ThriftServiceMetadata or null | [
"returns",
"ThriftType",
"ThriftServiceMetadata",
"or",
"null"
] | 3f1f098a50d6106f50cd6fe1c361dd373ede0197 | https://github.com/facebookarchive/swift/blob/3f1f098a50d6106f50cd6fe1c361dd373ede0197/swift-generator/src/main/java/com/facebook/swift/generator/swift2thrift/Swift2ThriftGenerator.java#L445-L463 |
55,324 | elastic/elasticsearch-mapper-attachments | src/main/java/org/elasticsearch/mapper/attachments/TikaImpl.java | TikaImpl.parse | static String parse(final byte content[], final Metadata metadata, final int limit) throws TikaException, IOException {
// check that its not unprivileged code like a script
SecurityManager sm = System.getSecurityManager();
if (sm != null) {
sm.checkPermission(new SpecialPermission()... | java | static String parse(final byte content[], final Metadata metadata, final int limit) throws TikaException, IOException {
// check that its not unprivileged code like a script
SecurityManager sm = System.getSecurityManager();
if (sm != null) {
sm.checkPermission(new SpecialPermission()... | [
"static",
"String",
"parse",
"(",
"final",
"byte",
"content",
"[",
"]",
",",
"final",
"Metadata",
"metadata",
",",
"final",
"int",
"limit",
")",
"throws",
"TikaException",
",",
"IOException",
"{",
"// check that its not unprivileged code like a script",
"SecurityManag... | only package private for testing! | [
"only",
"package",
"private",
"for",
"testing!"
] | 5660ada22ccf918d3180db8820e92dae717cc5a9 | https://github.com/elastic/elasticsearch-mapper-attachments/blob/5660ada22ccf918d3180db8820e92dae717cc5a9/src/main/java/org/elasticsearch/mapper/attachments/TikaImpl.java#L44-L69 |
55,325 | tuenti/SmsRadar | library/src/main/java/com/tuenti/smsradar/SmsRadar.java | SmsRadar.initializeSmsRadarService | public static void initializeSmsRadarService(Context context, SmsListener smsListener) {
SmsRadar.smsListener = smsListener;
Intent intent = new Intent(context, SmsRadarService.class);
context.startService(intent);
} | java | public static void initializeSmsRadarService(Context context, SmsListener smsListener) {
SmsRadar.smsListener = smsListener;
Intent intent = new Intent(context, SmsRadarService.class);
context.startService(intent);
} | [
"public",
"static",
"void",
"initializeSmsRadarService",
"(",
"Context",
"context",
",",
"SmsListener",
"smsListener",
")",
"{",
"SmsRadar",
".",
"smsListener",
"=",
"smsListener",
";",
"Intent",
"intent",
"=",
"new",
"Intent",
"(",
"context",
",",
"SmsRadarServic... | Starts the service and store the listener to be notified when a new incoming or outgoing sms be processed
inside the SMS content provider
@param context used to start the service
@param smsListener to notify when the sms content provider gets a new sms | [
"Starts",
"the",
"service",
"and",
"store",
"the",
"listener",
"to",
"be",
"notified",
"when",
"a",
"new",
"incoming",
"or",
"outgoing",
"sms",
"be",
"processed",
"inside",
"the",
"SMS",
"content",
"provider"
] | 598553c69c474634a1d4041a39f015f0b4c33a6d | https://github.com/tuenti/SmsRadar/blob/598553c69c474634a1d4041a39f015f0b4c33a6d/library/src/main/java/com/tuenti/smsradar/SmsRadar.java#L39-L43 |
55,326 | tuenti/SmsRadar | library/src/main/java/com/tuenti/smsradar/SmsRadar.java | SmsRadar.stopSmsRadarService | public static void stopSmsRadarService(Context context) {
SmsRadar.smsListener = null;
Intent intent = new Intent(context, SmsRadarService.class);
context.stopService(intent);
} | java | public static void stopSmsRadarService(Context context) {
SmsRadar.smsListener = null;
Intent intent = new Intent(context, SmsRadarService.class);
context.stopService(intent);
} | [
"public",
"static",
"void",
"stopSmsRadarService",
"(",
"Context",
"context",
")",
"{",
"SmsRadar",
".",
"smsListener",
"=",
"null",
";",
"Intent",
"intent",
"=",
"new",
"Intent",
"(",
"context",
",",
"SmsRadarService",
".",
"class",
")",
";",
"context",
"."... | Stops the service and remove the SmsListener added when the SmsRadar was initialized
@param context used to stop the service | [
"Stops",
"the",
"service",
"and",
"remove",
"the",
"SmsListener",
"added",
"when",
"the",
"SmsRadar",
"was",
"initialized"
] | 598553c69c474634a1d4041a39f015f0b4c33a6d | https://github.com/tuenti/SmsRadar/blob/598553c69c474634a1d4041a39f015f0b4c33a6d/library/src/main/java/com/tuenti/smsradar/SmsRadar.java#L50-L54 |
55,327 | paoding-code/paoding-rose | paoding-rose-web/src/main/java/net/paoding/rose/web/impl/thread/RootEngine.java | RootEngine.saveAttributesBeforeInclude | private void saveAttributesBeforeInclude(final Invocation inv) {
ServletRequest request = inv.getRequest();
logger.debug("Taking snapshot of request attributes before include");
Map<String, Object> attributesSnapshot = new HashMap<String, Object>();
Enumeration<?> attrNames = request.get... | java | private void saveAttributesBeforeInclude(final Invocation inv) {
ServletRequest request = inv.getRequest();
logger.debug("Taking snapshot of request attributes before include");
Map<String, Object> attributesSnapshot = new HashMap<String, Object>();
Enumeration<?> attrNames = request.get... | [
"private",
"void",
"saveAttributesBeforeInclude",
"(",
"final",
"Invocation",
"inv",
")",
"{",
"ServletRequest",
"request",
"=",
"inv",
".",
"getRequest",
"(",
")",
";",
"logger",
".",
"debug",
"(",
"\"Taking snapshot of request attributes before include\"",
")",
";",... | Keep a snapshot of the request attributes in case of an include, to
be able to restore the original attributes after the include.
@param inv | [
"Keep",
"a",
"snapshot",
"of",
"the",
"request",
"attributes",
"in",
"case",
"of",
"an",
"include",
"to",
"be",
"able",
"to",
"restore",
"the",
"original",
"attributes",
"after",
"the",
"include",
"."
] | 8b512704174dd6cba95e544c7d6ab66105cb8ec4 | https://github.com/paoding-code/paoding-rose/blob/8b512704174dd6cba95e544c7d6ab66105cb8ec4/paoding-rose-web/src/main/java/net/paoding/rose/web/impl/thread/RootEngine.java#L155-L165 |
55,328 | paoding-code/paoding-rose | paoding-rose-web/src/main/java/net/paoding/rose/web/impl/thread/RootEngine.java | RootEngine.restoreRequestAttributesAfterInclude | private void restoreRequestAttributesAfterInclude(Invocation inv) {
logger.debug("Restoring snapshot of request attributes after include");
HttpServletRequest request = inv.getRequest();
@SuppressWarnings("unchecked")
Map<String, Object> attributesSnapshot = (Map<String, Object>) inv
... | java | private void restoreRequestAttributesAfterInclude(Invocation inv) {
logger.debug("Restoring snapshot of request attributes after include");
HttpServletRequest request = inv.getRequest();
@SuppressWarnings("unchecked")
Map<String, Object> attributesSnapshot = (Map<String, Object>) inv
... | [
"private",
"void",
"restoreRequestAttributesAfterInclude",
"(",
"Invocation",
"inv",
")",
"{",
"logger",
".",
"debug",
"(",
"\"Restoring snapshot of request attributes after include\"",
")",
";",
"HttpServletRequest",
"request",
"=",
"inv",
".",
"getRequest",
"(",
")",
... | Restore the request attributes after an include.
@param request current HTTP request
@param attributesSnapshot the snapshot of the request attributes
before the include | [
"Restore",
"the",
"request",
"attributes",
"after",
"an",
"include",
"."
] | 8b512704174dd6cba95e544c7d6ab66105cb8ec4 | https://github.com/paoding-code/paoding-rose/blob/8b512704174dd6cba95e544c7d6ab66105cb8ec4/paoding-rose-web/src/main/java/net/paoding/rose/web/impl/thread/RootEngine.java#L174-L209 |
55,329 | paoding-code/paoding-rose | paoding-rose-jade/src/main/java/net/paoding/rose/jade/context/spring/JadeComponentProvider.java | JadeComponentProvider.isCandidateComponent | protected boolean isCandidateComponent(MetadataReader metadataReader) throws IOException {
for (TypeFilter tf : this.excludeFilters) {
if (tf.match(metadataReader, this.metadataReaderFactory)) {
return false;
}
}
for (TypeFilter tf : this.includeFilters) {... | java | protected boolean isCandidateComponent(MetadataReader metadataReader) throws IOException {
for (TypeFilter tf : this.excludeFilters) {
if (tf.match(metadataReader, this.metadataReaderFactory)) {
return false;
}
}
for (TypeFilter tf : this.includeFilters) {... | [
"protected",
"boolean",
"isCandidateComponent",
"(",
"MetadataReader",
"metadataReader",
")",
"throws",
"IOException",
"{",
"for",
"(",
"TypeFilter",
"tf",
":",
"this",
".",
"excludeFilters",
")",
"{",
"if",
"(",
"tf",
".",
"match",
"(",
"metadataReader",
",",
... | Determine whether the given class does not match any exclude filter
and does match at least one include filter.
@param metadataReader the ASM ClassReader for the class
@return whether the class qualifies as a candidate component | [
"Determine",
"whether",
"the",
"given",
"class",
"does",
"not",
"match",
"any",
"exclude",
"filter",
"and",
"does",
"match",
"at",
"least",
"one",
"include",
"filter",
"."
] | 8b512704174dd6cba95e544c7d6ab66105cb8ec4 | https://github.com/paoding-code/paoding-rose/blob/8b512704174dd6cba95e544c7d6ab66105cb8ec4/paoding-rose-jade/src/main/java/net/paoding/rose/jade/context/spring/JadeComponentProvider.java#L217-L229 |
55,330 | paoding-code/paoding-rose | paoding-rose-web/src/main/java/net/paoding/rose/web/paramresolver/ServletRequestDataBinder.java | ServletRequestDataBinder.getInternalBindingResult | @Override
protected AbstractPropertyBindingResult getInternalBindingResult() {
AbstractPropertyBindingResult bindingResult = super.getInternalBindingResult();
// by rose
PropertyEditorRegistry registry = bindingResult.getPropertyEditorRegistry();
registry.registerCustomEditor(... | java | @Override
protected AbstractPropertyBindingResult getInternalBindingResult() {
AbstractPropertyBindingResult bindingResult = super.getInternalBindingResult();
// by rose
PropertyEditorRegistry registry = bindingResult.getPropertyEditorRegistry();
registry.registerCustomEditor(... | [
"@",
"Override",
"protected",
"AbstractPropertyBindingResult",
"getInternalBindingResult",
"(",
")",
"{",
"AbstractPropertyBindingResult",
"bindingResult",
"=",
"super",
".",
"getInternalBindingResult",
"(",
")",
";",
"// by rose\r",
"PropertyEditorRegistry",
"registry",
"=",... | Return the internal BindingResult held by this DataBinder, as
AbstractPropertyBindingResult. | [
"Return",
"the",
"internal",
"BindingResult",
"held",
"by",
"this",
"DataBinder",
"as",
"AbstractPropertyBindingResult",
"."
] | 8b512704174dd6cba95e544c7d6ab66105cb8ec4 | https://github.com/paoding-code/paoding-rose/blob/8b512704174dd6cba95e544c7d6ab66105cb8ec4/paoding-rose-web/src/main/java/net/paoding/rose/web/paramresolver/ServletRequestDataBinder.java#L109-L121 |
55,331 | paoding-code/paoding-rose | paoding-rose-web/src/main/java/net/paoding/rose/util/Base64.java | Base64.decode | public final byte[] decode(byte[] source, int off, int len) {
int len34 = len * 3 / 4;
byte[] outBuff = new byte[len34]; // upper limit on size of output
int outBuffPosn = 0;
byte[] b4 = new byte[4];
int b4Posn = 0;
int i = 0;
byte sbiCrop = 0;
byte sbiDecode = 0;
for (i = off; i < off + ... | java | public final byte[] decode(byte[] source, int off, int len) {
int len34 = len * 3 / 4;
byte[] outBuff = new byte[len34]; // upper limit on size of output
int outBuffPosn = 0;
byte[] b4 = new byte[4];
int b4Posn = 0;
int i = 0;
byte sbiCrop = 0;
byte sbiDecode = 0;
for (i = off; i < off + ... | [
"public",
"final",
"byte",
"[",
"]",
"decode",
"(",
"byte",
"[",
"]",
"source",
",",
"int",
"off",
",",
"int",
"len",
")",
"{",
"int",
"len34",
"=",
"len",
"*",
"3",
"/",
"4",
";",
"byte",
"[",
"]",
"outBuff",
"=",
"new",
"byte",
"[",
"len34",
... | Very low-level access to decoding ASCII characters in
the form of a byte array.
@param source the Base64 encoded data
@param off the offset of where to begin decoding
@param len the length of characters to decode
@return decoded data | [
"Very",
"low",
"-",
"level",
"access",
"to",
"decoding",
"ASCII",
"characters",
"in",
"the",
"form",
"of",
"a",
"byte",
"array",
"."
] | 8b512704174dd6cba95e544c7d6ab66105cb8ec4 | https://github.com/paoding-code/paoding-rose/blob/8b512704174dd6cba95e544c7d6ab66105cb8ec4/paoding-rose-web/src/main/java/net/paoding/rose/util/Base64.java#L388-L424 |
55,332 | paoding-code/paoding-rose | paoding-rose-jade/src/main/java/net/paoding/rose/jade/rowmapper/BeanPropertyRowMapper.java | BeanPropertyRowMapper.initialize | protected void initialize() {
this.mappedFields = new HashMap<String, PropertyDescriptor>();
PropertyDescriptor[] pds = BeanUtils.getPropertyDescriptors(mappedClass);
if (checkProperties) {
mappedProperties = new HashSet<String>();
}
for (int i = 0; i < pds.length; i+... | java | protected void initialize() {
this.mappedFields = new HashMap<String, PropertyDescriptor>();
PropertyDescriptor[] pds = BeanUtils.getPropertyDescriptors(mappedClass);
if (checkProperties) {
mappedProperties = new HashSet<String>();
}
for (int i = 0; i < pds.length; i+... | [
"protected",
"void",
"initialize",
"(",
")",
"{",
"this",
".",
"mappedFields",
"=",
"new",
"HashMap",
"<",
"String",
",",
"PropertyDescriptor",
">",
"(",
")",
";",
"PropertyDescriptor",
"[",
"]",
"pds",
"=",
"BeanUtils",
".",
"getPropertyDescriptors",
"(",
"... | Initialize the mapping metadata for the given class.
@param mappedClass the mapped class. | [
"Initialize",
"the",
"mapping",
"metadata",
"for",
"the",
"given",
"class",
"."
] | 8b512704174dd6cba95e544c7d6ab66105cb8ec4 | https://github.com/paoding-code/paoding-rose/blob/8b512704174dd6cba95e544c7d6ab66105cb8ec4/paoding-rose-jade/src/main/java/net/paoding/rose/jade/rowmapper/BeanPropertyRowMapper.java#L111-L132 |
55,333 | paoding-code/paoding-rose | paoding-rose-jade/src/main/java/net/paoding/rose/jade/rowmapper/BeanPropertyRowMapper.java | BeanPropertyRowMapper.underscoreName | private String[] underscoreName(String camelCaseName) {
StringBuilder result = new StringBuilder();
if (camelCaseName != null && camelCaseName.length() > 0) {
result.append(camelCaseName.substring(0, 1).toLowerCase());
for (int i = 1; i < camelCaseName.length(); i++) {
... | java | private String[] underscoreName(String camelCaseName) {
StringBuilder result = new StringBuilder();
if (camelCaseName != null && camelCaseName.length() > 0) {
result.append(camelCaseName.substring(0, 1).toLowerCase());
for (int i = 1; i < camelCaseName.length(); i++) {
... | [
"private",
"String",
"[",
"]",
"underscoreName",
"(",
"String",
"camelCaseName",
")",
"{",
"StringBuilder",
"result",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"if",
"(",
"camelCaseName",
"!=",
"null",
"&&",
"camelCaseName",
".",
"length",
"(",
")",
">",
... | Convert a name in camelCase to an underscored name in lower case.
Any upper case letters are converted to lower case with a preceding
underscore.
@param camelCaseName the string containing original name
@return the converted name | [
"Convert",
"a",
"name",
"in",
"camelCase",
"to",
"an",
"underscored",
"name",
"in",
"lower",
"case",
".",
"Any",
"upper",
"case",
"letters",
"are",
"converted",
"to",
"lower",
"case",
"with",
"a",
"preceding",
"underscore",
"."
] | 8b512704174dd6cba95e544c7d6ab66105cb8ec4 | https://github.com/paoding-code/paoding-rose/blob/8b512704174dd6cba95e544c7d6ab66105cb8ec4/paoding-rose-jade/src/main/java/net/paoding/rose/jade/rowmapper/BeanPropertyRowMapper.java#L142-L177 |
55,334 | highsource/maven-jaxb2-plugin | plugin/src/main/java/org/jvnet/mjiip/v_2/OptionsFactory.java | OptionsFactory.createOptions | public Options createOptions(OptionsConfiguration optionsConfiguration)
throws MojoExecutionException {
final Options options = new Options();
options.verbose = optionsConfiguration.isVerbose();
options.debugMode = optionsConfiguration.isDebugMode();
options.classpaths.addAll(optionsConfiguration.getPlugin... | java | public Options createOptions(OptionsConfiguration optionsConfiguration)
throws MojoExecutionException {
final Options options = new Options();
options.verbose = optionsConfiguration.isVerbose();
options.debugMode = optionsConfiguration.isDebugMode();
options.classpaths.addAll(optionsConfiguration.getPlugin... | [
"public",
"Options",
"createOptions",
"(",
"OptionsConfiguration",
"optionsConfiguration",
")",
"throws",
"MojoExecutionException",
"{",
"final",
"Options",
"options",
"=",
"new",
"Options",
"(",
")",
";",
"options",
".",
"verbose",
"=",
"optionsConfiguration",
".",
... | Creates and initializes an instance of XJC options. | [
"Creates",
"and",
"initializes",
"an",
"instance",
"of",
"XJC",
"options",
"."
] | a4d3955be5a8c2a5f6137c0f436798c95ef95176 | https://github.com/highsource/maven-jaxb2-plugin/blob/a4d3955be5a8c2a5f6137c0f436798c95ef95176/plugin/src/main/java/org/jvnet/mjiip/v_2/OptionsFactory.java#L24-L100 |
55,335 | highsource/maven-jaxb2-plugin | plugin-core/src/main/java/org/jvnet/jaxb2/maven2/util/IOUtils.java | IOUtils.getInputSource | public static InputSource getInputSource(File file) {
try {
final URL url = file.toURI().toURL();
return getInputSource(url);
} catch (MalformedURLException e) {
return new InputSource(file.getPath());
}
} | java | public static InputSource getInputSource(File file) {
try {
final URL url = file.toURI().toURL();
return getInputSource(url);
} catch (MalformedURLException e) {
return new InputSource(file.getPath());
}
} | [
"public",
"static",
"InputSource",
"getInputSource",
"(",
"File",
"file",
")",
"{",
"try",
"{",
"final",
"URL",
"url",
"=",
"file",
".",
"toURI",
"(",
")",
".",
"toURL",
"(",
")",
";",
"return",
"getInputSource",
"(",
"url",
")",
";",
"}",
"catch",
"... | Creates an input source for the given file.
@param file
file to create input source for.
@return Created input source object. | [
"Creates",
"an",
"input",
"source",
"for",
"the",
"given",
"file",
"."
] | a4d3955be5a8c2a5f6137c0f436798c95ef95176 | https://github.com/highsource/maven-jaxb2-plugin/blob/a4d3955be5a8c2a5f6137c0f436798c95ef95176/plugin-core/src/main/java/org/jvnet/jaxb2/maven2/util/IOUtils.java#L28-L35 |
55,336 | highsource/maven-jaxb2-plugin | plugin-core/src/main/java/org/jvnet/jaxb2/maven2/RawXJC2Mojo.java | RawXJC2Mojo.execute | public void execute() throws MojoExecutionException {
synchronized (lock) {
injectDependencyDefaults();
resolveArtifacts();
// Install project dependencies into classloader's class path
// and execute xjc2.
final ClassLoader currentClassLoader = Thread.currentThread().getContextClassLoader();
... | java | public void execute() throws MojoExecutionException {
synchronized (lock) {
injectDependencyDefaults();
resolveArtifacts();
// Install project dependencies into classloader's class path
// and execute xjc2.
final ClassLoader currentClassLoader = Thread.currentThread().getContextClassLoader();
... | [
"public",
"void",
"execute",
"(",
")",
"throws",
"MojoExecutionException",
"{",
"synchronized",
"(",
"lock",
")",
"{",
"injectDependencyDefaults",
"(",
")",
";",
"resolveArtifacts",
"(",
")",
";",
"// Install project dependencies into classloader's class path\r",
"// and ... | Execute the maven2 mojo to invoke the xjc2 compiler based on any
configuration settings. | [
"Execute",
"the",
"maven2",
"mojo",
"to",
"invoke",
"the",
"xjc2",
"compiler",
"based",
"on",
"any",
"configuration",
"settings",
"."
] | a4d3955be5a8c2a5f6137c0f436798c95ef95176 | https://github.com/highsource/maven-jaxb2-plugin/blob/a4d3955be5a8c2a5f6137c0f436798c95ef95176/plugin-core/src/main/java/org/jvnet/jaxb2/maven2/RawXJC2Mojo.java#L304-L327 |
55,337 | highsource/maven-jaxb2-plugin | plugin-core/src/main/java/org/jvnet/jaxb2/maven2/RawXJC2Mojo.java | RawXJC2Mojo.setupMavenPaths | protected void setupMavenPaths() {
if (getAddCompileSourceRoot()) {
getProject().addCompileSourceRoot(getGenerateDirectory().getPath());
}
if (getAddTestCompileSourceRoot()) {
getProject().addTestCompileSourceRoot(getGenerateDirectory().getPath());
}
if (getEpisode() && getEpisodeFile() != null... | java | protected void setupMavenPaths() {
if (getAddCompileSourceRoot()) {
getProject().addCompileSourceRoot(getGenerateDirectory().getPath());
}
if (getAddTestCompileSourceRoot()) {
getProject().addTestCompileSourceRoot(getGenerateDirectory().getPath());
}
if (getEpisode() && getEpisodeFile() != null... | [
"protected",
"void",
"setupMavenPaths",
"(",
")",
"{",
"if",
"(",
"getAddCompileSourceRoot",
"(",
")",
")",
"{",
"getProject",
"(",
")",
".",
"addCompileSourceRoot",
"(",
"getGenerateDirectory",
"(",
")",
".",
"getPath",
"(",
")",
")",
";",
"}",
"if",
"(",... | Augments Maven paths with generated resources. | [
"Augments",
"Maven",
"paths",
"with",
"generated",
"resources",
"."
] | a4d3955be5a8c2a5f6137c0f436798c95ef95176 | https://github.com/highsource/maven-jaxb2-plugin/blob/a4d3955be5a8c2a5f6137c0f436798c95ef95176/plugin-core/src/main/java/org/jvnet/jaxb2/maven2/RawXJC2Mojo.java#L621-L648 |
55,338 | highsource/maven-jaxb2-plugin | plugin-core/src/main/java/org/jvnet/jaxb2/maven2/RawXJC2Mojo.java | RawXJC2Mojo.logConfiguration | protected void logConfiguration() throws MojoExecutionException {
super.logConfiguration();
// TODO clean up
getLog().info("catalogURIs (calculated):" + getCatalogURIs());
getLog().info("resolvedCatalogURIs (calculated):" + getResolvedCatalogURIs());
getLog().info("schemaFiles (calculated):" + getSchemaF... | java | protected void logConfiguration() throws MojoExecutionException {
super.logConfiguration();
// TODO clean up
getLog().info("catalogURIs (calculated):" + getCatalogURIs());
getLog().info("resolvedCatalogURIs (calculated):" + getResolvedCatalogURIs());
getLog().info("schemaFiles (calculated):" + getSchemaF... | [
"protected",
"void",
"logConfiguration",
"(",
")",
"throws",
"MojoExecutionException",
"{",
"super",
".",
"logConfiguration",
"(",
")",
";",
"// TODO clean up\r",
"getLog",
"(",
")",
".",
"info",
"(",
"\"catalogURIs (calculated):\"",
"+",
"getCatalogURIs",
"(",
")",... | Log the configuration settings. Shown when exception thrown or when verbose
is true. | [
"Log",
"the",
"configuration",
"settings",
".",
"Shown",
"when",
"exception",
"thrown",
"or",
"when",
"verbose",
"is",
"true",
"."
] | a4d3955be5a8c2a5f6137c0f436798c95ef95176 | https://github.com/highsource/maven-jaxb2-plugin/blob/a4d3955be5a8c2a5f6137c0f436798c95ef95176/plugin-core/src/main/java/org/jvnet/jaxb2/maven2/RawXJC2Mojo.java#L774-L791 |
55,339 | highsource/maven-jaxb2-plugin | plugin-core/src/main/java/org/jvnet/jaxb2/maven2/RawXJC2Mojo.java | RawXJC2Mojo.createCatalogResolver | protected CatalogResolver createCatalogResolver() throws MojoExecutionException {
final CatalogManager catalogManager = new CatalogManager();
catalogManager.setIgnoreMissingProperties(true);
catalogManager.setUseStaticCatalog(false);
// TODO Logging
if (getLog().isDebugEnabled()) {
catalogManager.set... | java | protected CatalogResolver createCatalogResolver() throws MojoExecutionException {
final CatalogManager catalogManager = new CatalogManager();
catalogManager.setIgnoreMissingProperties(true);
catalogManager.setUseStaticCatalog(false);
// TODO Logging
if (getLog().isDebugEnabled()) {
catalogManager.set... | [
"protected",
"CatalogResolver",
"createCatalogResolver",
"(",
")",
"throws",
"MojoExecutionException",
"{",
"final",
"CatalogManager",
"catalogManager",
"=",
"new",
"CatalogManager",
"(",
")",
";",
"catalogManager",
".",
"setIgnoreMissingProperties",
"(",
"true",
")",
"... | Creates an instance of catalog resolver.
@return Instance of the catalog resolver.
@throws MojoExecutionException
If catalog resolver cannot be instantiated. | [
"Creates",
"an",
"instance",
"of",
"catalog",
"resolver",
"."
] | a4d3955be5a8c2a5f6137c0f436798c95ef95176 | https://github.com/highsource/maven-jaxb2-plugin/blob/a4d3955be5a8c2a5f6137c0f436798c95ef95176/plugin-core/src/main/java/org/jvnet/jaxb2/maven2/RawXJC2Mojo.java#L891-L905 |
55,340 | asterisk-java/asterisk-java | src/main/java/org/asteriskjava/live/internal/MeetMeManager.java | MeetMeManager.getOrCreateRoomImpl | MeetMeRoomImpl getOrCreateRoomImpl(String roomNumber)
{
MeetMeRoomImpl room;
boolean created = false;
synchronized (rooms)
{
room = rooms.get(roomNumber);
if (room == null)
{
room = new MeetMeRoomImpl(server, roomNumber);
... | java | MeetMeRoomImpl getOrCreateRoomImpl(String roomNumber)
{
MeetMeRoomImpl room;
boolean created = false;
synchronized (rooms)
{
room = rooms.get(roomNumber);
if (room == null)
{
room = new MeetMeRoomImpl(server, roomNumber);
... | [
"MeetMeRoomImpl",
"getOrCreateRoomImpl",
"(",
"String",
"roomNumber",
")",
"{",
"MeetMeRoomImpl",
"room",
";",
"boolean",
"created",
"=",
"false",
";",
"synchronized",
"(",
"rooms",
")",
"{",
"room",
"=",
"rooms",
".",
"get",
"(",
"roomNumber",
")",
";",
"if... | Returns the room with the given number or creates a new one if none is
there yet.
@param roomNumber number of the room to get or create.
@return the room with the given number. | [
"Returns",
"the",
"room",
"with",
"the",
"given",
"number",
"or",
"creates",
"a",
"new",
"one",
"if",
"none",
"is",
"there",
"yet",
"."
] | cdc9849270d97ef75afa447a02c5194ed29121eb | https://github.com/asterisk-java/asterisk-java/blob/cdc9849270d97ef75afa447a02c5194ed29121eb/src/main/java/org/asteriskjava/live/internal/MeetMeManager.java#L378-L401 |
55,341 | asterisk-java/asterisk-java | src/main/java/org/asteriskjava/manager/event/SkypeChatMessageEvent.java | SkypeChatMessageEvent.getDecodedMessage | public String getDecodedMessage()
{
if (message == null)
{
return null;
}
return new String(Base64.base64ToByteArray(message), Charset.forName("UTF-8"));
} | java | public String getDecodedMessage()
{
if (message == null)
{
return null;
}
return new String(Base64.base64ToByteArray(message), Charset.forName("UTF-8"));
} | [
"public",
"String",
"getDecodedMessage",
"(",
")",
"{",
"if",
"(",
"message",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"return",
"new",
"String",
"(",
"Base64",
".",
"base64ToByteArray",
"(",
"message",
")",
",",
"Charset",
".",
"forName",
"("... | Returns the decoded message.
@return the decoded message. | [
"Returns",
"the",
"decoded",
"message",
"."
] | cdc9849270d97ef75afa447a02c5194ed29121eb | https://github.com/asterisk-java/asterisk-java/blob/cdc9849270d97ef75afa447a02c5194ed29121eb/src/main/java/org/asteriskjava/manager/event/SkypeChatMessageEvent.java#L111-L118 |
55,342 | asterisk-java/asterisk-java | src/main/java/org/asteriskjava/pbx/internal/asterisk/CallerIDImpl.java | CallerIDImpl.buildFromComponents | public static CallerID buildFromComponents(final String firstname, final String lastname, final String number)
{
String name = ""; //$NON-NLS-1$
if (firstname != null)
{
name += firstname.trim();
}
if (lastname != null)
{
if (name.length() > 0... | java | public static CallerID buildFromComponents(final String firstname, final String lastname, final String number)
{
String name = ""; //$NON-NLS-1$
if (firstname != null)
{
name += firstname.trim();
}
if (lastname != null)
{
if (name.length() > 0... | [
"public",
"static",
"CallerID",
"buildFromComponents",
"(",
"final",
"String",
"firstname",
",",
"final",
"String",
"lastname",
",",
"final",
"String",
"number",
")",
"{",
"String",
"name",
"=",
"\"\"",
";",
"//$NON-NLS-1$",
"if",
"(",
"firstname",
"!=",
"null... | This is a little helper class which will buid the name component of a
clid from the first and lastnames. If both firstname and lastname are
null then the name component will be an empty string.
@param firstname the person's firstname, may be null.
@param lastname the person's lastname, may be null
@param number the ph... | [
"This",
"is",
"a",
"little",
"helper",
"class",
"which",
"will",
"buid",
"the",
"name",
"component",
"of",
"a",
"clid",
"from",
"the",
"first",
"and",
"lastnames",
".",
"If",
"both",
"firstname",
"and",
"lastname",
"are",
"null",
"then",
"the",
"name",
"... | cdc9849270d97ef75afa447a02c5194ed29121eb | https://github.com/asterisk-java/asterisk-java/blob/cdc9849270d97ef75afa447a02c5194ed29121eb/src/main/java/org/asteriskjava/pbx/internal/asterisk/CallerIDImpl.java#L46-L64 |
55,343 | asterisk-java/asterisk-java | src/main/java/org/asteriskjava/live/internal/AsteriskChannelImpl.java | AsteriskChannelImpl.idChanged | void idChanged(Date date, String id)
{
final String oldId = this.id;
if (oldId != null && oldId.equals(id))
{
return;
}
this.id = id;
firePropertyChange(PROPERTY_ID, oldId, id);
} | java | void idChanged(Date date, String id)
{
final String oldId = this.id;
if (oldId != null && oldId.equals(id))
{
return;
}
this.id = id;
firePropertyChange(PROPERTY_ID, oldId, id);
} | [
"void",
"idChanged",
"(",
"Date",
"date",
",",
"String",
"id",
")",
"{",
"final",
"String",
"oldId",
"=",
"this",
".",
"id",
";",
"if",
"(",
"oldId",
"!=",
"null",
"&&",
"oldId",
".",
"equals",
"(",
"id",
")",
")",
"{",
"return",
";",
"}",
"this"... | Changes the id of this channel.
@param date date of the name change.
@param id the new unique id of this channel. | [
"Changes",
"the",
"id",
"of",
"this",
"channel",
"."
] | cdc9849270d97ef75afa447a02c5194ed29121eb | https://github.com/asterisk-java/asterisk-java/blob/cdc9849270d97ef75afa447a02c5194ed29121eb/src/main/java/org/asteriskjava/live/internal/AsteriskChannelImpl.java#L205-L216 |
55,344 | asterisk-java/asterisk-java | src/main/java/org/asteriskjava/live/internal/AsteriskChannelImpl.java | AsteriskChannelImpl.nameChanged | void nameChanged(Date date, String name)
{
final String oldName = this.name;
if (oldName != null && oldName.equals(name))
{
return;
}
this.name = name;
firePropertyChange(PROPERTY_NAME, oldName, name);
} | java | void nameChanged(Date date, String name)
{
final String oldName = this.name;
if (oldName != null && oldName.equals(name))
{
return;
}
this.name = name;
firePropertyChange(PROPERTY_NAME, oldName, name);
} | [
"void",
"nameChanged",
"(",
"Date",
"date",
",",
"String",
"name",
")",
"{",
"final",
"String",
"oldName",
"=",
"this",
".",
"name",
";",
"if",
"(",
"oldName",
"!=",
"null",
"&&",
"oldName",
".",
"equals",
"(",
"name",
")",
")",
"{",
"return",
";",
... | Changes the name of this channel.
@param date date of the name change.
@param name the new name of this channel. | [
"Changes",
"the",
"name",
"of",
"this",
"channel",
"."
] | cdc9849270d97ef75afa447a02c5194ed29121eb | https://github.com/asterisk-java/asterisk-java/blob/cdc9849270d97ef75afa447a02c5194ed29121eb/src/main/java/org/asteriskjava/live/internal/AsteriskChannelImpl.java#L239-L250 |
55,345 | asterisk-java/asterisk-java | src/main/java/org/asteriskjava/live/internal/AsteriskChannelImpl.java | AsteriskChannelImpl.setCallerId | void setCallerId(final CallerId callerId)
{
final CallerId oldCallerId = this.callerId;
this.callerId = callerId;
firePropertyChange(PROPERTY_CALLER_ID, oldCallerId, callerId);
} | java | void setCallerId(final CallerId callerId)
{
final CallerId oldCallerId = this.callerId;
this.callerId = callerId;
firePropertyChange(PROPERTY_CALLER_ID, oldCallerId, callerId);
} | [
"void",
"setCallerId",
"(",
"final",
"CallerId",
"callerId",
")",
"{",
"final",
"CallerId",
"oldCallerId",
"=",
"this",
".",
"callerId",
";",
"this",
".",
"callerId",
"=",
"callerId",
";",
"firePropertyChange",
"(",
"PROPERTY_CALLER_ID",
",",
"oldCallerId",
",",... | Sets the caller id of this channel.
@param callerId the caller id of this channel. | [
"Sets",
"the",
"caller",
"id",
"of",
"this",
"channel",
"."
] | cdc9849270d97ef75afa447a02c5194ed29121eb | https://github.com/asterisk-java/asterisk-java/blob/cdc9849270d97ef75afa447a02c5194ed29121eb/src/main/java/org/asteriskjava/live/internal/AsteriskChannelImpl.java#L262-L268 |
55,346 | asterisk-java/asterisk-java | src/main/java/org/asteriskjava/live/internal/AsteriskChannelImpl.java | AsteriskChannelImpl.stateChanged | synchronized void stateChanged(Date date, ChannelState state)
{
final ChannelStateHistoryEntry historyEntry;
final ChannelState oldState = this.state;
if (oldState == state)
{
return;
}
// System.err.println(id + " state change: " + oldState + " => " + s... | java | synchronized void stateChanged(Date date, ChannelState state)
{
final ChannelStateHistoryEntry historyEntry;
final ChannelState oldState = this.state;
if (oldState == state)
{
return;
}
// System.err.println(id + " state change: " + oldState + " => " + s... | [
"synchronized",
"void",
"stateChanged",
"(",
"Date",
"date",
",",
"ChannelState",
"state",
")",
"{",
"final",
"ChannelStateHistoryEntry",
"historyEntry",
";",
"final",
"ChannelState",
"oldState",
"=",
"this",
".",
"state",
";",
"if",
"(",
"oldState",
"==",
"stat... | Changes the state of this channel.
@param date when the state change occurred.
@param state the new state of this channel. | [
"Changes",
"the",
"state",
"of",
"this",
"channel",
"."
] | cdc9849270d97ef75afa447a02c5194ed29121eb | https://github.com/asterisk-java/asterisk-java/blob/cdc9849270d97ef75afa447a02c5194ed29121eb/src/main/java/org/asteriskjava/live/internal/AsteriskChannelImpl.java#L303-L323 |
55,347 | asterisk-java/asterisk-java | src/main/java/org/asteriskjava/live/internal/AsteriskChannelImpl.java | AsteriskChannelImpl.setAccount | void setAccount(String account)
{
final String oldAccount = this.account;
this.account = account;
firePropertyChange(PROPERTY_ACCOUNT, oldAccount, account);
} | java | void setAccount(String account)
{
final String oldAccount = this.account;
this.account = account;
firePropertyChange(PROPERTY_ACCOUNT, oldAccount, account);
} | [
"void",
"setAccount",
"(",
"String",
"account",
")",
"{",
"final",
"String",
"oldAccount",
"=",
"this",
".",
"account",
";",
"this",
".",
"account",
"=",
"account",
";",
"firePropertyChange",
"(",
"PROPERTY_ACCOUNT",
",",
"oldAccount",
",",
"account",
")",
"... | Sets the account code used to bill this channel.
@param account the account code used to bill this channel. | [
"Sets",
"the",
"account",
"code",
"used",
"to",
"bill",
"this",
"channel",
"."
] | cdc9849270d97ef75afa447a02c5194ed29121eb | https://github.com/asterisk-java/asterisk-java/blob/cdc9849270d97ef75afa447a02c5194ed29121eb/src/main/java/org/asteriskjava/live/internal/AsteriskChannelImpl.java#L335-L341 |
55,348 | asterisk-java/asterisk-java | src/main/java/org/asteriskjava/live/internal/AsteriskChannelImpl.java | AsteriskChannelImpl.extensionVisited | void extensionVisited(Date date, Extension extension)
{
final Extension oldCurrentExtension = getCurrentExtension();
final ExtensionHistoryEntry historyEntry;
historyEntry = new ExtensionHistoryEntry(date, extension);
synchronized (extensionHistory)
{
extensionH... | java | void extensionVisited(Date date, Extension extension)
{
final Extension oldCurrentExtension = getCurrentExtension();
final ExtensionHistoryEntry historyEntry;
historyEntry = new ExtensionHistoryEntry(date, extension);
synchronized (extensionHistory)
{
extensionH... | [
"void",
"extensionVisited",
"(",
"Date",
"date",
",",
"Extension",
"extension",
")",
"{",
"final",
"Extension",
"oldCurrentExtension",
"=",
"getCurrentExtension",
"(",
")",
";",
"final",
"ExtensionHistoryEntry",
"historyEntry",
";",
"historyEntry",
"=",
"new",
"Exte... | Adds a visted dialplan entry to the history.
@param date the date the extension has been visited.
@param extension the visted dialplan entry to add. | [
"Adds",
"a",
"visted",
"dialplan",
"entry",
"to",
"the",
"history",
"."
] | cdc9849270d97ef75afa447a02c5194ed29121eb | https://github.com/asterisk-java/asterisk-java/blob/cdc9849270d97ef75afa447a02c5194ed29121eb/src/main/java/org/asteriskjava/live/internal/AsteriskChannelImpl.java#L399-L412 |
55,349 | asterisk-java/asterisk-java | src/main/java/org/asteriskjava/live/internal/AsteriskChannelImpl.java | AsteriskChannelImpl.getDialedChannels | public List<AsteriskChannel> getDialedChannels()
{
final List<AsteriskChannel> copy;
synchronized (dialedChannels)
{
copy = new ArrayList<>(dialedChannels);
}
return copy;
} | java | public List<AsteriskChannel> getDialedChannels()
{
final List<AsteriskChannel> copy;
synchronized (dialedChannels)
{
copy = new ArrayList<>(dialedChannels);
}
return copy;
} | [
"public",
"List",
"<",
"AsteriskChannel",
">",
"getDialedChannels",
"(",
")",
"{",
"final",
"List",
"<",
"AsteriskChannel",
">",
"copy",
";",
"synchronized",
"(",
"dialedChannels",
")",
"{",
"copy",
"=",
"new",
"ArrayList",
"<>",
"(",
"dialedChannels",
")",
... | Retrives the conplete List of all dialed channels associated to ths calls
@return List of all dialed channels | [
"Retrives",
"the",
"conplete",
"List",
"of",
"all",
"dialed",
"channels",
"associated",
"to",
"ths",
"calls"
] | cdc9849270d97ef75afa447a02c5194ed29121eb | https://github.com/asterisk-java/asterisk-java/blob/cdc9849270d97ef75afa447a02c5194ed29121eb/src/main/java/org/asteriskjava/live/internal/AsteriskChannelImpl.java#L469-L479 |
55,350 | asterisk-java/asterisk-java | src/main/java/org/asteriskjava/live/internal/AsteriskChannelImpl.java | AsteriskChannelImpl.channelLinked | synchronized void channelLinked(Date date, AsteriskChannel linkedChannel)
{
final AsteriskChannel oldLinkedChannel;
synchronized (this.linkedChannels)
{
if (this.linkedChannels.isEmpty())
{
oldLinkedChannel = null;
this.linkedChannels.a... | java | synchronized void channelLinked(Date date, AsteriskChannel linkedChannel)
{
final AsteriskChannel oldLinkedChannel;
synchronized (this.linkedChannels)
{
if (this.linkedChannels.isEmpty())
{
oldLinkedChannel = null;
this.linkedChannels.a... | [
"synchronized",
"void",
"channelLinked",
"(",
"Date",
"date",
",",
"AsteriskChannel",
"linkedChannel",
")",
"{",
"final",
"AsteriskChannel",
"oldLinkedChannel",
";",
"synchronized",
"(",
"this",
".",
"linkedChannels",
")",
"{",
"if",
"(",
"this",
".",
"linkedChann... | Sets the channel this channel is bridged with.
@param date the date this channel was linked.
@param linkedChannel the channel this channel is bridged with. | [
"Sets",
"the",
"channel",
"this",
"channel",
"is",
"bridged",
"with",
"."
] | cdc9849270d97ef75afa447a02c5194ed29121eb | https://github.com/asterisk-java/asterisk-java/blob/cdc9849270d97ef75afa447a02c5194ed29121eb/src/main/java/org/asteriskjava/live/internal/AsteriskChannelImpl.java#L597-L623 |
55,351 | asterisk-java/asterisk-java | src/main/java/org/asteriskjava/manager/internal/ManagerConnectionImpl.java | ManagerConnectionImpl.determineVersionByCoreSettings | protected AsteriskVersion determineVersionByCoreSettings() throws Exception
{
ManagerResponse response = sendAction(new CoreSettingsAction());
if (!(response instanceof CoreSettingsResponse))
{
// NOTE: you need system or reporting permissions
logger.info("Could not ... | java | protected AsteriskVersion determineVersionByCoreSettings() throws Exception
{
ManagerResponse response = sendAction(new CoreSettingsAction());
if (!(response instanceof CoreSettingsResponse))
{
// NOTE: you need system or reporting permissions
logger.info("Could not ... | [
"protected",
"AsteriskVersion",
"determineVersionByCoreSettings",
"(",
")",
"throws",
"Exception",
"{",
"ManagerResponse",
"response",
"=",
"sendAction",
"(",
"new",
"CoreSettingsAction",
"(",
")",
")",
";",
"if",
"(",
"!",
"(",
"response",
"instanceof",
"CoreSettin... | Get asterisk version by 'core settings' actions. This is supported from
Asterisk 1.6 onwards.
@return
@throws Exception | [
"Get",
"asterisk",
"version",
"by",
"core",
"settings",
"actions",
".",
"This",
"is",
"supported",
"from",
"Asterisk",
"1",
".",
"6",
"onwards",
"."
] | cdc9849270d97ef75afa447a02c5194ed29121eb | https://github.com/asterisk-java/asterisk-java/blob/cdc9849270d97ef75afa447a02c5194ed29121eb/src/main/java/org/asteriskjava/manager/internal/ManagerConnectionImpl.java#L675-L688 |
55,352 | asterisk-java/asterisk-java | src/main/java/org/asteriskjava/manager/internal/ManagerConnectionImpl.java | ManagerConnectionImpl.determineVersionByCoreShowVersion | protected AsteriskVersion determineVersionByCoreShowVersion() throws Exception
{
final ManagerResponse coreShowVersionResponse = sendAction(new CommandAction(CMD_SHOW_VERSION));
if (coreShowVersionResponse == null || !(coreShowVersionResponse instanceof CommandResponse))
{
// th... | java | protected AsteriskVersion determineVersionByCoreShowVersion() throws Exception
{
final ManagerResponse coreShowVersionResponse = sendAction(new CommandAction(CMD_SHOW_VERSION));
if (coreShowVersionResponse == null || !(coreShowVersionResponse instanceof CommandResponse))
{
// th... | [
"protected",
"AsteriskVersion",
"determineVersionByCoreShowVersion",
"(",
")",
"throws",
"Exception",
"{",
"final",
"ManagerResponse",
"coreShowVersionResponse",
"=",
"sendAction",
"(",
"new",
"CommandAction",
"(",
"CMD_SHOW_VERSION",
")",
")",
";",
"if",
"(",
"coreShow... | Determine version by the 'core show version' command. This needs
'command' permissions.
@return
@throws Exception | [
"Determine",
"version",
"by",
"the",
"core",
"show",
"version",
"command",
".",
"This",
"needs",
"command",
"permissions",
"."
] | cdc9849270d97ef75afa447a02c5194ed29121eb | https://github.com/asterisk-java/asterisk-java/blob/cdc9849270d97ef75afa447a02c5194ed29121eb/src/main/java/org/asteriskjava/manager/internal/ManagerConnectionImpl.java#L697-L717 |
55,353 | asterisk-java/asterisk-java | src/main/java/org/asteriskjava/manager/internal/ManagerConnectionImpl.java | ManagerConnectionImpl.disconnect | protected synchronized void disconnect()
{
if (socket != null)
{
logger.info("Closing socket.");
try
{
socket.close();
}
catch (IOException ex)
{
logger.warn("Unable to close socket: " + ex.getMes... | java | protected synchronized void disconnect()
{
if (socket != null)
{
logger.info("Closing socket.");
try
{
socket.close();
}
catch (IOException ex)
{
logger.warn("Unable to close socket: " + ex.getMes... | [
"protected",
"synchronized",
"void",
"disconnect",
"(",
")",
"{",
"if",
"(",
"socket",
"!=",
"null",
")",
"{",
"logger",
".",
"info",
"(",
"\"Closing socket.\"",
")",
";",
"try",
"{",
"socket",
".",
"close",
"(",
")",
";",
"}",
"catch",
"(",
"IOExcepti... | Closes the socket connection. | [
"Closes",
"the",
"socket",
"connection",
"."
] | cdc9849270d97ef75afa447a02c5194ed29121eb | https://github.com/asterisk-java/asterisk-java/blob/cdc9849270d97ef75afa447a02c5194ed29121eb/src/main/java/org/asteriskjava/manager/internal/ManagerConnectionImpl.java#L788-L804 |
55,354 | asterisk-java/asterisk-java | src/main/java/org/asteriskjava/manager/internal/ManagerConnectionImpl.java | ManagerConnectionImpl.sendAction | public ManagerResponse sendAction(ManagerAction action, long timeout)
throws IOException, TimeoutException, IllegalArgumentException, IllegalStateException
{
ResponseHandlerResult result = new ResponseHandlerResult();
SendActionCallback callbackHandler = new DefaultSendActionCallback(res... | java | public ManagerResponse sendAction(ManagerAction action, long timeout)
throws IOException, TimeoutException, IllegalArgumentException, IllegalStateException
{
ResponseHandlerResult result = new ResponseHandlerResult();
SendActionCallback callbackHandler = new DefaultSendActionCallback(res... | [
"public",
"ManagerResponse",
"sendAction",
"(",
"ManagerAction",
"action",
",",
"long",
"timeout",
")",
"throws",
"IOException",
",",
"TimeoutException",
",",
"IllegalArgumentException",
",",
"IllegalStateException",
"{",
"ResponseHandlerResult",
"result",
"=",
"new",
"... | Implements synchronous sending of "simple" actions.
@param timeout - in milliseconds | [
"Implements",
"synchronous",
"sending",
"of",
"simple",
"actions",
"."
] | cdc9849270d97ef75afa447a02c5194ed29121eb | https://github.com/asterisk-java/asterisk-java/blob/cdc9849270d97ef75afa447a02c5194ed29121eb/src/main/java/org/asteriskjava/manager/internal/ManagerConnectionImpl.java#L817-L854 |
55,355 | asterisk-java/asterisk-java | src/main/java/org/asteriskjava/manager/internal/ManagerConnectionImpl.java | ManagerConnectionImpl.createInternalActionId | private String createInternalActionId()
{
final StringBuilder sb;
sb = new StringBuilder();
sb.append(this.hashCode());
sb.append("_");
sb.append(actionIdCounter.getAndIncrement());
return sb.toString();
} | java | private String createInternalActionId()
{
final StringBuilder sb;
sb = new StringBuilder();
sb.append(this.hashCode());
sb.append("_");
sb.append(actionIdCounter.getAndIncrement());
return sb.toString();
} | [
"private",
"String",
"createInternalActionId",
"(",
")",
"{",
"final",
"StringBuilder",
"sb",
";",
"sb",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"sb",
".",
"append",
"(",
"this",
".",
"hashCode",
"(",
")",
")",
";",
"sb",
".",
"append",
"(",
"\"_\"... | Creates a new unique internal action id based on the hash code of this
connection and a sequence.
@return a new internal action id
@see ManagerUtil#addInternalActionId(String,String)
@see ManagerUtil#getInternalActionId(String)
@see ManagerUtil#stripInternalActionId(String) | [
"Creates",
"a",
"new",
"unique",
"internal",
"action",
"id",
"based",
"on",
"the",
"hash",
"code",
"of",
"this",
"connection",
"and",
"a",
"sequence",
"."
] | cdc9849270d97ef75afa447a02c5194ed29121eb | https://github.com/asterisk-java/asterisk-java/blob/cdc9849270d97ef75afa447a02c5194ed29121eb/src/main/java/org/asteriskjava/manager/internal/ManagerConnectionImpl.java#L1046-L1056 |
55,356 | asterisk-java/asterisk-java | src/main/java/org/asteriskjava/manager/internal/ManagerConnectionImpl.java | ManagerConnectionImpl.dispatchEvent | public void dispatchEvent(ManagerEvent event)
{
// shouldn't happen
if (event == null)
{
logger.error("Unable to dispatch null event. This should never happen. Please file a bug.");
return;
}
dispatchLegacyEventIfNeeded(event);
if (logger.isDeb... | java | public void dispatchEvent(ManagerEvent event)
{
// shouldn't happen
if (event == null)
{
logger.error("Unable to dispatch null event. This should never happen. Please file a bug.");
return;
}
dispatchLegacyEventIfNeeded(event);
if (logger.isDeb... | [
"public",
"void",
"dispatchEvent",
"(",
"ManagerEvent",
"event",
")",
"{",
"// shouldn't happen",
"if",
"(",
"event",
"==",
"null",
")",
"{",
"logger",
".",
"error",
"(",
"\"Unable to dispatch null event. This should never happen. Please file a bug.\"",
")",
";",
"retur... | This method is called by the reader whenever a ManagerEvent is received.
The event is dispatched to all registered ManagerEventHandlers.
@param event the event received by the reader
@see #addEventListener(ManagerEventListener)
@see #removeEventListener(ManagerEventListener)
@see ManagerReader | [
"This",
"method",
"is",
"called",
"by",
"the",
"reader",
"whenever",
"a",
"ManagerEvent",
"is",
"received",
".",
"The",
"event",
"is",
"dispatched",
"to",
"all",
"registered",
"ManagerEventHandlers",
"."
] | cdc9849270d97ef75afa447a02c5194ed29121eb | https://github.com/asterisk-java/asterisk-java/blob/cdc9849270d97ef75afa447a02c5194ed29121eb/src/main/java/org/asteriskjava/manager/internal/ManagerConnectionImpl.java#L1174-L1285 |
55,357 | asterisk-java/asterisk-java | src/main/java/org/asteriskjava/manager/internal/ManagerConnectionImpl.java | ManagerConnectionImpl.dispatchLegacyEventIfNeeded | private void dispatchLegacyEventIfNeeded(ManagerEvent event)
{
if (event instanceof DialBeginEvent)
{
DialEvent legacyEvent = new DialEvent((DialBeginEvent) event);
dispatchEvent(legacyEvent);
}
} | java | private void dispatchLegacyEventIfNeeded(ManagerEvent event)
{
if (event instanceof DialBeginEvent)
{
DialEvent legacyEvent = new DialEvent((DialBeginEvent) event);
dispatchEvent(legacyEvent);
}
} | [
"private",
"void",
"dispatchLegacyEventIfNeeded",
"(",
"ManagerEvent",
"event",
")",
"{",
"if",
"(",
"event",
"instanceof",
"DialBeginEvent",
")",
"{",
"DialEvent",
"legacyEvent",
"=",
"new",
"DialEvent",
"(",
"(",
"DialBeginEvent",
")",
"event",
")",
";",
"disp... | Enro 2015-03 Workaround to continue having Legacy Events from Asterisk
13. | [
"Enro",
"2015",
"-",
"03",
"Workaround",
"to",
"continue",
"having",
"Legacy",
"Events",
"from",
"Asterisk",
"13",
"."
] | cdc9849270d97ef75afa447a02c5194ed29121eb | https://github.com/asterisk-java/asterisk-java/blob/cdc9849270d97ef75afa447a02c5194ed29121eb/src/main/java/org/asteriskjava/manager/internal/ManagerConnectionImpl.java#L1291-L1298 |
55,358 | asterisk-java/asterisk-java | src/main/java/org/asteriskjava/pbx/agi/config/AgiMappingStragegy.java | AgiMappingStragegy.addServiceAgiScript | @SuppressWarnings("unchecked")
public void addServiceAgiScript(Class< ? extends ServiceAgiScript> handler)
throws DuplicateScriptException, InstantiationException, IllegalAccessException
{
logger.info("loading agi handler {}" + handler.getCanonicalName());
ServiceAgiScript tmp... | java | @SuppressWarnings("unchecked")
public void addServiceAgiScript(Class< ? extends ServiceAgiScript> handler)
throws DuplicateScriptException, InstantiationException, IllegalAccessException
{
logger.info("loading agi handler {}" + handler.getCanonicalName());
ServiceAgiScript tmp... | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"public",
"void",
"addServiceAgiScript",
"(",
"Class",
"<",
"?",
"extends",
"ServiceAgiScript",
">",
"handler",
")",
"throws",
"DuplicateScriptException",
",",
"InstantiationException",
",",
"IllegalAccessException",
"... | this will be a pluggable extension system for the agi core, it's still a
work in progress and is not useable
@param handler
@throws DuplicateScriptException
@throws IllegalAccessException
@throws InstantiationException | [
"this",
"will",
"be",
"a",
"pluggable",
"extension",
"system",
"for",
"the",
"agi",
"core",
"it",
"s",
"still",
"a",
"work",
"in",
"progress",
"and",
"is",
"not",
"useable"
] | cdc9849270d97ef75afa447a02c5194ed29121eb | https://github.com/asterisk-java/asterisk-java/blob/cdc9849270d97ef75afa447a02c5194ed29121eb/src/main/java/org/asteriskjava/pbx/agi/config/AgiMappingStragegy.java#L101-L129 |
55,359 | asterisk-java/asterisk-java | src/main/java/org/asteriskjava/fastagi/ScriptEngineMappingStrategy.java | ScriptEngineMappingStrategy.getScriptEngine | protected ScriptEngine getScriptEngine(File file)
{
final String extension = getExtension(file.getName());
if (extension == null)
{
return null;
}
return getScriptEngineManager().getEngineByExtension(extension);
} | java | protected ScriptEngine getScriptEngine(File file)
{
final String extension = getExtension(file.getName());
if (extension == null)
{
return null;
}
return getScriptEngineManager().getEngineByExtension(extension);
} | [
"protected",
"ScriptEngine",
"getScriptEngine",
"(",
"File",
"file",
")",
"{",
"final",
"String",
"extension",
"=",
"getExtension",
"(",
"file",
".",
"getName",
"(",
")",
")",
";",
"if",
"(",
"extension",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}... | Searches for a ScriptEngine that can handle the given file.
@param file the file to search a ScriptEngine for.
@return the ScriptEngine or <code>null</code> if none is found. | [
"Searches",
"for",
"a",
"ScriptEngine",
"that",
"can",
"handle",
"the",
"given",
"file",
"."
] | cdc9849270d97ef75afa447a02c5194ed29121eb | https://github.com/asterisk-java/asterisk-java/blob/cdc9849270d97ef75afa447a02c5194ed29121eb/src/main/java/org/asteriskjava/fastagi/ScriptEngineMappingStrategy.java#L148-L157 |
55,360 | asterisk-java/asterisk-java | src/main/java/org/asteriskjava/fastagi/ScriptEngineMappingStrategy.java | ScriptEngineMappingStrategy.getClassLoader | protected ClassLoader getClassLoader()
{
final ClassLoader parentClassLoader = Thread.currentThread().getContextClassLoader();
final List<URL> jarFileUrls = new ArrayList<>();
if (libPath == null || libPath.length == 0)
{
return parentClassLoader;
}
for ... | java | protected ClassLoader getClassLoader()
{
final ClassLoader parentClassLoader = Thread.currentThread().getContextClassLoader();
final List<URL> jarFileUrls = new ArrayList<>();
if (libPath == null || libPath.length == 0)
{
return parentClassLoader;
}
for ... | [
"protected",
"ClassLoader",
"getClassLoader",
"(",
")",
"{",
"final",
"ClassLoader",
"parentClassLoader",
"=",
"Thread",
".",
"currentThread",
"(",
")",
".",
"getContextClassLoader",
"(",
")",
";",
"final",
"List",
"<",
"URL",
">",
"jarFileUrls",
"=",
"new",
"... | Returns the ClassLoader to use for the ScriptEngineManager. Adds all jar
files in the "lib" subdirectory of the current directory to the class
path. Override this method to provide your own ClassLoader.
@return the ClassLoader to use for the ScriptEngineManager.
@see #getScriptEngineManager() | [
"Returns",
"the",
"ClassLoader",
"to",
"use",
"for",
"the",
"ScriptEngineManager",
".",
"Adds",
"all",
"jar",
"files",
"in",
"the",
"lib",
"subdirectory",
"of",
"the",
"current",
"directory",
"to",
"the",
"class",
"path",
".",
"Override",
"this",
"method",
"... | cdc9849270d97ef75afa447a02c5194ed29121eb | https://github.com/asterisk-java/asterisk-java/blob/cdc9849270d97ef75afa447a02c5194ed29121eb/src/main/java/org/asteriskjava/fastagi/ScriptEngineMappingStrategy.java#L184-L236 |
55,361 | asterisk-java/asterisk-java | src/main/java/org/asteriskjava/fastagi/ScriptEngineMappingStrategy.java | ScriptEngineMappingStrategy.searchFile | protected File searchFile(String scriptName, String[] path)
{
if (scriptName == null || path == null)
{
return null;
}
for (String pathElement : path)
{
final File pathElementDir = new File(pathElement);
// skip if pathElement is not a dir... | java | protected File searchFile(String scriptName, String[] path)
{
if (scriptName == null || path == null)
{
return null;
}
for (String pathElement : path)
{
final File pathElementDir = new File(pathElement);
// skip if pathElement is not a dir... | [
"protected",
"File",
"searchFile",
"(",
"String",
"scriptName",
",",
"String",
"[",
"]",
"path",
")",
"{",
"if",
"(",
"scriptName",
"==",
"null",
"||",
"path",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"for",
"(",
"String",
"pathElement",
":"... | Searches for the file with the given name on the path.
@param scriptName the name of the file to search for.
@param path an array of directories to search for the file in order of
preference.
@return the canonical file if found on the path or <code>null</code> if
not found. | [
"Searches",
"for",
"the",
"file",
"with",
"the",
"given",
"name",
"on",
"the",
"path",
"."
] | cdc9849270d97ef75afa447a02c5194ed29121eb | https://github.com/asterisk-java/asterisk-java/blob/cdc9849270d97ef75afa447a02c5194ed29121eb/src/main/java/org/asteriskjava/fastagi/ScriptEngineMappingStrategy.java#L247-L293 |
55,362 | asterisk-java/asterisk-java | src/main/java/org/asteriskjava/pbx/internal/core/CoherentManagerEventQueue.java | CoherentManagerEventQueue.onManagerEvent | @Override
public void onManagerEvent(final org.asteriskjava.manager.event.ManagerEvent event)
{
// logger.error(event);
boolean wanted = false;
/**
* Dump any events we arn't interested in ASAP to minimise the
* processing overhead of these events.
*/
... | java | @Override
public void onManagerEvent(final org.asteriskjava.manager.event.ManagerEvent event)
{
// logger.error(event);
boolean wanted = false;
/**
* Dump any events we arn't interested in ASAP to minimise the
* processing overhead of these events.
*/
... | [
"@",
"Override",
"public",
"void",
"onManagerEvent",
"(",
"final",
"org",
".",
"asteriskjava",
".",
"manager",
".",
"event",
".",
"ManagerEvent",
"event",
")",
"{",
"// logger.error(event);",
"boolean",
"wanted",
"=",
"false",
";",
"/**\n * Dump any events w... | handles manager events passed to us in our role as a listener. We queue
the event so that it can be read, by the run method of this class, and
subsequently passed on to the original listener. | [
"handles",
"manager",
"events",
"passed",
"to",
"us",
"in",
"our",
"role",
"as",
"a",
"listener",
".",
"We",
"queue",
"the",
"event",
"so",
"that",
"it",
"can",
"be",
"read",
"by",
"the",
"run",
"method",
"of",
"this",
"class",
"and",
"subsequently",
"... | cdc9849270d97ef75afa447a02c5194ed29121eb | https://github.com/asterisk-java/asterisk-java/blob/cdc9849270d97ef75afa447a02c5194ed29121eb/src/main/java/org/asteriskjava/pbx/internal/core/CoherentManagerEventQueue.java#L70-L112 |
55,363 | asterisk-java/asterisk-java | src/main/java/org/asteriskjava/pbx/internal/core/CoherentManagerEventQueue.java | CoherentManagerEventQueue.dispatchEvent | public void dispatchEvent(final ManagerEvent event)
{
if (logger.isDebugEnabled())
{
logger.debug("dispatch=" + event.toString()); //$NON-NLS-1$
}
// take a copy of the listeners so they can be modified whilst we
// iterate over them
// The iteration may ... | java | public void dispatchEvent(final ManagerEvent event)
{
if (logger.isDebugEnabled())
{
logger.debug("dispatch=" + event.toString()); //$NON-NLS-1$
}
// take a copy of the listeners so they can be modified whilst we
// iterate over them
// The iteration may ... | [
"public",
"void",
"dispatchEvent",
"(",
"final",
"ManagerEvent",
"event",
")",
"{",
"if",
"(",
"logger",
".",
"isDebugEnabled",
"(",
")",
")",
"{",
"logger",
".",
"debug",
"(",
"\"dispatch=\"",
"+",
"event",
".",
"toString",
"(",
")",
")",
";",
"//$NON-N... | Events are sent here from the CoherentManagerEventQueue after being
converted from a ManagerEvent to an ManagerEvent. This method is called
from a dedicated thread attached to the event queue which it uses for
dispatching events. | [
"Events",
"are",
"sent",
"here",
"from",
"the",
"CoherentManagerEventQueue",
"after",
"being",
"converted",
"from",
"a",
"ManagerEvent",
"to",
"an",
"ManagerEvent",
".",
"This",
"method",
"is",
"called",
"from",
"a",
"dedicated",
"thread",
"attached",
"to",
"the... | cdc9849270d97ef75afa447a02c5194ed29121eb | https://github.com/asterisk-java/asterisk-java/blob/cdc9849270d97ef75afa447a02c5194ed29121eb/src/main/java/org/asteriskjava/pbx/internal/core/CoherentManagerEventQueue.java#L189-L236 |
55,364 | asterisk-java/asterisk-java | src/main/java/org/asteriskjava/pbx/internal/core/CoherentManagerEventQueue.java | CoherentManagerEventQueue.addListener | public void addListener(final FilteredManagerListener<ManagerEvent> listener)
{
synchronized (this.listeners)
{
this.listeners.addListener(listener);
synchronized (this.globalEvents)
{
Collection<Class< ? extends ManagerEvent>> expandEvents = expan... | java | public void addListener(final FilteredManagerListener<ManagerEvent> listener)
{
synchronized (this.listeners)
{
this.listeners.addListener(listener);
synchronized (this.globalEvents)
{
Collection<Class< ? extends ManagerEvent>> expandEvents = expan... | [
"public",
"void",
"addListener",
"(",
"final",
"FilteredManagerListener",
"<",
"ManagerEvent",
">",
"listener",
")",
"{",
"synchronized",
"(",
"this",
".",
"listeners",
")",
"{",
"this",
".",
"listeners",
".",
"addListener",
"(",
"listener",
")",
";",
"synchro... | Adds a listener which will be sent all events that its filterEvent
handler will accept. All events are dispatch by way of a shared queue
which is read via a thread which is shared by all listeners. Whilst poor
performance of you listener can affect other listeners you can't affect
the read thread which takes events fro... | [
"Adds",
"a",
"listener",
"which",
"will",
"be",
"sent",
"all",
"events",
"that",
"its",
"filterEvent",
"handler",
"will",
"accept",
".",
"All",
"events",
"are",
"dispatch",
"by",
"way",
"of",
"a",
"shared",
"queue",
"which",
"is",
"read",
"via",
"a",
"th... | cdc9849270d97ef75afa447a02c5194ed29121eb | https://github.com/asterisk-java/asterisk-java/blob/cdc9849270d97ef75afa447a02c5194ed29121eb/src/main/java/org/asteriskjava/pbx/internal/core/CoherentManagerEventQueue.java#L281-L293 |
55,365 | asterisk-java/asterisk-java | src/main/java/org/asteriskjava/pbx/internal/core/CoherentManagerEventQueue.java | CoherentManagerEventQueue.expandEvents | Collection<Class< ? extends ManagerEvent>> expandEvents(Collection<Class< ? extends ManagerEvent>> events)
{
Collection<Class< ? extends ManagerEvent>> requiredEvents = new HashSet<>();
for (Class< ? extends ManagerEvent> event : events)
{
requiredEvents.add(event);
i... | java | Collection<Class< ? extends ManagerEvent>> expandEvents(Collection<Class< ? extends ManagerEvent>> events)
{
Collection<Class< ? extends ManagerEvent>> requiredEvents = new HashSet<>();
for (Class< ? extends ManagerEvent> event : events)
{
requiredEvents.add(event);
i... | [
"Collection",
"<",
"Class",
"<",
"?",
"extends",
"ManagerEvent",
">",
">",
"expandEvents",
"(",
"Collection",
"<",
"Class",
"<",
"?",
"extends",
"ManagerEvent",
">",
">",
"events",
")",
"{",
"Collection",
"<",
"Class",
"<",
"?",
"extends",
"ManagerEvent",
... | in order to get Bridge Events, we must subscribe to Link and Unlink
events for asterisk 1.4, so we automatically add them if the Bridge Event
is required
@param events
@return | [
"in",
"order",
"to",
"get",
"Bridge",
"Events",
"we",
"must",
"subscribe",
"to",
"Link",
"and",
"Unlink",
"events",
"for",
"asterisk",
"1",
".",
"4",
"so",
"we",
"automatically",
"add",
"them",
"if",
"the",
"Bridge",
"Event",
"is",
"required"
] | cdc9849270d97ef75afa447a02c5194ed29121eb | https://github.com/asterisk-java/asterisk-java/blob/cdc9849270d97ef75afa447a02c5194ed29121eb/src/main/java/org/asteriskjava/pbx/internal/core/CoherentManagerEventQueue.java#L303-L317 |
55,366 | asterisk-java/asterisk-java | src/main/java/org/asteriskjava/pbx/internal/core/CoherentManagerEventQueue.java | CoherentManagerEventQueue.transferListeners | public void transferListeners(CoherentManagerEventQueue eventQueue)
{
synchronized (this.listeners)
{
synchronized (eventQueue.listeners)
{
Iterator<FilteredManagerListenerWrapper> itr = eventQueue.listeners.iterator();
while (itr.hasNext())
... | java | public void transferListeners(CoherentManagerEventQueue eventQueue)
{
synchronized (this.listeners)
{
synchronized (eventQueue.listeners)
{
Iterator<FilteredManagerListenerWrapper> itr = eventQueue.listeners.iterator();
while (itr.hasNext())
... | [
"public",
"void",
"transferListeners",
"(",
"CoherentManagerEventQueue",
"eventQueue",
")",
"{",
"synchronized",
"(",
"this",
".",
"listeners",
")",
"{",
"synchronized",
"(",
"eventQueue",
".",
"listeners",
")",
"{",
"Iterator",
"<",
"FilteredManagerListenerWrapper",
... | transfers the listeners from one queue to another.
@param eventQueue | [
"transfers",
"the",
"listeners",
"from",
"one",
"queue",
"to",
"another",
"."
] | cdc9849270d97ef75afa447a02c5194ed29121eb | https://github.com/asterisk-java/asterisk-java/blob/cdc9849270d97ef75afa447a02c5194ed29121eb/src/main/java/org/asteriskjava/pbx/internal/core/CoherentManagerEventQueue.java#L352-L368 |
55,367 | asterisk-java/asterisk-java | src/main/java/org/asteriskjava/pbx/CallImpl.java | CallImpl.join | public CallImpl join(OperandChannel originatingOperand, Call rhs, OperandChannel acceptingOperand,
CallDirection direction) throws PBXException
{
CallImpl joinTo = (CallImpl) rhs;
Channel originatingParty = null;
Channel acceptingParty = null;
// Pull the origin... | java | public CallImpl join(OperandChannel originatingOperand, Call rhs, OperandChannel acceptingOperand,
CallDirection direction) throws PBXException
{
CallImpl joinTo = (CallImpl) rhs;
Channel originatingParty = null;
Channel acceptingParty = null;
// Pull the origin... | [
"public",
"CallImpl",
"join",
"(",
"OperandChannel",
"originatingOperand",
",",
"Call",
"rhs",
",",
"OperandChannel",
"acceptingOperand",
",",
"CallDirection",
"direction",
")",
"throws",
"PBXException",
"{",
"CallImpl",
"joinTo",
"=",
"(",
"CallImpl",
")",
"rhs",
... | Joins a specific channel from this call with a specific channel from
another call which results in a new Call object being created. Channels
that do not participate in the join are left in their original Call.
@param originatingOperand the channel from this call that will
participate in the join as the originating Cha... | [
"Joins",
"a",
"specific",
"channel",
"from",
"this",
"call",
"with",
"a",
"specific",
"channel",
"from",
"another",
"call",
"which",
"results",
"in",
"a",
"new",
"Call",
"object",
"being",
"created",
".",
"Channels",
"that",
"do",
"not",
"participate",
"in",... | cdc9849270d97ef75afa447a02c5194ed29121eb | https://github.com/asterisk-java/asterisk-java/blob/cdc9849270d97ef75afa447a02c5194ed29121eb/src/main/java/org/asteriskjava/pbx/CallImpl.java#L176-L211 |
55,368 | asterisk-java/asterisk-java | src/main/java/org/asteriskjava/pbx/CallImpl.java | CallImpl.split | public Call split(OperandChannel channelToSplit) throws PBXException
{
Channel channel = this.getOperandChannel(channelToSplit);
channel.removeListener(this);
CallDirection direction = CallDirection.INBOUND;
// If this is the operator channel we need to flip the default
... | java | public Call split(OperandChannel channelToSplit) throws PBXException
{
Channel channel = this.getOperandChannel(channelToSplit);
channel.removeListener(this);
CallDirection direction = CallDirection.INBOUND;
// If this is the operator channel we need to flip the default
... | [
"public",
"Call",
"split",
"(",
"OperandChannel",
"channelToSplit",
")",
"throws",
"PBXException",
"{",
"Channel",
"channel",
"=",
"this",
".",
"getOperandChannel",
"(",
"channelToSplit",
")",
";",
"channel",
".",
"removeListener",
"(",
"this",
")",
";",
"CallDi... | Splits a channel out of a call into a separate call. This method should
only be called from the SplitActivity.
@return the resulting call.
@throws PBXException | [
"Splits",
"a",
"channel",
"out",
"of",
"a",
"call",
"into",
"a",
"separate",
"call",
".",
"This",
"method",
"should",
"only",
"be",
"called",
"from",
"the",
"SplitActivity",
"."
] | cdc9849270d97ef75afa447a02c5194ed29121eb | https://github.com/asterisk-java/asterisk-java/blob/cdc9849270d97ef75afa447a02c5194ed29121eb/src/main/java/org/asteriskjava/pbx/CallImpl.java#L326-L376 |
55,369 | asterisk-java/asterisk-java | src/main/java/org/asteriskjava/pbx/CallImpl.java | CallImpl.addHangupListener | public boolean addHangupListener(CallHangupListener listener)
{
boolean callStillUp = true;
if ((this._originatingParty != null && this._originatingParty.isLive())
|| (this._acceptingParty != null && this._acceptingParty.isLive())
|| (this._transferTargetParty ... | java | public boolean addHangupListener(CallHangupListener listener)
{
boolean callStillUp = true;
if ((this._originatingParty != null && this._originatingParty.isLive())
|| (this._acceptingParty != null && this._acceptingParty.isLive())
|| (this._transferTargetParty ... | [
"public",
"boolean",
"addHangupListener",
"(",
"CallHangupListener",
"listener",
")",
"{",
"boolean",
"callStillUp",
"=",
"true",
";",
"if",
"(",
"(",
"this",
".",
"_originatingParty",
"!=",
"null",
"&&",
"this",
".",
"_originatingParty",
".",
"isLive",
"(",
"... | Call this method to get a notification when this call hangs up.
@param listener
@return true if the hangup listener was added. False if the call has
already been hungup. | [
"Call",
"this",
"method",
"to",
"get",
"a",
"notification",
"when",
"this",
"call",
"hangs",
"up",
"."
] | cdc9849270d97ef75afa447a02c5194ed29121eb | https://github.com/asterisk-java/asterisk-java/blob/cdc9849270d97ef75afa447a02c5194ed29121eb/src/main/java/org/asteriskjava/pbx/CallImpl.java#L688-L700 |
55,370 | asterisk-java/asterisk-java | src/main/java/org/asteriskjava/pbx/CallImpl.java | CallImpl.isLive | public boolean isLive()
{
boolean live = false;
if ((this._originatingParty != null && this._originatingParty.isLive())
|| (this._acceptingParty != null && this._acceptingParty.isLive())
|| (this._transferTargetParty != null && this._transferTargetParty.isLive())... | java | public boolean isLive()
{
boolean live = false;
if ((this._originatingParty != null && this._originatingParty.isLive())
|| (this._acceptingParty != null && this._acceptingParty.isLive())
|| (this._transferTargetParty != null && this._transferTargetParty.isLive())... | [
"public",
"boolean",
"isLive",
"(",
")",
"{",
"boolean",
"live",
"=",
"false",
";",
"if",
"(",
"(",
"this",
".",
"_originatingParty",
"!=",
"null",
"&&",
"this",
".",
"_originatingParty",
".",
"isLive",
"(",
")",
")",
"||",
"(",
"this",
".",
"_acceptin... | returns true if the call has any active channels.
@return | [
"returns",
"true",
"if",
"the",
"call",
"has",
"any",
"active",
"channels",
"."
] | cdc9849270d97ef75afa447a02c5194ed29121eb | https://github.com/asterisk-java/asterisk-java/blob/cdc9849270d97ef75afa447a02c5194ed29121eb/src/main/java/org/asteriskjava/pbx/CallImpl.java#L707-L715 |
55,371 | asterisk-java/asterisk-java | src/main/java/org/asteriskjava/pbx/CallImpl.java | CallImpl.getChannels | @Override
public List<Channel> getChannels()
{
List<Channel> channels = new LinkedList<>();
if (_acceptingParty != null)
channels.add(_acceptingParty);
if (_originatingParty != null)
channels.add(_originatingParty);
if (_transferTargetParty != null... | java | @Override
public List<Channel> getChannels()
{
List<Channel> channels = new LinkedList<>();
if (_acceptingParty != null)
channels.add(_acceptingParty);
if (_originatingParty != null)
channels.add(_originatingParty);
if (_transferTargetParty != null... | [
"@",
"Override",
"public",
"List",
"<",
"Channel",
">",
"getChannels",
"(",
")",
"{",
"List",
"<",
"Channel",
">",
"channels",
"=",
"new",
"LinkedList",
"<>",
"(",
")",
";",
"if",
"(",
"_acceptingParty",
"!=",
"null",
")",
"channels",
".",
"add",
"(",
... | Returns all of the Channels associated with this call. | [
"Returns",
"all",
"of",
"the",
"Channels",
"associated",
"with",
"this",
"call",
"."
] | cdc9849270d97ef75afa447a02c5194ed29121eb | https://github.com/asterisk-java/asterisk-java/blob/cdc9849270d97ef75afa447a02c5194ed29121eb/src/main/java/org/asteriskjava/pbx/CallImpl.java#L873-L884 |
55,372 | asterisk-java/asterisk-java | src/main/java/org/asteriskjava/pbx/internal/core/ChannelProxy.java | ChannelProxy.masquerade | public void masquerade(ChannelProxy cloneProxy) throws InvalidChannelName
{
ChannelImpl originalChannel = this._channel;
ChannelImpl cloneChannel = cloneProxy._channel;
cloneChannel.masquerade(this._channel);
// detach the hangup listeners
originalChannel.removeListener(thi... | java | public void masquerade(ChannelProxy cloneProxy) throws InvalidChannelName
{
ChannelImpl originalChannel = this._channel;
ChannelImpl cloneChannel = cloneProxy._channel;
cloneChannel.masquerade(this._channel);
// detach the hangup listeners
originalChannel.removeListener(thi... | [
"public",
"void",
"masquerade",
"(",
"ChannelProxy",
"cloneProxy",
")",
"throws",
"InvalidChannelName",
"{",
"ChannelImpl",
"originalChannel",
"=",
"this",
".",
"_channel",
";",
"ChannelImpl",
"cloneChannel",
"=",
"cloneProxy",
".",
"_channel",
";",
"cloneChannel",
... | Used to handle a MasqueradeEvent. We essentially swap the two underlying
channels between the two proxies.
@param cloneProxy
@throws InvalidChannelName | [
"Used",
"to",
"handle",
"a",
"MasqueradeEvent",
".",
"We",
"essentially",
"swap",
"the",
"two",
"underlying",
"channels",
"between",
"the",
"two",
"proxies",
"."
] | cdc9849270d97ef75afa447a02c5194ed29121eb | https://github.com/asterisk-java/asterisk-java/blob/cdc9849270d97ef75afa447a02c5194ed29121eb/src/main/java/org/asteriskjava/pbx/internal/core/ChannelProxy.java#L210-L230 |
55,373 | asterisk-java/asterisk-java | src/main/java/org/asteriskjava/util/ReflectionUtil.java | ReflectionUtil.isClassAvailable | public static boolean isClassAvailable(String s)
{
final ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
try
{
classLoader.loadClass(s);
return true;
}
catch (ClassNotFoundException e)
{
return false;
... | java | public static boolean isClassAvailable(String s)
{
final ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
try
{
classLoader.loadClass(s);
return true;
}
catch (ClassNotFoundException e)
{
return false;
... | [
"public",
"static",
"boolean",
"isClassAvailable",
"(",
"String",
"s",
")",
"{",
"final",
"ClassLoader",
"classLoader",
"=",
"Thread",
".",
"currentThread",
"(",
")",
".",
"getContextClassLoader",
"(",
")",
";",
"try",
"{",
"classLoader",
".",
"loadClass",
"("... | Checks if the class is available on the current thread's context class
loader.
@param s fully qualified name of the class to check.
@return <code>true</code> if the class is available, <code>false</code>
otherwise. | [
"Checks",
"if",
"the",
"class",
"is",
"available",
"on",
"the",
"current",
"thread",
"s",
"context",
"class",
"loader",
"."
] | cdc9849270d97ef75afa447a02c5194ed29121eb | https://github.com/asterisk-java/asterisk-java/blob/cdc9849270d97ef75afa447a02c5194ed29121eb/src/main/java/org/asteriskjava/util/ReflectionUtil.java#L209-L222 |
55,374 | asterisk-java/asterisk-java | src/main/java/org/asteriskjava/util/ReflectionUtil.java | ReflectionUtil.newInstance | public static Object newInstance(String s)
{
final ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
try
{
Class< ? > clazz = classLoader.loadClass(s);
Constructor< ? > constructor = clazz.getConstructor();
return constructor.newIn... | java | public static Object newInstance(String s)
{
final ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
try
{
Class< ? > clazz = classLoader.loadClass(s);
Constructor< ? > constructor = clazz.getConstructor();
return constructor.newIn... | [
"public",
"static",
"Object",
"newInstance",
"(",
"String",
"s",
")",
"{",
"final",
"ClassLoader",
"classLoader",
"=",
"Thread",
".",
"currentThread",
"(",
")",
".",
"getContextClassLoader",
"(",
")",
";",
"try",
"{",
"Class",
"<",
"?",
">",
"clazz",
"=",
... | Creates a new instance of the given class. The class is loaded using the
current thread's context class loader and instantiated using its default
constructor.
@param s fully qualified name of the class to instantiate.
@return the new instance or <code>null</code> on failure. | [
"Creates",
"a",
"new",
"instance",
"of",
"the",
"given",
"class",
".",
"The",
"class",
"is",
"loaded",
"using",
"the",
"current",
"thread",
"s",
"context",
"class",
"loader",
"and",
"instantiated",
"using",
"its",
"default",
"constructor",
"."
] | cdc9849270d97ef75afa447a02c5194ed29121eb | https://github.com/asterisk-java/asterisk-java/blob/cdc9849270d97ef75afa447a02c5194ed29121eb/src/main/java/org/asteriskjava/util/ReflectionUtil.java#L232-L264 |
55,375 | asterisk-java/asterisk-java | src/main/java/org/asteriskjava/util/ReflectionUtil.java | ReflectionUtil.getClassNamesFromPackage | private static Set<String> getClassNamesFromPackage(String packageName) throws IOException, URISyntaxException
{
ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
Enumeration<URL> packageURLs;
Set<String> names = new HashSet<String>();
packageName = packageNa... | java | private static Set<String> getClassNamesFromPackage(String packageName) throws IOException, URISyntaxException
{
ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
Enumeration<URL> packageURLs;
Set<String> names = new HashSet<String>();
packageName = packageNa... | [
"private",
"static",
"Set",
"<",
"String",
">",
"getClassNamesFromPackage",
"(",
"String",
"packageName",
")",
"throws",
"IOException",
",",
"URISyntaxException",
"{",
"ClassLoader",
"classLoader",
"=",
"Thread",
".",
"currentThread",
"(",
")",
".",
"getContextClass... | retrieve all the classes that can be found on the classpath for the
specified packageName
@param packageName
@return
@throws IOException
@throws URISyntaxException | [
"retrieve",
"all",
"the",
"classes",
"that",
"can",
"be",
"found",
"on",
"the",
"classpath",
"for",
"the",
"specified",
"packageName"
] | cdc9849270d97ef75afa447a02c5194ed29121eb | https://github.com/asterisk-java/asterisk-java/blob/cdc9849270d97ef75afa447a02c5194ed29121eb/src/main/java/org/asteriskjava/util/ReflectionUtil.java#L320-L390 |
55,376 | asterisk-java/asterisk-java | src/main/java/org/asteriskjava/manager/internal/ResponseBuilderImpl.java | ResponseBuilderImpl.buildResponse | @SuppressWarnings("unchecked")
public ManagerResponse buildResponse(Class<? extends ManagerResponse> responseClass, Map<String, Object> attributes)
{
final ManagerResponse response;
final String responseType = (String) attributes.get(RESPONSE_KEY);
if (RESPONSE_TYPE_ERROR.equalsIgnoreCase(... | java | @SuppressWarnings("unchecked")
public ManagerResponse buildResponse(Class<? extends ManagerResponse> responseClass, Map<String, Object> attributes)
{
final ManagerResponse response;
final String responseType = (String) attributes.get(RESPONSE_KEY);
if (RESPONSE_TYPE_ERROR.equalsIgnoreCase(... | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"public",
"ManagerResponse",
"buildResponse",
"(",
"Class",
"<",
"?",
"extends",
"ManagerResponse",
">",
"responseClass",
",",
"Map",
"<",
"String",
",",
"Object",
">",
"attributes",
")",
"{",
"final",
"Manager... | Asterisk 14.3.0 | [
"Asterisk",
"14",
".",
"3",
".",
"0"
] | cdc9849270d97ef75afa447a02c5194ed29121eb | https://github.com/asterisk-java/asterisk-java/blob/cdc9849270d97ef75afa447a02c5194ed29121eb/src/main/java/org/asteriskjava/manager/internal/ResponseBuilderImpl.java#L49-L117 |
55,377 | asterisk-java/asterisk-java | src/main/java/org/asteriskjava/pbx/internal/core/PeerMonitor.java | PeerMonitor.handleEvent | private synchronized void handleEvent(final StatusCompleteEvent event)
{
for (final Peer peer : this.peerList)
{
peer.endSweep();
}
PeerMonitor.logger.debug("Channel Mark and Sweep complete"); //$NON-NLS-1$
} | java | private synchronized void handleEvent(final StatusCompleteEvent event)
{
for (final Peer peer : this.peerList)
{
peer.endSweep();
}
PeerMonitor.logger.debug("Channel Mark and Sweep complete"); //$NON-NLS-1$
} | [
"private",
"synchronized",
"void",
"handleEvent",
"(",
"final",
"StatusCompleteEvent",
"event",
")",
"{",
"for",
"(",
"final",
"Peer",
"peer",
":",
"this",
".",
"peerList",
")",
"{",
"peer",
".",
"endSweep",
"(",
")",
";",
"}",
"PeerMonitor",
".",
"logger"... | We receive the StatusComplete event once the Mark and Sweep channel
operation has completed. We now call endSweep which will remove any
channels that were not marked during the operation.
@param event | [
"We",
"receive",
"the",
"StatusComplete",
"event",
"once",
"the",
"Mark",
"and",
"Sweep",
"channel",
"operation",
"has",
"completed",
".",
"We",
"now",
"call",
"endSweep",
"which",
"will",
"remove",
"any",
"channels",
"that",
"were",
"not",
"marked",
"during",... | cdc9849270d97ef75afa447a02c5194ed29121eb | https://github.com/asterisk-java/asterisk-java/blob/cdc9849270d97ef75afa447a02c5194ed29121eb/src/main/java/org/asteriskjava/pbx/internal/core/PeerMonitor.java#L291-L299 |
55,378 | asterisk-java/asterisk-java | src/main/java/org/asteriskjava/pbx/internal/core/PeerMonitor.java | PeerMonitor.startSweep | public void startSweep()
{
PeerMonitor.logger.debug("Starting channel mark and sweep"); //$NON-NLS-1$
// Mark every channel as 'clearing'
synchronized (PeerMonitor.class)
{
for (final Peer peer : this.peerList)
{
peer.startSweep();
... | java | public void startSweep()
{
PeerMonitor.logger.debug("Starting channel mark and sweep"); //$NON-NLS-1$
// Mark every channel as 'clearing'
synchronized (PeerMonitor.class)
{
for (final Peer peer : this.peerList)
{
peer.startSweep();
... | [
"public",
"void",
"startSweep",
"(",
")",
"{",
"PeerMonitor",
".",
"logger",
".",
"debug",
"(",
"\"Starting channel mark and sweep\"",
")",
";",
"//$NON-NLS-1$\r",
"// Mark every channel as 'clearing'\r",
"synchronized",
"(",
"PeerMonitor",
".",
"class",
")",
"{",
"fo... | Check every channel to make certain they are still active. We do this in
case we missed a hangup event along the way somewhere. This allows us to
cleanup any old channels. We start by clearing the mark on all channels
and then generates a Asterisk status message for every active channel. At
the end of the process any c... | [
"Check",
"every",
"channel",
"to",
"make",
"certain",
"they",
"are",
"still",
"active",
".",
"We",
"do",
"this",
"in",
"case",
"we",
"missed",
"a",
"hangup",
"event",
"along",
"the",
"way",
"somewhere",
".",
"This",
"allows",
"us",
"to",
"cleanup",
"any"... | cdc9849270d97ef75afa447a02c5194ed29121eb | https://github.com/asterisk-java/asterisk-java/blob/cdc9849270d97ef75afa447a02c5194ed29121eb/src/main/java/org/asteriskjava/pbx/internal/core/PeerMonitor.java#L348-L375 |
55,379 | asterisk-java/asterisk-java | src/main/java/org/asteriskjava/fastagi/internal/AgiRequestImpl.java | AgiRequestImpl.parseParameters | private synchronized Map<String, String[]> parseParameters(String s)
{
Map<String, List<String>> parameterMap;
Map<String, String[]> result;
StringTokenizer st;
parameterMap = new HashMap<>();
result = new HashMap<>();
if (s == null)
{
return res... | java | private synchronized Map<String, String[]> parseParameters(String s)
{
Map<String, List<String>> parameterMap;
Map<String, String[]> result;
StringTokenizer st;
parameterMap = new HashMap<>();
result = new HashMap<>();
if (s == null)
{
return res... | [
"private",
"synchronized",
"Map",
"<",
"String",
",",
"String",
"[",
"]",
">",
"parseParameters",
"(",
"String",
"s",
")",
"{",
"Map",
"<",
"String",
",",
"List",
"<",
"String",
">",
">",
"parameterMap",
";",
"Map",
"<",
"String",
",",
"String",
"[",
... | Parses the given parameter string and caches the result.
@param s the parameter string to parse
@return a Map made up of parameter names their values | [
"Parses",
"the",
"given",
"parameter",
"string",
"and",
"caches",
"the",
"result",
"."
] | cdc9849270d97ef75afa447a02c5194ed29121eb | https://github.com/asterisk-java/asterisk-java/blob/cdc9849270d97ef75afa447a02c5194ed29121eb/src/main/java/org/asteriskjava/fastagi/internal/AgiRequestImpl.java#L486-L560 |
55,380 | asterisk-java/asterisk-java | src/main/java/org/asteriskjava/fastagi/AgiOperations.java | AgiOperations.getChannel | protected AgiChannel getChannel()
{
AgiChannel threadBoundChannel;
if (channel != null)
{
return channel;
}
threadBoundChannel = AgiConnectionHandler.getChannel();
if (threadBoundChannel == null)
{
throw new IllegalStateException("Try... | java | protected AgiChannel getChannel()
{
AgiChannel threadBoundChannel;
if (channel != null)
{
return channel;
}
threadBoundChannel = AgiConnectionHandler.getChannel();
if (threadBoundChannel == null)
{
throw new IllegalStateException("Try... | [
"protected",
"AgiChannel",
"getChannel",
"(",
")",
"{",
"AgiChannel",
"threadBoundChannel",
";",
"if",
"(",
"channel",
"!=",
"null",
")",
"{",
"return",
"channel",
";",
"}",
"threadBoundChannel",
"=",
"AgiConnectionHandler",
".",
"getChannel",
"(",
")",
";",
"... | Returns the channel to operate on.
@return the channel to operate on.
@throws IllegalStateException if no {@link AgiChannel} is bound to the
current channel and no channel has been passed to the
constructor. | [
"Returns",
"the",
"channel",
"to",
"operate",
"on",
"."
] | cdc9849270d97ef75afa447a02c5194ed29121eb | https://github.com/asterisk-java/asterisk-java/blob/cdc9849270d97ef75afa447a02c5194ed29121eb/src/main/java/org/asteriskjava/fastagi/AgiOperations.java#L63-L79 |
55,381 | asterisk-java/asterisk-java | src/main/java/org/asteriskjava/pbx/internal/managerAPI/Connector.java | Connector.connect | public ManagerConnection connect(final AsteriskSettings asteriskSettings)
throws IOException, AuthenticationFailedException, TimeoutException, IllegalStateException
{
checkIfAsteriskRunning(asteriskSettings);
this.makeConnection(asteriskSettings);
return this.managerConnecti... | java | public ManagerConnection connect(final AsteriskSettings asteriskSettings)
throws IOException, AuthenticationFailedException, TimeoutException, IllegalStateException
{
checkIfAsteriskRunning(asteriskSettings);
this.makeConnection(asteriskSettings);
return this.managerConnecti... | [
"public",
"ManagerConnection",
"connect",
"(",
"final",
"AsteriskSettings",
"asteriskSettings",
")",
"throws",
"IOException",
",",
"AuthenticationFailedException",
",",
"TimeoutException",
",",
"IllegalStateException",
"{",
"checkIfAsteriskRunning",
"(",
"asteriskSettings",
"... | Establishes a Asterisk ManagerConnection as well as performing the
'login' required by Asterisk.
@param asteriskSettings
@return
@throws IOException
@throws AuthenticationFailedException
@throws TimeoutException
@throws IllegalStateException | [
"Establishes",
"a",
"Asterisk",
"ManagerConnection",
"as",
"well",
"as",
"performing",
"the",
"login",
"required",
"by",
"Asterisk",
"."
] | cdc9849270d97ef75afa447a02c5194ed29121eb | https://github.com/asterisk-java/asterisk-java/blob/cdc9849270d97ef75afa447a02c5194ed29121eb/src/main/java/org/asteriskjava/pbx/internal/managerAPI/Connector.java#L35-L41 |
55,382 | asterisk-java/asterisk-java | src/main/java/org/asteriskjava/pbx/internal/managerAPI/Connector.java | Connector.checkIfAsteriskRunning | private void checkIfAsteriskRunning(AsteriskSettings asteriskSettings) throws UnknownHostException, IOException
{
try (Socket socket = new Socket())
{
socket.setSoTimeout(2000);
InetSocketAddress asteriskHost = new InetSocketAddress(asteriskSettings.getAsteriskIP(),
... | java | private void checkIfAsteriskRunning(AsteriskSettings asteriskSettings) throws UnknownHostException, IOException
{
try (Socket socket = new Socket())
{
socket.setSoTimeout(2000);
InetSocketAddress asteriskHost = new InetSocketAddress(asteriskSettings.getAsteriskIP(),
... | [
"private",
"void",
"checkIfAsteriskRunning",
"(",
"AsteriskSettings",
"asteriskSettings",
")",
"throws",
"UnknownHostException",
",",
"IOException",
"{",
"try",
"(",
"Socket",
"socket",
"=",
"new",
"Socket",
"(",
")",
")",
"{",
"socket",
".",
"setSoTimeout",
"(",
... | This method will try to make a simple tcp connection to the asterisk
manager to establish it is up. We do this as the default makeConnection
doesn't have a timeout and will sit trying to connect for a minute or so.
By using method when the user realises they have a problem on start up
they can go to the asterisk panel.... | [
"This",
"method",
"will",
"try",
"to",
"make",
"a",
"simple",
"tcp",
"connection",
"to",
"the",
"asterisk",
"manager",
"to",
"establish",
"it",
"is",
"up",
".",
"We",
"do",
"this",
"as",
"the",
"default",
"makeConnection",
"doesn",
"t",
"have",
"a",
"tim... | cdc9849270d97ef75afa447a02c5194ed29121eb | https://github.com/asterisk-java/asterisk-java/blob/cdc9849270d97ef75afa447a02c5194ed29121eb/src/main/java/org/asteriskjava/pbx/internal/managerAPI/Connector.java#L56-L67 |
55,383 | asterisk-java/asterisk-java | src/main/java/org/asteriskjava/pbx/internal/asterisk/MeetmeRoomControl.java | MeetmeRoomControl.findMeetmeRoom | synchronized private MeetmeRoom findMeetmeRoom(final String roomNumber)
{
MeetmeRoom foundRoom = null;
for (final MeetmeRoom room : this.rooms)
{
if (room.getRoomNumber().compareToIgnoreCase(roomNumber) == 0)
{
foundRoom = room;
... | java | synchronized private MeetmeRoom findMeetmeRoom(final String roomNumber)
{
MeetmeRoom foundRoom = null;
for (final MeetmeRoom room : this.rooms)
{
if (room.getRoomNumber().compareToIgnoreCase(roomNumber) == 0)
{
foundRoom = room;
... | [
"synchronized",
"private",
"MeetmeRoom",
"findMeetmeRoom",
"(",
"final",
"String",
"roomNumber",
")",
"{",
"MeetmeRoom",
"foundRoom",
"=",
"null",
";",
"for",
"(",
"final",
"MeetmeRoom",
"room",
":",
"this",
".",
"rooms",
")",
"{",
"if",
"(",
"room",
".",
... | Returns the MeetmeRoom for the given room number. The room number will be
an integer value offset from the meetme base address.
@param roomNumber the meetme room number
@return | [
"Returns",
"the",
"MeetmeRoom",
"for",
"the",
"given",
"room",
"number",
".",
"The",
"room",
"number",
"will",
"be",
"an",
"integer",
"value",
"offset",
"from",
"the",
"meetme",
"base",
"address",
"."
] | cdc9849270d97ef75afa447a02c5194ed29121eb | https://github.com/asterisk-java/asterisk-java/blob/cdc9849270d97ef75afa447a02c5194ed29121eb/src/main/java/org/asteriskjava/pbx/internal/asterisk/MeetmeRoomControl.java#L171-L183 |
55,384 | asterisk-java/asterisk-java | src/main/java/org/asteriskjava/AsteriskVersion.java | AsteriskVersion.getDetermineVersionFromString | public static AsteriskVersion getDetermineVersionFromString(String coreLine)
{
for (AsteriskVersion version : knownVersions)
{
for (Pattern pattern : version.patterns)
{
if (pattern.matcher(coreLine).matches())
{
return vers... | java | public static AsteriskVersion getDetermineVersionFromString(String coreLine)
{
for (AsteriskVersion version : knownVersions)
{
for (Pattern pattern : version.patterns)
{
if (pattern.matcher(coreLine).matches())
{
return vers... | [
"public",
"static",
"AsteriskVersion",
"getDetermineVersionFromString",
"(",
"String",
"coreLine",
")",
"{",
"for",
"(",
"AsteriskVersion",
"version",
":",
"knownVersions",
")",
"{",
"for",
"(",
"Pattern",
"pattern",
":",
"version",
".",
"patterns",
")",
"{",
"i... | Determine the Asterisk version from the string returned by Asterisk. The
string should contain "Asterisk " followed by a version number.
@param coreLine
@return the detected version, or null if unknown | [
"Determine",
"the",
"Asterisk",
"version",
"from",
"the",
"string",
"returned",
"by",
"Asterisk",
".",
"The",
"string",
"should",
"contain",
"Asterisk",
"followed",
"by",
"a",
"version",
"number",
"."
] | cdc9849270d97ef75afa447a02c5194ed29121eb | https://github.com/asterisk-java/asterisk-java/blob/cdc9849270d97ef75afa447a02c5194ed29121eb/src/main/java/org/asteriskjava/AsteriskVersion.java#L200-L214 |
55,385 | asterisk-java/asterisk-java | src/main/java/org/asteriskjava/live/internal/QueueManager.java | QueueManager.updateQueue | void updateQueue(String queue) throws ManagerCommunicationException
{
ResponseEvents re;
try
{
QueueStatusAction queueStatusAction = new QueueStatusAction();
queueStatusAction.setQueue(queue);
re = server.sendEventGeneratingAction(queueStatusAction);
... | java | void updateQueue(String queue) throws ManagerCommunicationException
{
ResponseEvents re;
try
{
QueueStatusAction queueStatusAction = new QueueStatusAction();
queueStatusAction.setQueue(queue);
re = server.sendEventGeneratingAction(queueStatusAction);
... | [
"void",
"updateQueue",
"(",
"String",
"queue",
")",
"throws",
"ManagerCommunicationException",
"{",
"ResponseEvents",
"re",
";",
"try",
"{",
"QueueStatusAction",
"queueStatusAction",
"=",
"new",
"QueueStatusAction",
"(",
")",
";",
"queueStatusAction",
".",
"setQueue",... | Method to ask for a Queue data update
@author Octavio Luna
@param queue
@throws ManagerCommunicationException | [
"Method",
"to",
"ask",
"for",
"a",
"Queue",
"data",
"update"
] | cdc9849270d97ef75afa447a02c5194ed29121eb | https://github.com/asterisk-java/asterisk-java/blob/cdc9849270d97ef75afa447a02c5194ed29121eb/src/main/java/org/asteriskjava/live/internal/QueueManager.java#L125-L169 |
55,386 | asterisk-java/asterisk-java | src/main/java/org/asteriskjava/live/internal/QueueManager.java | QueueManager.handleQueueParamsEvent | private void handleQueueParamsEvent(QueueParamsEvent event)
{
AsteriskQueueImpl queue;
final String name = event.getQueue();
final Integer max = event.getMax();
final String strategy = event.getStrategy();
final Integer serviceLevel = event.getServiceLevel();
final I... | java | private void handleQueueParamsEvent(QueueParamsEvent event)
{
AsteriskQueueImpl queue;
final String name = event.getQueue();
final Integer max = event.getMax();
final String strategy = event.getStrategy();
final Integer serviceLevel = event.getServiceLevel();
final I... | [
"private",
"void",
"handleQueueParamsEvent",
"(",
"QueueParamsEvent",
"event",
")",
"{",
"AsteriskQueueImpl",
"queue",
";",
"final",
"String",
"name",
"=",
"event",
".",
"getQueue",
"(",
")",
";",
"final",
"Integer",
"max",
"=",
"event",
".",
"getMax",
"(",
... | Called during initialization to populate the list of queues.
@param event the event received | [
"Called",
"during",
"initialization",
"to",
"populate",
"the",
"list",
"of",
"queues",
"."
] | cdc9849270d97ef75afa447a02c5194ed29121eb | https://github.com/asterisk-java/asterisk-java/blob/cdc9849270d97ef75afa447a02c5194ed29121eb/src/main/java/org/asteriskjava/live/internal/QueueManager.java#L246-L293 |
55,387 | asterisk-java/asterisk-java | src/main/java/org/asteriskjava/live/internal/QueueManager.java | QueueManager.handleQueueMemberEvent | private void handleQueueMemberEvent(QueueMemberEvent event)
{
final AsteriskQueueImpl queue = getInternalQueueByName(event.getQueue());
if (queue == null)
{
logger.error("Ignored QueueEntryEvent for unknown queue " + event.getQueue());
return;
}
Aster... | java | private void handleQueueMemberEvent(QueueMemberEvent event)
{
final AsteriskQueueImpl queue = getInternalQueueByName(event.getQueue());
if (queue == null)
{
logger.error("Ignored QueueEntryEvent for unknown queue " + event.getQueue());
return;
}
Aster... | [
"private",
"void",
"handleQueueMemberEvent",
"(",
"QueueMemberEvent",
"event",
")",
"{",
"final",
"AsteriskQueueImpl",
"queue",
"=",
"getInternalQueueByName",
"(",
"event",
".",
"getQueue",
"(",
")",
")",
";",
"if",
"(",
"queue",
"==",
"null",
")",
"{",
"logge... | Called during initialization to populate the members of the queues.
@param event the QueueMemberEvent received | [
"Called",
"during",
"initialization",
"to",
"populate",
"the",
"members",
"of",
"the",
"queues",
"."
] | cdc9849270d97ef75afa447a02c5194ed29121eb | https://github.com/asterisk-java/asterisk-java/blob/cdc9849270d97ef75afa447a02c5194ed29121eb/src/main/java/org/asteriskjava/live/internal/QueueManager.java#L300-L323 |
55,388 | asterisk-java/asterisk-java | src/main/java/org/asteriskjava/live/internal/QueueManager.java | QueueManager.handleJoinEvent | void handleJoinEvent(JoinEvent event)
{
final AsteriskQueueImpl queue = getInternalQueueByName(event.getQueue());
final AsteriskChannelImpl channel = channelManager.getChannelImplByName(event.getChannel());
if (queue == null)
{
logger.error("Ignored JoinEvent for unknown... | java | void handleJoinEvent(JoinEvent event)
{
final AsteriskQueueImpl queue = getInternalQueueByName(event.getQueue());
final AsteriskChannelImpl channel = channelManager.getChannelImplByName(event.getChannel());
if (queue == null)
{
logger.error("Ignored JoinEvent for unknown... | [
"void",
"handleJoinEvent",
"(",
"JoinEvent",
"event",
")",
"{",
"final",
"AsteriskQueueImpl",
"queue",
"=",
"getInternalQueueByName",
"(",
"event",
".",
"getQueue",
"(",
")",
")",
";",
"final",
"AsteriskChannelImpl",
"channel",
"=",
"channelManager",
".",
"getChan... | Called from AsteriskServerImpl whenever a new entry appears in a queue.
@param event the JoinEvent received | [
"Called",
"from",
"AsteriskServerImpl",
"whenever",
"a",
"new",
"entry",
"appears",
"in",
"a",
"queue",
"."
] | cdc9849270d97ef75afa447a02c5194ed29121eb | https://github.com/asterisk-java/asterisk-java/blob/cdc9849270d97ef75afa447a02c5194ed29121eb/src/main/java/org/asteriskjava/live/internal/QueueManager.java#L381-L413 |
55,389 | asterisk-java/asterisk-java | src/main/java/org/asteriskjava/live/internal/QueueManager.java | QueueManager.handleLeaveEvent | void handleLeaveEvent(LeaveEvent event)
{
final AsteriskQueueImpl queue = getInternalQueueByName(event.getQueue());
final AsteriskChannelImpl channel = channelManager.getChannelImplByName(event.getChannel());
if (queue == null)
{
logger.error("Ignored LeaveEvent for unkn... | java | void handleLeaveEvent(LeaveEvent event)
{
final AsteriskQueueImpl queue = getInternalQueueByName(event.getQueue());
final AsteriskChannelImpl channel = channelManager.getChannelImplByName(event.getChannel());
if (queue == null)
{
logger.error("Ignored LeaveEvent for unkn... | [
"void",
"handleLeaveEvent",
"(",
"LeaveEvent",
"event",
")",
"{",
"final",
"AsteriskQueueImpl",
"queue",
"=",
"getInternalQueueByName",
"(",
"event",
".",
"getQueue",
"(",
")",
")",
";",
"final",
"AsteriskChannelImpl",
"channel",
"=",
"channelManager",
".",
"getCh... | Called from AsteriskServerImpl whenever an enty leaves a queue.
@param event - the LeaveEvent received | [
"Called",
"from",
"AsteriskServerImpl",
"whenever",
"an",
"enty",
"leaves",
"a",
"queue",
"."
] | cdc9849270d97ef75afa447a02c5194ed29121eb | https://github.com/asterisk-java/asterisk-java/blob/cdc9849270d97ef75afa447a02c5194ed29121eb/src/main/java/org/asteriskjava/live/internal/QueueManager.java#L420-L445 |
55,390 | asterisk-java/asterisk-java | src/main/java/org/asteriskjava/live/internal/QueueManager.java | QueueManager.handleQueueMemberStatusEvent | void handleQueueMemberStatusEvent(QueueMemberStatusEvent event)
{
AsteriskQueueImpl queue = getInternalQueueByName(event.getQueue());
if (queue == null)
{
logger.error("Ignored QueueMemberStatusEvent for unknown queue " + event.getQueue());
return;
}
... | java | void handleQueueMemberStatusEvent(QueueMemberStatusEvent event)
{
AsteriskQueueImpl queue = getInternalQueueByName(event.getQueue());
if (queue == null)
{
logger.error("Ignored QueueMemberStatusEvent for unknown queue " + event.getQueue());
return;
}
... | [
"void",
"handleQueueMemberStatusEvent",
"(",
"QueueMemberStatusEvent",
"event",
")",
"{",
"AsteriskQueueImpl",
"queue",
"=",
"getInternalQueueByName",
"(",
"event",
".",
"getQueue",
"(",
")",
")",
";",
"if",
"(",
"queue",
"==",
"null",
")",
"{",
"logger",
".",
... | Challange a QueueMemberStatusEvent. Called from AsteriskServerImpl
whenever a member state changes.
@param event that was triggered by Asterisk server. | [
"Challange",
"a",
"QueueMemberStatusEvent",
".",
"Called",
"from",
"AsteriskServerImpl",
"whenever",
"a",
"member",
"state",
"changes",
"."
] | cdc9849270d97ef75afa447a02c5194ed29121eb | https://github.com/asterisk-java/asterisk-java/blob/cdc9849270d97ef75afa447a02c5194ed29121eb/src/main/java/org/asteriskjava/live/internal/QueueManager.java#L453-L472 |
55,391 | asterisk-java/asterisk-java | src/main/java/org/asteriskjava/live/internal/QueueManager.java | QueueManager.getQueueByName | AsteriskQueueImpl getQueueByName(String queueName)
{
refreshQueueIfForced(queueName);
AsteriskQueueImpl queue = getInternalQueueByName(queueName);
if (queue == null)
{
logger.error("Requested queue '" + queueName + "' not found!");
}
return queue;
} | java | AsteriskQueueImpl getQueueByName(String queueName)
{
refreshQueueIfForced(queueName);
AsteriskQueueImpl queue = getInternalQueueByName(queueName);
if (queue == null)
{
logger.error("Requested queue '" + queueName + "' not found!");
}
return queue;
} | [
"AsteriskQueueImpl",
"getQueueByName",
"(",
"String",
"queueName",
")",
"{",
"refreshQueueIfForced",
"(",
"queueName",
")",
";",
"AsteriskQueueImpl",
"queue",
"=",
"getInternalQueueByName",
"(",
"queueName",
")",
";",
"if",
"(",
"queue",
"==",
"null",
")",
"{",
... | Retrieves a queue by its name.
@param queueName name of the queue.
@return the requested queue or <code>null</code> if there is no queue
with the given name. | [
"Retrieves",
"a",
"queue",
"by",
"its",
"name",
"."
] | cdc9849270d97ef75afa447a02c5194ed29121eb | https://github.com/asterisk-java/asterisk-java/blob/cdc9849270d97ef75afa447a02c5194ed29121eb/src/main/java/org/asteriskjava/live/internal/QueueManager.java#L521-L532 |
55,392 | asterisk-java/asterisk-java | src/main/java/org/asteriskjava/live/internal/QueueManager.java | QueueManager.handleQueueMemberRemovedEvent | public void handleQueueMemberRemovedEvent(QueueMemberRemovedEvent event)
{
final AsteriskQueueImpl queue = getInternalQueueByName(event.getQueue());
if (queue == null)
{
logger.error("Ignored QueueMemberRemovedEvent for unknown queue " + event.getQueue());
return;
... | java | public void handleQueueMemberRemovedEvent(QueueMemberRemovedEvent event)
{
final AsteriskQueueImpl queue = getInternalQueueByName(event.getQueue());
if (queue == null)
{
logger.error("Ignored QueueMemberRemovedEvent for unknown queue " + event.getQueue());
return;
... | [
"public",
"void",
"handleQueueMemberRemovedEvent",
"(",
"QueueMemberRemovedEvent",
"event",
")",
"{",
"final",
"AsteriskQueueImpl",
"queue",
"=",
"getInternalQueueByName",
"(",
"event",
".",
"getQueue",
"(",
")",
")",
";",
"if",
"(",
"queue",
"==",
"null",
")",
... | Challange a QueueMemberRemovedEvent.
@param event - the generated QueueMemberRemovedEvent. | [
"Challange",
"a",
"QueueMemberRemovedEvent",
"."
] | cdc9849270d97ef75afa447a02c5194ed29121eb | https://github.com/asterisk-java/asterisk-java/blob/cdc9849270d97ef75afa447a02c5194ed29121eb/src/main/java/org/asteriskjava/live/internal/QueueManager.java#L592-L610 |
55,393 | asterisk-java/asterisk-java | src/main/java/org/asteriskjava/live/internal/AsteriskQueueImpl.java | AsteriskQueueImpl.fireNewEntry | void fireNewEntry(AsteriskQueueEntryImpl entry)
{
synchronized (listeners)
{
for (AsteriskQueueListener listener : listeners)
{
try
{
listener.onNewEntry(entry);
}
catch (Exception e)
... | java | void fireNewEntry(AsteriskQueueEntryImpl entry)
{
synchronized (listeners)
{
for (AsteriskQueueListener listener : listeners)
{
try
{
listener.onNewEntry(entry);
}
catch (Exception e)
... | [
"void",
"fireNewEntry",
"(",
"AsteriskQueueEntryImpl",
"entry",
")",
"{",
"synchronized",
"(",
"listeners",
")",
"{",
"for",
"(",
"AsteriskQueueListener",
"listener",
":",
"listeners",
")",
"{",
"try",
"{",
"listener",
".",
"onNewEntry",
"(",
"entry",
")",
";"... | Notifies all registered listener that an entry joins the queue.
@param entry that joins the queue | [
"Notifies",
"all",
"registered",
"listener",
"that",
"an",
"entry",
"joins",
"the",
"queue",
"."
] | cdc9849270d97ef75afa447a02c5194ed29121eb | https://github.com/asterisk-java/asterisk-java/blob/cdc9849270d97ef75afa447a02c5194ed29121eb/src/main/java/org/asteriskjava/live/internal/AsteriskQueueImpl.java#L485-L501 |
55,394 | asterisk-java/asterisk-java | src/main/java/org/asteriskjava/live/internal/AsteriskQueueImpl.java | AsteriskQueueImpl.fireEntryLeave | void fireEntryLeave(AsteriskQueueEntryImpl entry)
{
synchronized (listeners)
{
for (AsteriskQueueListener listener : listeners)
{
try
{
listener.onEntryLeave(entry);
}
catch (Exception e)
... | java | void fireEntryLeave(AsteriskQueueEntryImpl entry)
{
synchronized (listeners)
{
for (AsteriskQueueListener listener : listeners)
{
try
{
listener.onEntryLeave(entry);
}
catch (Exception e)
... | [
"void",
"fireEntryLeave",
"(",
"AsteriskQueueEntryImpl",
"entry",
")",
"{",
"synchronized",
"(",
"listeners",
")",
"{",
"for",
"(",
"AsteriskQueueListener",
"listener",
":",
"listeners",
")",
"{",
"try",
"{",
"listener",
".",
"onEntryLeave",
"(",
"entry",
")",
... | Notifies all registered listener that an entry leaves the queue.
@param entry that leaves the queue. | [
"Notifies",
"all",
"registered",
"listener",
"that",
"an",
"entry",
"leaves",
"the",
"queue",
"."
] | cdc9849270d97ef75afa447a02c5194ed29121eb | https://github.com/asterisk-java/asterisk-java/blob/cdc9849270d97ef75afa447a02c5194ed29121eb/src/main/java/org/asteriskjava/live/internal/AsteriskQueueImpl.java#L508-L524 |
55,395 | asterisk-java/asterisk-java | src/main/java/org/asteriskjava/live/internal/AsteriskQueueImpl.java | AsteriskQueueImpl.fireMemberAdded | void fireMemberAdded(AsteriskQueueMemberImpl member)
{
synchronized (listeners)
{
for (AsteriskQueueListener listener : listeners)
{
try
{
listener.onMemberAdded(member);
}
catch (Exception e)... | java | void fireMemberAdded(AsteriskQueueMemberImpl member)
{
synchronized (listeners)
{
for (AsteriskQueueListener listener : listeners)
{
try
{
listener.onMemberAdded(member);
}
catch (Exception e)... | [
"void",
"fireMemberAdded",
"(",
"AsteriskQueueMemberImpl",
"member",
")",
"{",
"synchronized",
"(",
"listeners",
")",
"{",
"for",
"(",
"AsteriskQueueListener",
"listener",
":",
"listeners",
")",
"{",
"try",
"{",
"listener",
".",
"onMemberAdded",
"(",
"member",
"... | Notifies all registered listener that a member has been added to the queue.
@param member added to the queue | [
"Notifies",
"all",
"registered",
"listener",
"that",
"a",
"member",
"has",
"been",
"added",
"to",
"the",
"queue",
"."
] | cdc9849270d97ef75afa447a02c5194ed29121eb | https://github.com/asterisk-java/asterisk-java/blob/cdc9849270d97ef75afa447a02c5194ed29121eb/src/main/java/org/asteriskjava/live/internal/AsteriskQueueImpl.java#L531-L547 |
55,396 | asterisk-java/asterisk-java | src/main/java/org/asteriskjava/live/internal/AsteriskQueueImpl.java | AsteriskQueueImpl.fireMemberRemoved | void fireMemberRemoved(AsteriskQueueMemberImpl member)
{
synchronized (listeners)
{
for (AsteriskQueueListener listener : listeners)
{
try
{
listener.onMemberRemoved(member);
}
catch (Exceptio... | java | void fireMemberRemoved(AsteriskQueueMemberImpl member)
{
synchronized (listeners)
{
for (AsteriskQueueListener listener : listeners)
{
try
{
listener.onMemberRemoved(member);
}
catch (Exceptio... | [
"void",
"fireMemberRemoved",
"(",
"AsteriskQueueMemberImpl",
"member",
")",
"{",
"synchronized",
"(",
"listeners",
")",
"{",
"for",
"(",
"AsteriskQueueListener",
"listener",
":",
"listeners",
")",
"{",
"try",
"{",
"listener",
".",
"onMemberRemoved",
"(",
"member",... | Notifies all registered listener that a member has been removed from the queue.
@param member that has been removed. | [
"Notifies",
"all",
"registered",
"listener",
"that",
"a",
"member",
"has",
"been",
"removed",
"from",
"the",
"queue",
"."
] | cdc9849270d97ef75afa447a02c5194ed29121eb | https://github.com/asterisk-java/asterisk-java/blob/cdc9849270d97ef75afa447a02c5194ed29121eb/src/main/java/org/asteriskjava/live/internal/AsteriskQueueImpl.java#L554-L570 |
55,397 | asterisk-java/asterisk-java | src/main/java/org/asteriskjava/live/internal/AsteriskQueueImpl.java | AsteriskQueueImpl.getMembers | public Collection<AsteriskQueueMember> getMembers()
{
List<AsteriskQueueMember> listOfMembers = new ArrayList<>(members.size());
synchronized (members)
{
listOfMembers.addAll(members.values());
}
return listOfMembers;
} | java | public Collection<AsteriskQueueMember> getMembers()
{
List<AsteriskQueueMember> listOfMembers = new ArrayList<>(members.size());
synchronized (members)
{
listOfMembers.addAll(members.values());
}
return listOfMembers;
} | [
"public",
"Collection",
"<",
"AsteriskQueueMember",
">",
"getMembers",
"(",
")",
"{",
"List",
"<",
"AsteriskQueueMember",
">",
"listOfMembers",
"=",
"new",
"ArrayList",
"<>",
"(",
"members",
".",
"size",
"(",
")",
")",
";",
"synchronized",
"(",
"members",
")... | Returns a collection of members of this queue.
@see org.asteriskjava.live.AsteriskQueue#getMembers() | [
"Returns",
"a",
"collection",
"of",
"members",
"of",
"this",
"queue",
"."
] | cdc9849270d97ef75afa447a02c5194ed29121eb | https://github.com/asterisk-java/asterisk-java/blob/cdc9849270d97ef75afa447a02c5194ed29121eb/src/main/java/org/asteriskjava/live/internal/AsteriskQueueImpl.java#L577-L585 |
55,398 | asterisk-java/asterisk-java | src/main/java/org/asteriskjava/live/internal/AsteriskQueueImpl.java | AsteriskQueueImpl.getMember | AsteriskQueueMemberImpl getMember(String location)
{
synchronized (members)
{
if (members.containsKey(location))
{
return members.get(location);
}
}
return null;
} | java | AsteriskQueueMemberImpl getMember(String location)
{
synchronized (members)
{
if (members.containsKey(location))
{
return members.get(location);
}
}
return null;
} | [
"AsteriskQueueMemberImpl",
"getMember",
"(",
"String",
"location",
")",
"{",
"synchronized",
"(",
"members",
")",
"{",
"if",
"(",
"members",
".",
"containsKey",
"(",
"location",
")",
")",
"{",
"return",
"members",
".",
"get",
"(",
"location",
")",
";",
"}"... | Returns a member by its location.
@param location ot the member
@return the member by its location. | [
"Returns",
"a",
"member",
"by",
"its",
"location",
"."
] | cdc9849270d97ef75afa447a02c5194ed29121eb | https://github.com/asterisk-java/asterisk-java/blob/cdc9849270d97ef75afa447a02c5194ed29121eb/src/main/java/org/asteriskjava/live/internal/AsteriskQueueImpl.java#L593-L603 |
55,399 | asterisk-java/asterisk-java | src/main/java/org/asteriskjava/live/internal/AsteriskQueueImpl.java | AsteriskQueueImpl.addMember | void addMember(AsteriskQueueMemberImpl member)
{
synchronized (members)
{
// Check if member already exists
if (members.containsValue(member))
{
return;
}
// If not, add the new member.
logger.info("Adding new me... | java | void addMember(AsteriskQueueMemberImpl member)
{
synchronized (members)
{
// Check if member already exists
if (members.containsValue(member))
{
return;
}
// If not, add the new member.
logger.info("Adding new me... | [
"void",
"addMember",
"(",
"AsteriskQueueMemberImpl",
"member",
")",
"{",
"synchronized",
"(",
"members",
")",
"{",
"// Check if member already exists",
"if",
"(",
"members",
".",
"containsValue",
"(",
"member",
")",
")",
"{",
"return",
";",
"}",
"// If not, add th... | Add a new member to this queue.
@param member to add | [
"Add",
"a",
"new",
"member",
"to",
"this",
"queue",
"."
] | cdc9849270d97ef75afa447a02c5194ed29121eb | https://github.com/asterisk-java/asterisk-java/blob/cdc9849270d97ef75afa447a02c5194ed29121eb/src/main/java/org/asteriskjava/live/internal/AsteriskQueueImpl.java#L610-L625 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.