mirror of
https://github.com/github/codeql.git
synced 2026-04-28 18:25:24 +02:00
Merge remote-tracking branch 'upstream/main' into JsonHijacking
This commit is contained in:
6
java/ql/test/stubs/akka-2.6.x/akka/util/ByteString.java
Normal file
6
java/ql/test/stubs/akka-2.6.x/akka/util/ByteString.java
Normal file
@@ -0,0 +1,6 @@
|
||||
package akka.util;
|
||||
|
||||
/** XML utilities. */
|
||||
public class ByteString {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package org.apache.commons.jexl2;
|
||||
|
||||
public class DebugInfo implements JexlInfo {
|
||||
|
||||
public DebugInfo(String tn, int l, int c) {}
|
||||
|
||||
public String debugString() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public DebugInfo debugInfo() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
package org.apache.commons.jexl2;
|
||||
|
||||
public interface Expression {
|
||||
Object evaluate(JexlContext var1);
|
||||
String getExpression();
|
||||
String dump();
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
package org.apache.commons.jexl2;
|
||||
|
||||
public interface JexlContext {
|
||||
Object get(String var1);
|
||||
void set(String var1, Object var2);
|
||||
boolean has(String var1);
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
package org.apache.commons.jexl2;
|
||||
|
||||
import java.util.Map;
|
||||
import org.apache.commons.jexl2.introspection.*;
|
||||
|
||||
public class JexlEngine {
|
||||
|
||||
public JexlEngine() {}
|
||||
|
||||
public JexlEngine(Uberspect uberspect, Object arithmetic, Map<String, Object> functions, Object log) {}
|
||||
|
||||
public Expression createExpression(String expression) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public Expression createExpression(String expression, JexlInfo info) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public Script createScript(String scriptText) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public Script createScript(String scriptText, JexlInfo info) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public Script createScript(String scriptText, String... names) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public Script createScript(String scriptText, JexlInfo info, String[] names) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public Object getProperty(Object bean, String expr) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public Object getProperty(JexlContext context, Object bean, String expr) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public void setProperty(Object bean, String expr, Object value) {}
|
||||
|
||||
public void setProperty(JexlContext context, Object bean, String expr, Object value) {}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
package org.apache.commons.jexl2;
|
||||
|
||||
public interface JexlInfo {
|
||||
String debugString();
|
||||
DebugInfo debugInfo();
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package org.apache.commons.jexl2;
|
||||
|
||||
public class MapContext implements JexlContext {
|
||||
|
||||
public Object get(String var1) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public void set(String var1, Object var2) {}
|
||||
|
||||
public boolean has(String var1) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package org.apache.commons.jexl2;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.Callable;
|
||||
|
||||
public interface Script {
|
||||
|
||||
Object execute(JexlContext var1);
|
||||
|
||||
Object execute(JexlContext var1, Object... var2);
|
||||
|
||||
String getText();
|
||||
|
||||
String[] getParameters();
|
||||
|
||||
String[] getLocalVariables();
|
||||
|
||||
Set<List<String>> getVariables();
|
||||
|
||||
Callable<Object> callable(JexlContext var1);
|
||||
|
||||
Callable<Object> callable(JexlContext var1, Object... var2);
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
package org.apache.commons.jexl2;
|
||||
|
||||
import java.io.Writer;
|
||||
import java.io.Reader;
|
||||
|
||||
public final class UnifiedJEXL {
|
||||
|
||||
public UnifiedJEXL(JexlEngine jexl) {}
|
||||
|
||||
public UnifiedJEXL.Expression parse(String expression) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public UnifiedJEXL.Template createTemplate(String prefix, Reader source, String... parms) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public UnifiedJEXL.Template createTemplate(String source, String... parms) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public UnifiedJEXL.Template createTemplate(String source) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public final class Template {
|
||||
|
||||
public UnifiedJEXL.Template prepare(JexlContext context) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public void evaluate(JexlContext context, Writer writer) {}
|
||||
|
||||
public void evaluate(JexlContext context, Writer writer, Object... args) {}
|
||||
}
|
||||
|
||||
public abstract class Expression {
|
||||
|
||||
public UnifiedJEXL.Expression prepare(JexlContext context) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public Object evaluate(JexlContext context) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
package org.apache.commons.jexl2.introspection;
|
||||
|
||||
public class Sandbox {
|
||||
|
||||
public Permissions white(String clazz) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static class Permissions {}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
package org.apache.commons.jexl2.introspection;
|
||||
|
||||
public class SandboxUberspectImpl implements Uberspect {
|
||||
|
||||
public SandboxUberspectImpl(Object log, Sandbox sandbox) {}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
package org.apache.commons.jexl2.introspection;
|
||||
|
||||
public interface Uberspect {}
|
||||
@@ -0,0 +1,18 @@
|
||||
package org.apache.commons.jexl3;
|
||||
|
||||
import org.apache.commons.jexl3.introspection.*;
|
||||
|
||||
public class JexlBuilder {
|
||||
|
||||
public JexlEngine create() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public JexlBuilder sandbox(JexlSandbox sandbox) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public JexlBuilder uberspect(JexlUberspect uberspect) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
package org.apache.commons.jexl3;
|
||||
|
||||
public interface JexlContext {}
|
||||
@@ -0,0 +1,40 @@
|
||||
package org.apache.commons.jexl3;
|
||||
|
||||
import org.apache.commons.jexl3.introspection.*;
|
||||
|
||||
public abstract class JexlEngine {
|
||||
|
||||
public JexlExpression createExpression(JexlInfo info, String expression) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public JexlExpression createExpression(String expression) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public JexlScript createScript(JexlInfo info, String source, String[] names) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public JexlScript createScript(String scriptText) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public JexlScript createScript(String scriptText, String... names) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public JxltEngine createJxltEngine() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public void setProperty(Object bean, String expr, Object value) {}
|
||||
|
||||
public Object getProperty(Object bean, String expr) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public JexlUberspect getUberspect() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
package org.apache.commons.jexl3;
|
||||
|
||||
import java.util.concurrent.Callable;
|
||||
|
||||
public interface JexlExpression {
|
||||
Object evaluate(JexlContext context);
|
||||
Callable<Object> callable(JexlContext context);
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
package org.apache.commons.jexl3;
|
||||
|
||||
public class JexlInfo {
|
||||
public JexlInfo(String source, int l, int c) {}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
package org.apache.commons.jexl3;
|
||||
|
||||
import java.util.concurrent.Callable;
|
||||
|
||||
public interface JexlScript {
|
||||
|
||||
Object execute(JexlContext context);
|
||||
Object execute(JexlContext context, Object... args);
|
||||
Callable<Object> callable(JexlContext context);
|
||||
Callable<Object> callable(JexlContext context, Object... args);
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
package org.apache.commons.jexl3;
|
||||
|
||||
import java.io.Writer;
|
||||
|
||||
public class JxltEngine {
|
||||
|
||||
public Expression createExpression(String expression) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public Template createTemplate(String source) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public interface Expression {
|
||||
Object evaluate(JexlContext context);
|
||||
Expression prepare(JexlContext context);
|
||||
}
|
||||
|
||||
public interface Template {
|
||||
void evaluate(JexlContext context, Writer writer);
|
||||
void evaluate(JexlContext context, Writer writer, Object... args);
|
||||
Template prepare(JexlContext context);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
package org.apache.commons.jexl3;
|
||||
|
||||
public class MapContext implements JexlContext {}
|
||||
@@ -0,0 +1,16 @@
|
||||
package org.apache.commons.jexl3.introspection;
|
||||
|
||||
public class JexlSandbox {
|
||||
|
||||
public JexlSandbox() {}
|
||||
|
||||
public JexlSandbox(boolean wb) {}
|
||||
|
||||
public JexlSandbox.Permissions white(String clazz) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static final class Permissions {
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package org.apache.commons.jexl3.introspection;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public interface JexlUberspect {}
|
||||
@@ -0,0 +1,221 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.apache.commons.lang3;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.Serializable;
|
||||
import java.lang.reflect.Array;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.lang.reflect.Method;
|
||||
import java.time.Duration;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.Comparator;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.TreeSet;
|
||||
import java.util.function.Supplier;
|
||||
|
||||
import org.apache.commons.lang3.text.StrBuilder;
|
||||
|
||||
@SuppressWarnings("deprecation") // deprecated class StrBuilder is imported
|
||||
// because it is part of the signature of deprecated methods
|
||||
public class ObjectUtils {
|
||||
public static class Null implements Serializable {
|
||||
}
|
||||
public static final Null NULL = new Null();
|
||||
|
||||
public static boolean allNotNull(final Object... values) {
|
||||
return false;
|
||||
}
|
||||
|
||||
public static boolean allNull(final Object... values) {
|
||||
return false;
|
||||
}
|
||||
|
||||
public static boolean anyNotNull(final Object... values) {
|
||||
return false;
|
||||
}
|
||||
|
||||
public static boolean anyNull(final Object... values) {
|
||||
return false;
|
||||
}
|
||||
|
||||
public static <T> T clone(final T obj) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static <T> T cloneIfPossible(final T obj) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static <T extends Comparable<? super T>> int compare(final T c1, final T c2) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
public static <T extends Comparable<? super T>> int compare(final T c1, final T c2, final boolean nullGreater) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
public static boolean CONST(final boolean v) {
|
||||
return false;
|
||||
}
|
||||
|
||||
public static byte CONST(final byte v) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
public static char CONST(final char v) {
|
||||
return '\0';
|
||||
}
|
||||
|
||||
public static double CONST(final double v) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
public static float CONST(final float v) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
public static int CONST(final int v) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
public static long CONST(final long v) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
public static short CONST(final short v) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
public static <T> T CONST(final T v) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static byte CONST_BYTE(final int v) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
public static short CONST_SHORT(final int v) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
public static <T> T defaultIfNull(final T object, final T defaultValue) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static boolean equals(final Object object1, final Object object2) {
|
||||
return false;
|
||||
}
|
||||
|
||||
public static <T> T firstNonNull(final T... values) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static <T> T getFirstNonNull(final Supplier<T>... suppliers) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static <T> T getIfNull(final T object, final Supplier<T> defaultSupplier) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static int hashCode(final Object obj) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
public static int hashCodeMulti(final Object... objects) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
public static void identityToString(final Appendable appendable, final Object object) throws IOException {
|
||||
}
|
||||
|
||||
public static String identityToString(final Object object) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static void identityToString(final StrBuilder builder, final Object object) {
|
||||
}
|
||||
|
||||
public static void identityToString(final StringBuffer buffer, final Object object) {
|
||||
}
|
||||
|
||||
public static void identityToString(final StringBuilder builder, final Object object) {
|
||||
}
|
||||
|
||||
public static boolean isEmpty(final Object object) {
|
||||
return false;
|
||||
}
|
||||
|
||||
public static boolean isNotEmpty(final Object object) {
|
||||
return false;
|
||||
}
|
||||
|
||||
public static <T extends Comparable<? super T>> T max(final T... values) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static <T> T median(final Comparator<T> comparator, final T... items) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static <T extends Comparable<? super T>> T median(final T... items) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static <T extends Comparable<? super T>> T min(final T... values) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static <T> T mode(final T... items) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static boolean notEqual(final Object object1, final Object object2) {
|
||||
return false;
|
||||
}
|
||||
|
||||
public static <T> T requireNonEmpty(final T obj) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static <T> T requireNonEmpty(final T obj, final String message) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static String toString(final Object obj) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static String toString(final Object obj, final String nullStr) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static String toString(final Object obj, final Supplier<String> supplier) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static void wait(final Object obj, final Duration duration) throws InterruptedException {
|
||||
}
|
||||
|
||||
public ObjectUtils() {
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.apache.commons.lang3;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
public class RandomUtils {
|
||||
public RandomUtils() {
|
||||
}
|
||||
|
||||
public static boolean nextBoolean() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public static byte[] nextBytes(final int count) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static int nextInt(final int startInclusive, final int endExclusive) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
public static int nextInt() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
public static long nextLong(final long startInclusive, final long endExclusive) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
public static long nextLong() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
public static double nextDouble(final double startInclusive, final double endExclusive) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
public static double nextDouble() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
public static float nextFloat(final float startInclusive, final float endExclusive) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
public static float nextFloat() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.apache.commons.lang3;
|
||||
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
public class RegExUtils {
|
||||
public static String removeAll(final String text, final Pattern regex) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static String removeAll(final String text, final String regex) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static String removeFirst(final String text, final Pattern regex) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static String removeFirst(final String text, final String regex) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static String removePattern(final String text, final String regex) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static String replaceAll(final String text, final Pattern regex, final String replacement) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static String replaceAll(final String text, final String regex, final String replacement) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static String replaceFirst(final String text, final Pattern regex, final String replacement) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static String replaceFirst(final String text, final String regex, final String replacement) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static String replacePattern(final String text, final String regex, final String replacement) {
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -960,4 +960,4 @@ public class StringUtils {
|
||||
public StringUtils() {
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.apache.commons.lang3.text;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
public abstract class StrLookup<V> {
|
||||
public static StrLookup<?> noneLookup() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static StrLookup<String> systemPropertiesLookup() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static <V> StrLookup<V> mapLookup(final Map<String, V> map) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public abstract String lookup(String key);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,227 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.apache.commons.lang3.text;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Enumeration;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Properties;
|
||||
|
||||
|
||||
public class StrSubstitutor {
|
||||
public static <V> String replace(final Object source, final Map<String, V> valueMap) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static <V> String replace(final Object source, final Map<String, V> valueMap, final String prefix, final String suffix) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static String replace(final Object source, final Properties valueProperties) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static String replaceSystemProperties(final Object source) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public StrSubstitutor() {
|
||||
}
|
||||
|
||||
public <V> StrSubstitutor(final Map<String, V> valueMap) {
|
||||
}
|
||||
|
||||
public <V> StrSubstitutor(final Map<String, V> valueMap, final String prefix, final String suffix) {
|
||||
}
|
||||
|
||||
public <V> StrSubstitutor(final Map<String, V> valueMap, final String prefix, final String suffix,
|
||||
final char escape) {
|
||||
}
|
||||
|
||||
public <V> StrSubstitutor(final Map<String, V> valueMap, final String prefix, final String suffix,
|
||||
final char escape, final String valueDelimiter) {
|
||||
}
|
||||
|
||||
public StrSubstitutor(final StrLookup<?> variableResolver) {
|
||||
}
|
||||
|
||||
public StrSubstitutor(final StrLookup<?> variableResolver, final String prefix, final String suffix,
|
||||
final char escape) {
|
||||
}
|
||||
|
||||
public StrSubstitutor(final StrLookup<?> variableResolver, final String prefix, final String suffix,
|
||||
final char escape, final String valueDelimiter) {
|
||||
}
|
||||
|
||||
public StrSubstitutor(
|
||||
final StrLookup<?> variableResolver, final StrMatcher prefixMatcher, final StrMatcher suffixMatcher,
|
||||
final char escape) {
|
||||
}
|
||||
|
||||
public StrSubstitutor(
|
||||
final StrLookup<?> variableResolver, final StrMatcher prefixMatcher, final StrMatcher suffixMatcher,
|
||||
final char escape, final StrMatcher valueDelimiterMatcher) {
|
||||
}
|
||||
|
||||
public String replace(final String source) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public String replace(final String source, final int offset, final int length) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public String replace(final char[] source) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public String replace(final char[] source, final int offset, final int length) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public String replace(final StringBuffer source) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public String replace(final StringBuffer source, final int offset, final int length) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public String replace(final CharSequence source) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public String replace(final CharSequence source, final int offset, final int length) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public String replace(final StrBuilder source) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public String replace(final StrBuilder source, final int offset, final int length) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public String replace(final Object source) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public boolean replaceIn(final StringBuffer source) {
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean replaceIn(final StringBuffer source, final int offset, final int length) {
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean replaceIn(final StringBuilder source) {
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean replaceIn(final StringBuilder source, final int offset, final int length) {
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean replaceIn(final StrBuilder source) {
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean replaceIn(final StrBuilder source, final int offset, final int length) {
|
||||
return false;
|
||||
}
|
||||
|
||||
public char getEscapeChar() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
public void setEscapeChar(final char escapeCharacter) {
|
||||
}
|
||||
|
||||
public StrMatcher getVariablePrefixMatcher() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public StrSubstitutor setVariablePrefixMatcher(final StrMatcher prefixMatcher) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public StrSubstitutor setVariablePrefix(final char prefix) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public StrSubstitutor setVariablePrefix(final String prefix) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public StrMatcher getVariableSuffixMatcher() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public StrSubstitutor setVariableSuffixMatcher(final StrMatcher suffixMatcher) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public StrSubstitutor setVariableSuffix(final char suffix) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public StrSubstitutor setVariableSuffix(final String suffix) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public StrMatcher getValueDelimiterMatcher() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public StrSubstitutor setValueDelimiterMatcher(final StrMatcher valueDelimiterMatcher) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public StrSubstitutor setValueDelimiter(final char valueDelimiter) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public StrSubstitutor setValueDelimiter(final String valueDelimiter) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public StrLookup<?> getVariableResolver() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public void setVariableResolver(final StrLookup<?> variableResolver) {
|
||||
}
|
||||
|
||||
public boolean isEnableSubstitutionInVariables() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public void setEnableSubstitutionInVariables(
|
||||
final boolean enableSubstitutionInVariables) {
|
||||
}
|
||||
|
||||
public boolean isPreserveEscapes() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public void setPreserveEscapes(final boolean preserveEscapes) {
|
||||
}
|
||||
|
||||
}
|
||||
@@ -17,6 +17,7 @@
|
||||
package org.apache.commons.lang3.text;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.ListIterator;
|
||||
|
||||
@@ -0,0 +1,79 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.apache.commons.lang3.text;
|
||||
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
|
||||
public class WordUtils {
|
||||
public WordUtils() {
|
||||
}
|
||||
|
||||
public static String wrap(final String str, final int wrapLength) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static String wrap(final String str, final int wrapLength, final String newLineStr, final boolean wrapLongWords) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static String wrap(final String str, int wrapLength, String newLineStr, final boolean wrapLongWords, String wrapOn) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static String capitalize(final String str) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static String capitalize(final String str, final char... delimiters) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static String capitalizeFully(final String str) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static String capitalizeFully(String str, final char... delimiters) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static String uncapitalize(final String str) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static String uncapitalize(final String str, final char... delimiters) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static String swapCase(final String str) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static String initials(final String str) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static String initials(final String str, final char... delimiters) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static boolean containsAllWords(final CharSequence word, final CharSequence... words) {
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -16,8 +16,12 @@
|
||||
*/
|
||||
package org.apache.commons.text;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.ListIterator;
|
||||
import java.util.NoSuchElementException;
|
||||
|
||||
|
||||
public class StrTokenizer implements ListIterator<String>, Cloneable {
|
||||
public static StrTokenizer getCSVInstance() {
|
||||
|
||||
@@ -0,0 +1,255 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.apache.commons.text;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Enumeration;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.Properties;
|
||||
|
||||
import org.apache.commons.text.lookup.StringLookup;
|
||||
import org.apache.commons.text.matcher.StringMatcher;
|
||||
|
||||
public class StringSubstitutor {
|
||||
public static StringSubstitutor createInterpolator() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static <V> String replace(final Object source, final Map<String, V> valueMap) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static <V> String replace(final Object source, final Map<String, V> valueMap, final String prefix,
|
||||
final String suffix) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static String replace(final Object source, final Properties valueProperties) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static String replaceSystemProperties(final Object source) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public StringSubstitutor() {
|
||||
}
|
||||
|
||||
public <V> StringSubstitutor(final Map<String, V> valueMap) {
|
||||
}
|
||||
|
||||
public <V> StringSubstitutor(final Map<String, V> valueMap, final String prefix, final String suffix) {
|
||||
}
|
||||
|
||||
public <V> StringSubstitutor(final Map<String, V> valueMap, final String prefix, final String suffix,
|
||||
final char escape) {
|
||||
}
|
||||
|
||||
public <V> StringSubstitutor(final Map<String, V> valueMap, final String prefix, final String suffix,
|
||||
final char escape, final String valueDelimiter) {
|
||||
}
|
||||
|
||||
public StringSubstitutor(final StringLookup variableResolver) {
|
||||
}
|
||||
|
||||
public StringSubstitutor(final StringLookup variableResolver, final String prefix, final String suffix,
|
||||
final char escape) {
|
||||
}
|
||||
|
||||
public StringSubstitutor(final StringLookup variableResolver, final String prefix, final String suffix,
|
||||
final char escape, final String valueDelimiter) {
|
||||
}
|
||||
|
||||
public StringSubstitutor(final StringLookup variableResolver, final StringMatcher prefixMatcher,
|
||||
final StringMatcher suffixMatcher, final char escape) {
|
||||
}
|
||||
|
||||
public StringSubstitutor(final StringLookup variableResolver, final StringMatcher prefixMatcher,
|
||||
final StringMatcher suffixMatcher, final char escape, final StringMatcher valueDelimiterMatcher) {
|
||||
}
|
||||
|
||||
public StringSubstitutor(final StringSubstitutor other) {
|
||||
}
|
||||
|
||||
public char getEscapeChar() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
public StringLookup getStringLookup() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public StringMatcher getValueDelimiterMatcher() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public StringMatcher getVariablePrefixMatcher() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public StringMatcher getVariableSuffixMatcher() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public boolean isDisableSubstitutionInValues() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean isEnableSubstitutionInVariables() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean isEnableUndefinedVariableException() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean isPreserveEscapes() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public String replace(final char[] source) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public String replace(final char[] source, final int offset, final int length) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public String replace(final CharSequence source) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public String replace(final CharSequence source, final int offset, final int length) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public String replace(final Object source) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public String replace(final String source) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public String replace(final String source, final int offset, final int length) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public String replace(final StringBuffer source) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public String replace(final StringBuffer source, final int offset, final int length) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public String replace(final TextStringBuilder source) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public String replace(final TextStringBuilder source, final int offset, final int length) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public boolean replaceIn(final StringBuffer source) {
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean replaceIn(final StringBuffer source, final int offset, final int length) {
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean replaceIn(final StringBuilder source) {
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean replaceIn(final StringBuilder source, final int offset, final int length) {
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean replaceIn(final TextStringBuilder source) {
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean replaceIn(final TextStringBuilder source, final int offset, final int length) {
|
||||
return false;
|
||||
}
|
||||
|
||||
public StringSubstitutor setDisableSubstitutionInValues(final boolean disableSubstitutionInValues) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public StringSubstitutor setEnableSubstitutionInVariables(final boolean enableSubstitutionInVariables) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public StringSubstitutor setEnableUndefinedVariableException(final boolean failOnUndefinedVariable) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public StringSubstitutor setEscapeChar(final char escapeCharacter) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public StringSubstitutor setPreserveEscapes(final boolean preserveEscapes) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public StringSubstitutor setValueDelimiter(final char valueDelimiter) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public StringSubstitutor setValueDelimiter(final String valueDelimiter) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public StringSubstitutor setValueDelimiterMatcher(final StringMatcher valueDelimiterMatcher) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public StringSubstitutor setVariablePrefix(final char prefix) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public StringSubstitutor setVariablePrefix(final String prefix) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public StringSubstitutor setVariablePrefixMatcher(final StringMatcher prefixMatcher) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public StringSubstitutor setVariableResolver(final StringLookup variableResolver) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public StringSubstitutor setVariableSuffix(final char suffix) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public StringSubstitutor setVariableSuffix(final String suffix) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public StringSubstitutor setVariableSuffixMatcher(final StringMatcher suffixMatcher) {
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,98 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.apache.commons.text;
|
||||
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
|
||||
public class WordUtils {
|
||||
public WordUtils() {
|
||||
}
|
||||
|
||||
public static String wrap(final String str, final int wrapLength) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static String wrap(final String str,
|
||||
final int wrapLength,
|
||||
final String newLineStr,
|
||||
final boolean wrapLongWords) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static String wrap(final String str,
|
||||
int wrapLength,
|
||||
String newLineStr,
|
||||
final boolean wrapLongWords,
|
||||
String wrapOn) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static String capitalize(final String str) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static String capitalize(final String str, final char... delimiters) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static String capitalizeFully(final String str) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static String capitalizeFully(String str, final char... delimiters) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static String uncapitalize(final String str) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static String uncapitalize(final String str, final char... delimiters) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static String swapCase(final String str) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static String initials(final String str) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static String initials(final String str, final char... delimiters) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static boolean containsAllWords(final CharSequence word, final CharSequence... words) {
|
||||
return false;
|
||||
}
|
||||
|
||||
public static boolean isDelimiter(final char ch, final char[] delimiters) {
|
||||
return false;
|
||||
}
|
||||
|
||||
public static boolean isDelimiter(final int codePoint, final char[] delimiters) {
|
||||
return false;
|
||||
}
|
||||
|
||||
public static String abbreviate(final String str, int lower, int upper, final String appendToEnd) {
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache license, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the license for the specific language governing permissions and
|
||||
* limitations under the license.
|
||||
*/
|
||||
|
||||
package org.apache.commons.text.lookup;
|
||||
|
||||
import java.util.function.BiFunction;
|
||||
import java.util.function.Function;
|
||||
|
||||
public interface BiStringLookup<U> extends StringLookup {
|
||||
default String lookup(final String key, final U object) {
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache license, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the license for the specific language governing permissions and
|
||||
* limitations under the license.
|
||||
*/
|
||||
|
||||
package org.apache.commons.text.lookup;
|
||||
|
||||
/**
|
||||
* Lookups a String key for a String value.
|
||||
* <p>
|
||||
* This class represents the simplest form of a string to string map. It has a benefit over a map in that it can create
|
||||
* the result on demand based on the key.
|
||||
* </p>
|
||||
* <p>
|
||||
* For example, it would be possible to implement a lookup that used the key as a primary key, and looked up the value
|
||||
* on demand from the database.
|
||||
* </p>
|
||||
*
|
||||
* @since 1.3
|
||||
*/
|
||||
@FunctionalInterface
|
||||
public interface StringLookup {
|
||||
String lookup(String key);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,143 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache license, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the license for the specific language governing permissions and
|
||||
* limitations under the license.
|
||||
*/
|
||||
|
||||
package org.apache.commons.text.lookup;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.function.BiFunction;
|
||||
import java.util.function.Function;
|
||||
|
||||
|
||||
public final class StringLookupFactory {
|
||||
public static final StringLookupFactory INSTANCE = new StringLookupFactory();
|
||||
|
||||
public static void clear() {
|
||||
}
|
||||
|
||||
public void addDefaultStringLookups(final Map<String, StringLookup> stringLookupMap) {
|
||||
}
|
||||
|
||||
public StringLookup base64DecoderStringLookup() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public StringLookup base64EncoderStringLookup() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public StringLookup base64StringLookup() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public <R, U> BiStringLookup<U> biFunctionStringLookup(final BiFunction<String, U, R> biFunction) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public StringLookup constantStringLookup() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public StringLookup dateStringLookup() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public StringLookup dnsStringLookup() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public StringLookup environmentVariableStringLookup() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public StringLookup fileStringLookup() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public <R> StringLookup functionStringLookup(final Function<String, R> function) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public StringLookup interpolatorStringLookup() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public StringLookup interpolatorStringLookup(final Map<String, StringLookup> stringLookupMap,
|
||||
final StringLookup defaultStringLookup, final boolean addDefaultLookups) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public <V> StringLookup interpolatorStringLookup(final Map<String, V> map) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public StringLookup interpolatorStringLookup(final StringLookup defaultStringLookup) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public StringLookup javaPlatformStringLookup() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public StringLookup localHostStringLookup() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public <V> StringLookup mapStringLookup(final Map<String, V> map) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public StringLookup nullStringLookup() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public StringLookup propertiesStringLookup() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public StringLookup resourceBundleStringLookup() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public StringLookup resourceBundleStringLookup(final String bundleName) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public StringLookup scriptStringLookup() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public StringLookup systemPropertyStringLookup() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public StringLookup urlDecoderStringLookup() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public StringLookup urlEncoderStringLookup() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public StringLookup urlStringLookup() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public StringLookup xmlStringLookup() {
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,8 +1,4 @@
|
||||
/*
|
||||
* $HeadURL: http://svn.apache.org/repos/asf/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/Header.java $
|
||||
* $Revision: 569636 $
|
||||
* $Date: 2007-08-25 00:34:47 -0700 (Sat, 25 Aug 2007) $
|
||||
*
|
||||
* ====================================================================
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
@@ -33,38 +29,25 @@ package org.apache.http;
|
||||
|
||||
/**
|
||||
* Represents an HTTP header field.
|
||||
*
|
||||
* <p>
|
||||
* The HTTP header fields follow the same generic format as that given in
|
||||
* Section 3.1 of RFC 822. Each header field consists of a name followed by a
|
||||
* colon (":") and the field value. Field names are case-insensitive. The field
|
||||
* value MAY be preceded by any amount of LWS, though a single SP is preferred.
|
||||
*
|
||||
* <pre>
|
||||
* <p>The HTTP header fields follow the same generic format as
|
||||
* that given in Section 3.1 of RFC 822. Each header field consists
|
||||
* of a name followed by a colon (":") and the field value. Field names
|
||||
* are case-insensitive. The field value MAY be preceded by any amount
|
||||
* of LWS, though a single SP is preferred.
|
||||
*
|
||||
*<pre>
|
||||
* message-header = field-name ":" [ field-value ]
|
||||
* field-name = token
|
||||
* field-value = *( field-content | LWS )
|
||||
* field-content = <the OCTETs making up the field-value
|
||||
* and consisting of either *TEXT or combinations
|
||||
* of token, separators, and quoted-string>
|
||||
* </pre>
|
||||
*
|
||||
* @author <a href="mailto:remm@apache.org">Remy Maucherat</a>
|
||||
* @author <a href="mailto:oleg at ural.ru">Oleg Kalnichevski</a>
|
||||
* @version $Revision: 569636 $
|
||||
*</pre>
|
||||
*
|
||||
* @deprecated Please use {@link java.net.URL#openConnection} instead. Please
|
||||
* visit <a href=
|
||||
* "http://android-developers.blogspot.com/2011/09/androids-http-clients.html">this
|
||||
* webpage</a> for further details.
|
||||
* @since 4.0
|
||||
*/
|
||||
@Deprecated
|
||||
public interface Header {
|
||||
|
||||
String getName();
|
||||
|
||||
String getValue();
|
||||
|
||||
public interface Header extends NameValuePair {
|
||||
HeaderElement[] getElements() throws ParseException;
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,55 @@
|
||||
/*
|
||||
* ====================================================================
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
* ====================================================================
|
||||
*
|
||||
* This software consists of voluntary contributions made by many
|
||||
* individuals on behalf of the Apache Software Foundation. For more
|
||||
* information on the Apache Software Foundation, please see
|
||||
* <http://www.apache.org/>.
|
||||
*
|
||||
*/
|
||||
|
||||
package org.apache.http;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
public interface HttpResponse extends HttpMessage {
|
||||
// StatusLine getStatusLine();
|
||||
|
||||
// void setStatusLine(StatusLine statusline);
|
||||
|
||||
// void setStatusLine(ProtocolVersion ver, int code);
|
||||
|
||||
// void setStatusLine(ProtocolVersion ver, int code, String reason);
|
||||
|
||||
void setStatusCode(int code)
|
||||
throws IllegalStateException;
|
||||
|
||||
void setReasonPhrase(String reason)
|
||||
throws IllegalStateException;
|
||||
|
||||
HttpEntity getEntity();
|
||||
|
||||
void setEntity(HttpEntity entity);
|
||||
|
||||
Locale getLocale();
|
||||
|
||||
void setLocale(Locale loc);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,74 @@
|
||||
/*
|
||||
* ====================================================================
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
* ====================================================================
|
||||
*
|
||||
* This software consists of voluntary contributions made by many
|
||||
* individuals on behalf of the Apache Software Foundation. For more
|
||||
* information on the Apache Software Foundation, please see
|
||||
* <http://www.apache.org/>.
|
||||
*
|
||||
*/
|
||||
|
||||
package org.apache.http.entity;
|
||||
|
||||
import java.io.IOException;
|
||||
import org.apache.http.HttpEntity;
|
||||
import org.apache.http.Header;
|
||||
|
||||
public abstract class AbstractHttpEntity implements HttpEntity {
|
||||
@Override
|
||||
public Header getContentType() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Header getContentEncoding() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isChunked() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public void setContentType(final Header contentType) {
|
||||
}
|
||||
|
||||
public void setContentType(final String ctString) {
|
||||
}
|
||||
|
||||
public void setContentEncoding(final Header contentEncoding) {
|
||||
}
|
||||
|
||||
public void setContentEncoding(final String ceString) {
|
||||
}
|
||||
|
||||
public void setChunked(final boolean b) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void consumeContent() throws IOException {
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,78 @@
|
||||
/*
|
||||
* ====================================================================
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
* ====================================================================
|
||||
*
|
||||
* This software consists of voluntary contributions made by many
|
||||
* individuals on behalf of the Apache Software Foundation. For more
|
||||
* information on the Apache Software Foundation, please see
|
||||
* <http://www.apache.org/>.
|
||||
*
|
||||
*/
|
||||
|
||||
package org.apache.http.entity;
|
||||
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
|
||||
|
||||
public class ByteArrayEntity extends AbstractHttpEntity implements Cloneable {
|
||||
public ByteArrayEntity(final byte[] b, final ContentType contentType) {
|
||||
}
|
||||
|
||||
public ByteArrayEntity(final byte[] b, final int off, final int len, final ContentType contentType) {
|
||||
}
|
||||
|
||||
public ByteArrayEntity(final byte[] b) {
|
||||
}
|
||||
|
||||
public ByteArrayEntity(final byte[] b, final int off, final int len) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isRepeatable() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getContentLength() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public InputStream getContent() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeTo(final OutputStream outStream) throws IOException {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isStreaming() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object clone() throws CloneNotSupportedException {
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
/*
|
||||
* ====================================================================
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
* ====================================================================
|
||||
*
|
||||
* This software consists of voluntary contributions made by many
|
||||
* individuals on behalf of the Apache Software Foundation. For more
|
||||
* information on the Apache Software Foundation, please see
|
||||
* <http://www.apache.org/>.
|
||||
*
|
||||
*/
|
||||
|
||||
package org.apache.http.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
|
||||
public final class ContentType implements Serializable {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,87 @@
|
||||
/*
|
||||
* ====================================================================
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
* ====================================================================
|
||||
*
|
||||
* This software consists of voluntary contributions made by many
|
||||
* individuals on behalf of the Apache Software Foundation. For more
|
||||
* information on the Apache Software Foundation, please see
|
||||
* <http://www.apache.org/>.
|
||||
*
|
||||
*/
|
||||
|
||||
package org.apache.http.entity;
|
||||
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.nio.charset.Charset;
|
||||
import java.nio.charset.UnsupportedCharsetException;
|
||||
|
||||
|
||||
public class StringEntity extends AbstractHttpEntity implements Cloneable {
|
||||
public StringEntity(final String string, final ContentType contentType) throws UnsupportedCharsetException {
|
||||
}
|
||||
|
||||
public StringEntity(
|
||||
final String string, final String mimeType, final String charset) throws UnsupportedEncodingException {
|
||||
}
|
||||
|
||||
public StringEntity(final String string, final String charset)
|
||||
throws UnsupportedCharsetException {
|
||||
}
|
||||
|
||||
public StringEntity(final String string, final Charset charset) {
|
||||
}
|
||||
|
||||
public StringEntity(final String string)
|
||||
throws UnsupportedEncodingException {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isRepeatable() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getContentLength() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public InputStream getContent() throws IOException {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeTo(final OutputStream outStream) throws IOException {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isStreaming() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object clone() throws CloneNotSupportedException {
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
/*
|
||||
* ====================================================================
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
* ====================================================================
|
||||
*
|
||||
* This software consists of voluntary contributions made by many
|
||||
* individuals on behalf of the Apache Software Foundation. For more
|
||||
* information on the Apache Software Foundation, please see
|
||||
* <http://www.apache.org/>.
|
||||
*
|
||||
*/
|
||||
|
||||
package org.apache.http.message;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import org.apache.http.Header;
|
||||
import org.apache.http.HeaderElement;
|
||||
import org.apache.http.ParseException;
|
||||
|
||||
public class BasicHeader implements Header, Cloneable, Serializable {
|
||||
public BasicHeader(final String name, final String value) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object clone() throws CloneNotSupportedException {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public HeaderElement[] getElements() throws ParseException {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getValue() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
/*
|
||||
* ====================================================================
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
* ====================================================================
|
||||
*
|
||||
* This software consists of voluntary contributions made by many
|
||||
* individuals on behalf of the Apache Software Foundation. For more
|
||||
* information on the Apache Software Foundation, please see
|
||||
* <http://www.apache.org/>.
|
||||
*
|
||||
*/
|
||||
|
||||
package org.apache.http.protocol;
|
||||
|
||||
public interface HttpContext {
|
||||
Object getAttribute(String id);
|
||||
|
||||
void setAttribute(String id, Object obj);
|
||||
|
||||
Object removeAttribute(String id);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
/*
|
||||
* ====================================================================
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
* ====================================================================
|
||||
*
|
||||
* This software consists of voluntary contributions made by many
|
||||
* individuals on behalf of the Apache Software Foundation. For more
|
||||
* information on the Apache Software Foundation, please see
|
||||
* <http://www.apache.org/>.
|
||||
*
|
||||
*/
|
||||
|
||||
package org.apache.http.protocol;
|
||||
|
||||
import java.io.IOException;
|
||||
import org.apache.http.HttpRequest;
|
||||
import org.apache.http.HttpResponse;
|
||||
|
||||
public interface HttpRequestHandler {
|
||||
void handle(HttpRequest request, HttpResponse response, HttpContext context)
|
||||
throws IOException;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,78 @@
|
||||
/*
|
||||
* ====================================================================
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
* ====================================================================
|
||||
*
|
||||
* This software consists of voluntary contributions made by many
|
||||
* individuals on behalf of the Apache Software Foundation. For more
|
||||
* information on the Apache Software Foundation, please see
|
||||
* <http://www.apache.org/>.
|
||||
*
|
||||
*/
|
||||
|
||||
package org.apache.http.util;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
public class Args {
|
||||
public static void check(final boolean expression, final String message) {
|
||||
}
|
||||
|
||||
public static void check(final boolean expression, final String message, final Object... args) {
|
||||
}
|
||||
|
||||
public static void check(final boolean expression, final String message, final Object arg) {
|
||||
}
|
||||
|
||||
public static <T> T notNull(final T argument, final String name) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static <T extends CharSequence> T notEmpty(final T argument, final String name) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static <T extends CharSequence> T notBlank(final T argument, final String name) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static <T extends CharSequence> T containsNoBlanks(final T argument, final String name) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static <E, T extends Collection<E>> T notEmpty(final T argument, final String name) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static int positive(final int n, final String name) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
public static long positive(final long n, final String name) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
public static int notNegative(final int n, final String name) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
public static long notNegative(final long n, final String name) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,93 @@
|
||||
/*
|
||||
* ====================================================================
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
* ====================================================================
|
||||
*
|
||||
* This software consists of voluntary contributions made by many
|
||||
* individuals on behalf of the Apache Software Foundation. For more
|
||||
* information on the Apache Software Foundation, please see
|
||||
* <http://www.apache.org/>.
|
||||
*
|
||||
*/
|
||||
|
||||
package org.apache.http.util;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
public final class ByteArrayBuffer implements Serializable {
|
||||
public ByteArrayBuffer(final int capacity) {
|
||||
}
|
||||
|
||||
public void append(final byte[] b, final int off, final int len) {
|
||||
}
|
||||
|
||||
public void append(final int b) {
|
||||
}
|
||||
|
||||
public void append(final char[] b, final int off, final int len) {
|
||||
}
|
||||
|
||||
public void append(final CharArrayBuffer b, final int off, final int len) {
|
||||
}
|
||||
|
||||
public void clear() {
|
||||
}
|
||||
|
||||
public byte[] toByteArray() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public int byteAt(final int i) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
public int capacity() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
public int length() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
public void ensureCapacity(final int required) {
|
||||
}
|
||||
|
||||
public byte[] buffer() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public void setLength(final int len) {
|
||||
}
|
||||
|
||||
public boolean isEmpty() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean isFull() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public int indexOf(final byte b, final int from, final int to) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
public int indexOf(final byte b) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,127 @@
|
||||
/*
|
||||
* ====================================================================
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
* ====================================================================
|
||||
*
|
||||
* This software consists of voluntary contributions made by many
|
||||
* individuals on behalf of the Apache Software Foundation. For more
|
||||
* information on the Apache Software Foundation, please see
|
||||
* <http://www.apache.org/>.
|
||||
*
|
||||
*/
|
||||
|
||||
package org.apache.http.util;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.nio.CharBuffer;
|
||||
|
||||
|
||||
public final class CharArrayBuffer implements CharSequence, Serializable {
|
||||
public CharArrayBuffer(final int capacity) {
|
||||
}
|
||||
|
||||
public void append(final char[] b, final int off, final int len) {
|
||||
}
|
||||
|
||||
public void append(final String str) {
|
||||
}
|
||||
|
||||
public void append(final CharArrayBuffer b, final int off, final int len) {
|
||||
}
|
||||
|
||||
public void append(final CharArrayBuffer b) {
|
||||
}
|
||||
|
||||
public void append(final char ch) {
|
||||
}
|
||||
|
||||
public void append(final byte[] b, final int off, final int len) {
|
||||
}
|
||||
|
||||
public void append(final ByteArrayBuffer b, final int off, final int len) {
|
||||
}
|
||||
|
||||
public void append(final Object obj) {
|
||||
}
|
||||
|
||||
public void clear() {
|
||||
}
|
||||
|
||||
public char[] toCharArray() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public char charAt(final int i) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
public char[] buffer() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public int capacity() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int length() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
public void ensureCapacity(final int required) {
|
||||
}
|
||||
|
||||
public void setLength(final int len) {
|
||||
}
|
||||
|
||||
public boolean isEmpty() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean isFull() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public int indexOf(final int ch, final int from, final int to) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
public int indexOf(final int ch) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
public String substring(final int beginIndex, final int endIndex) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public String substringTrimmed(final int beginIndex, final int endIndex) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CharSequence subSequence(final int beginIndex, final int endIndex) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
/*
|
||||
* ====================================================================
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
* ====================================================================
|
||||
*
|
||||
* This software consists of voluntary contributions made by many
|
||||
* individuals on behalf of the Apache Software Foundation. For more
|
||||
* information on the Apache Software Foundation, please see
|
||||
* <http://www.apache.org/>.
|
||||
*
|
||||
*/
|
||||
|
||||
package org.apache.http.util;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.nio.charset.Charset;
|
||||
import org.apache.http.*;
|
||||
|
||||
|
||||
public final class EntityUtils {
|
||||
public static void consumeQuietly(final HttpEntity entity) {
|
||||
}
|
||||
|
||||
public static void consume(final HttpEntity entity) throws IOException {
|
||||
}
|
||||
|
||||
public static void updateEntity(
|
||||
final HttpResponse response, final HttpEntity entity) throws IOException {
|
||||
}
|
||||
|
||||
public static byte[] toByteArray(final HttpEntity entity) throws IOException {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static String getContentCharSet(final HttpEntity entity) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static String getContentMimeType(final HttpEntity entity) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static String toString(
|
||||
final HttpEntity entity, final Charset defaultCharset) throws IOException {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static String toString(
|
||||
final HttpEntity entity, final String defaultCharset) throws IOException {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static String toString(final HttpEntity entity) throws IOException, ParseException {
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
/*
|
||||
* ====================================================================
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
* ====================================================================
|
||||
*
|
||||
* This software consists of voluntary contributions made by many
|
||||
* individuals on behalf of the Apache Software Foundation. For more
|
||||
* information on the Apache Software Foundation, please see
|
||||
* <http://www.apache.org/>.
|
||||
*
|
||||
*/
|
||||
|
||||
package org.apache.hc.core5.function;
|
||||
|
||||
public interface Supplier<T> {
|
||||
T get();
|
||||
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
/*
|
||||
* ====================================================================
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
* ====================================================================
|
||||
*
|
||||
* This software consists of voluntary contributions made by many
|
||||
* individuals on behalf of the Apache Software Foundation. For more
|
||||
* information on the Apache Software Foundation, please see
|
||||
* <http://www.apache.org/>.
|
||||
*
|
||||
*/
|
||||
|
||||
package org.apache.hc.core5.http;
|
||||
|
||||
/**
|
||||
* 'Classic' {@link HttpRequest} message that can enclose {@link HttpEntity}.
|
||||
*
|
||||
* @since 5.0
|
||||
*/
|
||||
public interface ClassicHttpRequest extends HttpRequest, HttpEntityContainer {
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
/*
|
||||
* ====================================================================
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
* ====================================================================
|
||||
*
|
||||
* This software consists of voluntary contributions made by many
|
||||
* individuals on behalf of the Apache Software Foundation. For more
|
||||
* information on the Apache Software Foundation, please see
|
||||
* <http://www.apache.org/>.
|
||||
*
|
||||
*/
|
||||
|
||||
package org.apache.hc.core5.http;
|
||||
|
||||
import java.io.Closeable;
|
||||
|
||||
public interface ClassicHttpResponse extends HttpResponse, HttpEntityContainer, Closeable {
|
||||
}
|
||||
@@ -0,0 +1,159 @@
|
||||
/*
|
||||
* ====================================================================
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
* ====================================================================
|
||||
*
|
||||
* This software consists of voluntary contributions made by many
|
||||
* individuals on behalf of the Apache Software Foundation. For more
|
||||
* information on the Apache Software Foundation, please see
|
||||
* <http://www.apache.org/>.
|
||||
*
|
||||
*/
|
||||
|
||||
package org.apache.hc.core5.http;
|
||||
import java.io.Serializable;
|
||||
import java.nio.charset.Charset;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.nio.charset.UnsupportedCharsetException;
|
||||
|
||||
public final class ContentType implements Serializable {
|
||||
public static final ContentType APPLICATION_ATOM_XML = null;
|
||||
|
||||
public static final ContentType APPLICATION_FORM_URLENCODED = null;
|
||||
|
||||
public static final ContentType APPLICATION_JSON = null;
|
||||
|
||||
public static final ContentType APPLICATION_NDJSON = null;
|
||||
|
||||
public static final ContentType APPLICATION_OCTET_STREAM = null;
|
||||
|
||||
public static final ContentType APPLICATION_PDF = null;
|
||||
|
||||
public static final ContentType APPLICATION_SOAP_XML = null;
|
||||
|
||||
public static final ContentType APPLICATION_SVG_XML = null;
|
||||
|
||||
public static final ContentType APPLICATION_XHTML_XML = null;
|
||||
|
||||
public static final ContentType APPLICATION_XML = null;
|
||||
|
||||
public static final ContentType APPLICATION_PROBLEM_JSON = null;
|
||||
|
||||
public static final ContentType APPLICATION_PROBLEM_XML = null;
|
||||
|
||||
public static final ContentType APPLICATION_RSS_XML = null;
|
||||
|
||||
public static final ContentType IMAGE_BMP = null;
|
||||
|
||||
public static final ContentType IMAGE_GIF = null;
|
||||
|
||||
public static final ContentType IMAGE_JPEG = null;
|
||||
|
||||
public static final ContentType IMAGE_PNG = null;
|
||||
|
||||
public static final ContentType IMAGE_SVG = null;
|
||||
|
||||
public static final ContentType IMAGE_TIFF = null;
|
||||
|
||||
public static final ContentType IMAGE_WEBP = null;
|
||||
|
||||
public static final ContentType MULTIPART_FORM_DATA = null;
|
||||
|
||||
public static final ContentType MULTIPART_MIXED = null;
|
||||
|
||||
public static final ContentType MULTIPART_RELATED = null;
|
||||
|
||||
public static final ContentType TEXT_HTML = null;
|
||||
|
||||
public static final ContentType TEXT_MARKDOWN = null;
|
||||
|
||||
public static final ContentType TEXT_PLAIN = null;
|
||||
|
||||
public static final ContentType TEXT_XML = null;
|
||||
|
||||
public static final ContentType TEXT_EVENT_STREAM = null;
|
||||
|
||||
public static final ContentType WILDCARD = null;
|
||||
|
||||
private static final NameValuePair[] EMPTY_NAME_VALUE_PAIR_ARRAY = new NameValuePair[0];
|
||||
|
||||
public String getMimeType() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public Charset getCharset() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public String getParameter(final String name) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static ContentType create(final String mimeType, final Charset charset) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static ContentType create(final String mimeType) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static ContentType create(
|
||||
final String mimeType, final String charset) throws UnsupportedCharsetException {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static ContentType create(
|
||||
final String mimeType, final NameValuePair... params) throws UnsupportedCharsetException {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static ContentType parse(final CharSequence s) throws UnsupportedCharsetException {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static ContentType parseLenient(final CharSequence s) throws UnsupportedCharsetException {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static ContentType getByMimeType(final String mimeType) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public ContentType withCharset(final Charset charset) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public ContentType withCharset(final String charset) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public ContentType withParameters(
|
||||
final NameValuePair... params) throws UnsupportedCharsetException {
|
||||
return null;
|
||||
}
|
||||
|
||||
public boolean isSameMimeType(final ContentType contentType) {
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
/*
|
||||
* ====================================================================
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
* ====================================================================
|
||||
*
|
||||
* This software consists of voluntary contributions made by many
|
||||
* individuals on behalf of the Apache Software Foundation. For more
|
||||
* information on the Apache Software Foundation, please see
|
||||
* <http://www.apache.org/>.
|
||||
*
|
||||
*/
|
||||
|
||||
package org.apache.hc.core5.http;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
public interface EntityDetails {
|
||||
long getContentLength();
|
||||
|
||||
String getContentType();
|
||||
|
||||
String getContentEncoding();
|
||||
|
||||
boolean isChunked();
|
||||
|
||||
Set<String> getTrailerNames();
|
||||
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
/*
|
||||
* ====================================================================
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
* ====================================================================
|
||||
*
|
||||
* This software consists of voluntary contributions made by many
|
||||
* individuals on behalf of the Apache Software Foundation. For more
|
||||
* information on the Apache Software Foundation, please see
|
||||
* <http://www.apache.org/>.
|
||||
*
|
||||
*/
|
||||
|
||||
package org.apache.hc.core5.http;
|
||||
|
||||
/**
|
||||
* Represents an HTTP header field consisting of a field name and a field
|
||||
* value.
|
||||
*
|
||||
* @since 4.0
|
||||
*/
|
||||
public interface Header extends NameValuePair {
|
||||
boolean isSensitive();
|
||||
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
/*
|
||||
* ====================================================================
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
* ====================================================================
|
||||
*
|
||||
* This software consists of voluntary contributions made by many
|
||||
* individuals on behalf of the Apache Software Foundation. For more
|
||||
* information on the Apache Software Foundation, please see
|
||||
* <http://www.apache.org/>.
|
||||
*
|
||||
*/
|
||||
|
||||
package org.apache.hc.core5.http;
|
||||
|
||||
import java.io.Closeable;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.hc.core5.function.Supplier;
|
||||
|
||||
public interface HttpEntity extends EntityDetails, Closeable {
|
||||
boolean isRepeatable();
|
||||
|
||||
InputStream getContent() throws IOException, UnsupportedOperationException;
|
||||
|
||||
void writeTo(OutputStream outStream) throws IOException;
|
||||
|
||||
boolean isStreaming();
|
||||
Supplier<List<? extends Header>> getTrailers();
|
||||
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
/*
|
||||
* ====================================================================
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
* ====================================================================
|
||||
*
|
||||
* This software consists of voluntary contributions made by many
|
||||
* individuals on behalf of the Apache Software Foundation. For more
|
||||
* information on the Apache Software Foundation, please see
|
||||
* <http://www.apache.org/>.
|
||||
*
|
||||
*/
|
||||
|
||||
package org.apache.hc.core5.http;
|
||||
|
||||
/**
|
||||
* Contains an {@link HttpEntity}.
|
||||
*
|
||||
* @since 5.0
|
||||
*/
|
||||
public interface HttpEntityContainer {
|
||||
HttpEntity getEntity();
|
||||
|
||||
void setEntity(HttpEntity entity);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
/*
|
||||
* ====================================================================
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
* ====================================================================
|
||||
*
|
||||
* This software consists of voluntary contributions made by many
|
||||
* individuals on behalf of the Apache Software Foundation. For more
|
||||
* information on the Apache Software Foundation, please see
|
||||
* <http://www.apache.org/>.
|
||||
*
|
||||
*/
|
||||
|
||||
package org.apache.hc.core5.http;
|
||||
|
||||
/**
|
||||
* Signals that an HTTP exception has occurred.
|
||||
*
|
||||
* @since 4.0
|
||||
*/
|
||||
public class HttpException extends Exception {
|
||||
public HttpException() {
|
||||
}
|
||||
|
||||
public HttpException(final String message) {
|
||||
}
|
||||
|
||||
public HttpException(final String format, final Object... args) {
|
||||
}
|
||||
|
||||
public HttpException(final String message, final Throwable cause) {
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
/*
|
||||
* ====================================================================
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
* ====================================================================
|
||||
*
|
||||
* This software consists of voluntary contributions made by many
|
||||
* individuals on behalf of the Apache Software Foundation. For more
|
||||
* information on the Apache Software Foundation, please see
|
||||
* <http://www.apache.org/>.
|
||||
*
|
||||
*/
|
||||
|
||||
package org.apache.hc.core5.http;
|
||||
|
||||
/**
|
||||
* HTTP messages consist of requests from client to server and responses
|
||||
* from server to client.
|
||||
*
|
||||
* @since 4.0
|
||||
*/
|
||||
public interface HttpMessage extends MessageHeaders {
|
||||
void setVersion(ProtocolVersion version);
|
||||
|
||||
ProtocolVersion getVersion();
|
||||
|
||||
void addHeader(Header header);
|
||||
|
||||
void addHeader(String name, Object value);
|
||||
|
||||
void setHeader(Header header);
|
||||
|
||||
void setHeader(String name, Object value);
|
||||
|
||||
void setHeaders(Header... headers);
|
||||
|
||||
boolean removeHeader(Header header);
|
||||
|
||||
boolean removeHeaders(String name);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
/*
|
||||
* ====================================================================
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
* ====================================================================
|
||||
*
|
||||
* This software consists of voluntary contributions made by many
|
||||
* individuals on behalf of the Apache Software Foundation. For more
|
||||
* information on the Apache Software Foundation, please see
|
||||
* <http://www.apache.org/>.
|
||||
*
|
||||
*/
|
||||
|
||||
package org.apache.hc.core5.http;
|
||||
|
||||
import java.net.URI;
|
||||
import java.net.URISyntaxException;
|
||||
|
||||
import org.apache.hc.core5.net.URIAuthority;
|
||||
|
||||
public interface HttpRequest extends HttpMessage {
|
||||
String getMethod();
|
||||
|
||||
String getPath();
|
||||
|
||||
void setPath(String path);
|
||||
|
||||
String getScheme();
|
||||
|
||||
void setScheme(String scheme);
|
||||
|
||||
URIAuthority getAuthority();
|
||||
|
||||
void setAuthority(URIAuthority authority);
|
||||
|
||||
String getRequestUri();
|
||||
|
||||
URI getUri() throws URISyntaxException;
|
||||
|
||||
void setUri(final URI requestUri);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
/*
|
||||
* ====================================================================
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
* ====================================================================
|
||||
*
|
||||
* This software consists of voluntary contributions made by many
|
||||
* individuals on behalf of the Apache Software Foundation. For more
|
||||
* information on the Apache Software Foundation, please see
|
||||
* <http://www.apache.org/>.
|
||||
*
|
||||
*/
|
||||
|
||||
package org.apache.hc.core5.http;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
public interface HttpResponse extends HttpMessage {
|
||||
int getCode();
|
||||
|
||||
void setCode(int code);
|
||||
|
||||
String getReasonPhrase();
|
||||
|
||||
void setReasonPhrase(String reason);
|
||||
|
||||
Locale getLocale();
|
||||
|
||||
void setLocale(Locale loc);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
* ====================================================================
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
* ====================================================================
|
||||
*
|
||||
* This software consists of voluntary contributions made by many
|
||||
* individuals on behalf of the Apache Software Foundation. For more
|
||||
* information on the Apache Software Foundation, please see
|
||||
* <http://www.apache.org/>.
|
||||
*
|
||||
*/
|
||||
|
||||
package org.apache.hc.core5.http;
|
||||
|
||||
import java.util.Iterator;
|
||||
|
||||
public interface MessageHeaders {
|
||||
boolean containsHeader(String name);
|
||||
|
||||
int countHeaders(String name);
|
||||
|
||||
Header getFirstHeader(String name);
|
||||
|
||||
Header getHeader(String name) throws ProtocolException;
|
||||
|
||||
Header[] getHeaders();
|
||||
|
||||
Header[] getHeaders(String name);
|
||||
|
||||
Header getLastHeader(String name);
|
||||
|
||||
Iterator<Header> headerIterator();
|
||||
|
||||
Iterator<Header> headerIterator(String name);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
/*
|
||||
* ====================================================================
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
* ====================================================================
|
||||
*
|
||||
* This software consists of voluntary contributions made by many
|
||||
* individuals on behalf of the Apache Software Foundation. For more
|
||||
* information on the Apache Software Foundation, please see
|
||||
* <http://www.apache.org/>.
|
||||
*
|
||||
*/
|
||||
|
||||
package org.apache.hc.core5.http;
|
||||
|
||||
/**
|
||||
* A name-value pair parameter used as an element of HTTP messages.
|
||||
*
|
||||
* @since 4.0
|
||||
*/
|
||||
public interface NameValuePair {
|
||||
String getName();
|
||||
|
||||
String getValue();
|
||||
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
/*
|
||||
* ====================================================================
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
* ====================================================================
|
||||
*
|
||||
* This software consists of voluntary contributions made by many
|
||||
* individuals on behalf of the Apache Software Foundation. For more
|
||||
* information on the Apache Software Foundation, please see
|
||||
* <http://www.apache.org/>.
|
||||
*
|
||||
*/
|
||||
|
||||
package org.apache.hc.core5.http;
|
||||
|
||||
/**
|
||||
* Signals a protocol exception due to failure to parse a message element.
|
||||
*
|
||||
* @since 4.0
|
||||
*/
|
||||
public class ParseException extends ProtocolException {
|
||||
public ParseException() {
|
||||
}
|
||||
|
||||
public ParseException(final String message) {
|
||||
}
|
||||
|
||||
public ParseException(final String description, final CharSequence text, final int off, final int len, final int errorOffset) {
|
||||
}
|
||||
|
||||
public ParseException(final String description, final CharSequence text, final int off, final int len) {
|
||||
}
|
||||
|
||||
public int getErrorOffset() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
/*
|
||||
* ====================================================================
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
* ====================================================================
|
||||
*
|
||||
* This software consists of voluntary contributions made by many
|
||||
* individuals on behalf of the Apache Software Foundation. For more
|
||||
* information on the Apache Software Foundation, please see
|
||||
* <http://www.apache.org/>.
|
||||
*
|
||||
*/
|
||||
|
||||
package org.apache.hc.core5.http;
|
||||
|
||||
/**
|
||||
* Signals that an HTTP protocol violation has occurred.
|
||||
* For example a malformed status line or headers, a missing message body, etc.
|
||||
*
|
||||
* @since 4.0
|
||||
*/
|
||||
public class ProtocolException extends HttpException {
|
||||
public ProtocolException() {
|
||||
}
|
||||
|
||||
public ProtocolException(final String message) {
|
||||
}
|
||||
|
||||
public ProtocolException(final String format, final Object... args) {
|
||||
}
|
||||
|
||||
public ProtocolException(final String message, final Throwable cause) {
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,87 @@
|
||||
/*
|
||||
* ====================================================================
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
* ====================================================================
|
||||
*
|
||||
* This software consists of voluntary contributions made by many
|
||||
* individuals on behalf of the Apache Software Foundation. For more
|
||||
* information on the Apache Software Foundation, please see
|
||||
* <http://www.apache.org/>.
|
||||
*
|
||||
*/
|
||||
|
||||
package org.apache.hc.core5.http;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
public class ProtocolVersion implements Serializable {
|
||||
public ProtocolVersion(final String protocol, final int major, final int minor) {
|
||||
}
|
||||
|
||||
public final String getProtocol() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public final int getMajor() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
public final int getMinor() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final int hashCode() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
public final boolean equals(final int major, final int minor) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final boolean equals(final Object obj) {
|
||||
return false;
|
||||
}
|
||||
|
||||
public String format() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public boolean isComparable(final ProtocolVersion that) {
|
||||
return false;
|
||||
}
|
||||
|
||||
public int compareToVersion(final ProtocolVersion that) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
public final boolean greaterEquals(final ProtocolVersion version) {
|
||||
return false;
|
||||
}
|
||||
|
||||
public final boolean lessEquals(final ProtocolVersion version) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
/*
|
||||
* ====================================================================
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
* ====================================================================
|
||||
*
|
||||
* This software consists of voluntary contributions made by many
|
||||
* individuals on behalf of the Apache Software Foundation. For more
|
||||
* information on the Apache Software Foundation, please see
|
||||
* <http://www.apache.org/>.
|
||||
*
|
||||
*/
|
||||
|
||||
package org.apache.hc.core5.http.io;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import org.apache.hc.core5.http.ClassicHttpRequest;
|
||||
import org.apache.hc.core5.http.ClassicHttpResponse;
|
||||
import org.apache.hc.core5.http.HttpException;
|
||||
import org.apache.hc.core5.http.protocol.HttpContext;
|
||||
|
||||
public interface HttpRequestHandler {
|
||||
void handle(ClassicHttpRequest request, ClassicHttpResponse response, HttpContext context)
|
||||
throws HttpException, IOException;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
/*
|
||||
* ====================================================================
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
* ====================================================================
|
||||
*
|
||||
* This software consists of voluntary contributions made by many
|
||||
* individuals on behalf of the Apache Software Foundation. For more
|
||||
* information on the Apache Software Foundation, please see
|
||||
* <http://www.apache.org/>.
|
||||
*
|
||||
*/
|
||||
package org.apache.hc.core5.http.io;
|
||||
import java.io.IOException;
|
||||
import org.apache.hc.core5.http.ClassicHttpRequest;
|
||||
import org.apache.hc.core5.http.ClassicHttpResponse;
|
||||
import org.apache.hc.core5.http.HttpException;
|
||||
import org.apache.hc.core5.http.protocol.HttpContext;
|
||||
|
||||
public interface HttpServerRequestHandler {
|
||||
interface ResponseTrigger {
|
||||
void sendInformation(ClassicHttpResponse response) throws HttpException, IOException;
|
||||
|
||||
void submitResponse(ClassicHttpResponse response) throws HttpException, IOException;
|
||||
|
||||
}
|
||||
void handle(
|
||||
ClassicHttpRequest request,
|
||||
ResponseTrigger responseTrigger,
|
||||
HttpContext context) throws HttpException, IOException;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,86 @@
|
||||
/*
|
||||
* ====================================================================
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
* ====================================================================
|
||||
*
|
||||
* This software consists of voluntary contributions made by many
|
||||
* individuals on behalf of the Apache Software Foundation. For more
|
||||
* information on the Apache Software Foundation, please see
|
||||
* <http://www.apache.org/>.
|
||||
*
|
||||
*/
|
||||
|
||||
package org.apache.hc.core5.http.io.entity;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import org.apache.hc.core5.function.Supplier;
|
||||
import org.apache.hc.core5.http.ContentType;
|
||||
import org.apache.hc.core5.http.Header;
|
||||
import org.apache.hc.core5.http.HttpEntity;
|
||||
import org.apache.hc.core5.util.Args;
|
||||
|
||||
public abstract class AbstractHttpEntity implements HttpEntity {
|
||||
public static void writeTo(final HttpEntity entity, final OutputStream outStream) throws IOException {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeTo(final OutputStream outStream) throws IOException {
|
||||
}
|
||||
|
||||
@Override
|
||||
public final String getContentType() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final String getContentEncoding() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final boolean isChunked() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isRepeatable() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Supplier<List<? extends Header>> getTrailers() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Set<String> getTrailerNames() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,92 @@
|
||||
/*
|
||||
* ====================================================================
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
* ====================================================================
|
||||
*
|
||||
* This software consists of voluntary contributions made by many
|
||||
* individuals on behalf of the Apache Software Foundation. For more
|
||||
* information on the Apache Software Foundation, please see
|
||||
* <http://www.apache.org/>.
|
||||
*
|
||||
*/
|
||||
|
||||
package org.apache.hc.core5.http.io.entity;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
import org.apache.hc.core5.http.ContentType;
|
||||
|
||||
public class ByteArrayEntity extends AbstractHttpEntity {
|
||||
public ByteArrayEntity(
|
||||
final byte[] b, final int off, final int len, final ContentType contentType, final String contentEncoding,
|
||||
final boolean chunked) {
|
||||
}
|
||||
|
||||
public ByteArrayEntity(
|
||||
final byte[] b, final int off, final int len, final ContentType contentType, final String contentEncoding) {
|
||||
}
|
||||
|
||||
public ByteArrayEntity(
|
||||
final byte[] b, final ContentType contentType, final String contentEncoding, final boolean chunked) {
|
||||
}
|
||||
|
||||
public ByteArrayEntity(final byte[] b, final ContentType contentType, final String contentEncoding) {
|
||||
}
|
||||
|
||||
public ByteArrayEntity(final byte[] b, final ContentType contentType, final boolean chunked) {
|
||||
}
|
||||
|
||||
public ByteArrayEntity(final byte[] b, final ContentType contentType) {
|
||||
}
|
||||
|
||||
public ByteArrayEntity(
|
||||
final byte[] b, final int off, final int len, final ContentType contentType, final boolean chunked) {
|
||||
}
|
||||
|
||||
public ByteArrayEntity(final byte[] b, final int off, final int len, final ContentType contentType) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public final boolean isRepeatable() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final long getContentLength() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final InputStream getContent() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final void writeTo(final OutputStream outStream) throws IOException {
|
||||
}
|
||||
|
||||
@Override
|
||||
public final boolean isStreaming() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final void close() throws IOException {
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
/*
|
||||
* ====================================================================
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
* ====================================================================
|
||||
*
|
||||
* This software consists of voluntary contributions made by many
|
||||
* individuals on behalf of the Apache Software Foundation. For more
|
||||
* information on the Apache Software Foundation, please see
|
||||
* <http://www.apache.org/>.
|
||||
*
|
||||
*/
|
||||
|
||||
package org.apache.hc.core5.http.io.entity;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.nio.ByteBuffer;
|
||||
import org.apache.hc.core5.http.ContentType;
|
||||
|
||||
public class ByteBufferEntity extends AbstractHttpEntity {
|
||||
public ByteBufferEntity(final ByteBuffer buffer, final ContentType contentType, final String contentEncoding) {
|
||||
}
|
||||
|
||||
public ByteBufferEntity(final ByteBuffer buffer, final ContentType contentType) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public final boolean isRepeatable() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final long getContentLength() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final InputStream getContent() throws IOException, UnsupportedOperationException {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final boolean isStreaming() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final void close() throws IOException {
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,89 @@
|
||||
/*
|
||||
* ====================================================================
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
* ====================================================================
|
||||
*
|
||||
* This software consists of voluntary contributions made by many
|
||||
* individuals on behalf of the Apache Software Foundation. For more
|
||||
* information on the Apache Software Foundation, please see
|
||||
* <http://www.apache.org/>.
|
||||
*
|
||||
*/
|
||||
|
||||
package org.apache.hc.core5.http.io.entity;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.nio.charset.Charset;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.hc.core5.http.HttpEntity;
|
||||
import org.apache.hc.core5.http.NameValuePair;
|
||||
import org.apache.hc.core5.http.ParseException;
|
||||
|
||||
public final class EntityUtils {
|
||||
public static void consumeQuietly(final HttpEntity entity) {
|
||||
}
|
||||
|
||||
public static void consume(final HttpEntity entity) throws IOException {
|
||||
}
|
||||
|
||||
public static byte[] toByteArray(final HttpEntity entity) throws IOException {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static byte[] toByteArray(final HttpEntity entity, final int maxResultLength) throws IOException {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static String toString(
|
||||
final HttpEntity entity, final Charset defaultCharset) throws IOException, ParseException {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static String toString(
|
||||
final HttpEntity entity, final Charset defaultCharset, final int maxResultLength) throws IOException, ParseException {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static String toString(
|
||||
final HttpEntity entity, final String defaultCharset) throws IOException, ParseException {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static String toString(
|
||||
final HttpEntity entity, final String defaultCharset, final int maxResultLength) throws IOException, ParseException {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static String toString(final HttpEntity entity) throws IOException, ParseException {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static String toString(final HttpEntity entity, final int maxResultLength) throws IOException, ParseException {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static List<NameValuePair> parse(final HttpEntity entity) throws IOException {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static List<NameValuePair> parse(final HttpEntity entity, final int maxStreamLength) throws IOException {
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,152 @@
|
||||
/*
|
||||
* ====================================================================
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
* ====================================================================
|
||||
*
|
||||
* This software consists of voluntary contributions made by many
|
||||
* individuals on behalf of the Apache Software Foundation. For more
|
||||
* information on the Apache Software Foundation, please see
|
||||
* <http://www.apache.org/>.
|
||||
*
|
||||
*/
|
||||
|
||||
package org.apache.hc.core5.http.io.entity;
|
||||
import java.io.File;
|
||||
import java.io.OutputStream;
|
||||
import java.io.Serializable;
|
||||
import java.nio.charset.Charset;
|
||||
import java.nio.file.Path;
|
||||
import org.apache.hc.core5.http.ContentType;
|
||||
import org.apache.hc.core5.http.Header;
|
||||
import org.apache.hc.core5.http.HttpEntity;
|
||||
import org.apache.hc.core5.http.NameValuePair;
|
||||
import org.apache.hc.core5.io.IOCallback;
|
||||
|
||||
public final class HttpEntities {
|
||||
public static HttpEntity create(final String content, final ContentType contentType) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static HttpEntity create(final String content, final Charset charset) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static HttpEntity create(final String content) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static HttpEntity create(final byte[] content, final ContentType contentType) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static HttpEntity create(final File content, final ContentType contentType) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static HttpEntity create(final Serializable serializable, final ContentType contentType) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static HttpEntity createUrlEncoded(
|
||||
final Iterable <? extends NameValuePair> parameters, final Charset charset) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static HttpEntity create(final IOCallback<OutputStream> callback, final ContentType contentType) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static HttpEntity gzip(final HttpEntity entity) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static HttpEntity createGzipped(final String content, final ContentType contentType) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static HttpEntity createGzipped(final String content, final Charset charset) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static HttpEntity createGzipped(final String content) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static HttpEntity createGzipped(final byte[] content, final ContentType contentType) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static HttpEntity createGzipped(final File content, final ContentType contentType) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static HttpEntity createGzipped(final Serializable serializable, final ContentType contentType) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static HttpEntity createGzipped(final IOCallback<OutputStream> callback, final ContentType contentType) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static HttpEntity createGzipped(final Path content, final ContentType contentType) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static HttpEntity withTrailers(final HttpEntity entity, final Header... trailers) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static HttpEntity create(final String content, final ContentType contentType, final Header... trailers) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static HttpEntity create(final String content, final Charset charset, final Header... trailers) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static HttpEntity create(final String content, final Header... trailers) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static HttpEntity create(final byte[] content, final ContentType contentType, final Header... trailers) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static HttpEntity create(final File content, final ContentType contentType, final Header... trailers) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static HttpEntity create(
|
||||
final Serializable serializable, final ContentType contentType, final Header... trailers) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static HttpEntity create(
|
||||
final IOCallback<OutputStream> callback, final ContentType contentType, final Header... trailers) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static HttpEntity create(final Path content, final ContentType contentType) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static HttpEntity create(final Path content, final ContentType contentType, final Header... trailers) {
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,83 @@
|
||||
/*
|
||||
* ====================================================================
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
* ====================================================================
|
||||
*
|
||||
* This software consists of voluntary contributions made by many
|
||||
* individuals on behalf of the Apache Software Foundation. For more
|
||||
* information on the Apache Software Foundation, please see
|
||||
* <http://www.apache.org/>.
|
||||
*
|
||||
*/
|
||||
|
||||
package org.apache.hc.core5.http.io.entity;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.nio.charset.Charset;
|
||||
import org.apache.hc.core5.http.ContentType;
|
||||
|
||||
public class StringEntity extends AbstractHttpEntity {
|
||||
public StringEntity(
|
||||
final String string, final ContentType contentType, final String contentEncoding, final boolean chunked) {
|
||||
}
|
||||
|
||||
public StringEntity(final String string, final ContentType contentType, final boolean chunked) {
|
||||
}
|
||||
|
||||
public StringEntity(final String string, final ContentType contentType) {
|
||||
}
|
||||
|
||||
public StringEntity(final String string, final Charset charset) {
|
||||
}
|
||||
|
||||
public StringEntity(final String string, final Charset charset, final boolean chunked) {
|
||||
}
|
||||
|
||||
public StringEntity(final String string) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public final boolean isRepeatable() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final long getContentLength() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final InputStream getContent() throws IOException {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final void writeTo(final OutputStream outStream) throws IOException {
|
||||
}
|
||||
|
||||
@Override
|
||||
public final boolean isStreaming() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final void close() throws IOException {
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
/*
|
||||
* ====================================================================
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
* ====================================================================
|
||||
*
|
||||
* This software consists of voluntary contributions made by many
|
||||
* individuals on behalf of the Apache Software Foundation. For more
|
||||
* information on the Apache Software Foundation, please see
|
||||
* <http://www.apache.org/>.
|
||||
*
|
||||
*/
|
||||
|
||||
package org.apache.hc.core5.http.message;
|
||||
import java.io.Serializable;
|
||||
import org.apache.hc.core5.http.Header;
|
||||
|
||||
public class BasicHeader implements Header, Cloneable, Serializable {
|
||||
public BasicHeader(final String name, final Object value) {
|
||||
}
|
||||
|
||||
public BasicHeader(final String name, final Object value, final boolean sensitive) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getValue() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isSensitive() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
/*
|
||||
* ====================================================================
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
* ====================================================================
|
||||
*
|
||||
* This software consists of voluntary contributions made by many
|
||||
* individuals on behalf of the Apache Software Foundation. For more
|
||||
* information on the Apache Software Foundation, please see
|
||||
* <http://www.apache.org/>.
|
||||
*
|
||||
*/
|
||||
|
||||
package org.apache.hc.core5.http.message;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import org.apache.hc.core5.http.HttpRequest;
|
||||
import org.apache.hc.core5.http.ProtocolVersion;
|
||||
|
||||
public final class RequestLine implements Serializable {
|
||||
public RequestLine(final HttpRequest request) {
|
||||
}
|
||||
|
||||
public RequestLine(final String method,
|
||||
final String uri,
|
||||
final ProtocolVersion version) {
|
||||
}
|
||||
|
||||
public String getMethod() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public ProtocolVersion getProtocolVersion() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public String getUri() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
/*
|
||||
* ====================================================================
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
* ====================================================================
|
||||
*
|
||||
* This software consists of voluntary contributions made by many
|
||||
* individuals on behalf of the Apache Software Foundation. For more
|
||||
* information on the Apache Software Foundation, please see
|
||||
* <http://www.apache.org/>.
|
||||
*
|
||||
*/
|
||||
|
||||
package org.apache.hc.core5.http.protocol;
|
||||
import org.apache.hc.core5.http.ProtocolVersion;
|
||||
|
||||
public interface HttpContext {
|
||||
ProtocolVersion getProtocolVersion();
|
||||
|
||||
void setProtocolVersion(ProtocolVersion version);
|
||||
|
||||
Object getAttribute(String id);
|
||||
|
||||
Object setAttribute(String id, Object obj);
|
||||
|
||||
Object removeAttribute(String id);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
/*
|
||||
* ====================================================================
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
* ====================================================================
|
||||
*
|
||||
* This software consists of voluntary contributions made by many
|
||||
* individuals on behalf of the Apache Software Foundation. For more
|
||||
* information on the Apache Software Foundation, please see
|
||||
* <http://www.apache.org/>.
|
||||
*
|
||||
*/
|
||||
|
||||
package org.apache.hc.core5.io;
|
||||
import java.io.IOException;
|
||||
|
||||
public interface IOCallback<T> {
|
||||
void execute(T object) throws IOException;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
/*
|
||||
* ====================================================================
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
* ====================================================================
|
||||
*
|
||||
* This software consists of voluntary contributions made by many
|
||||
* individuals on behalf of the Apache Software Foundation. For more
|
||||
* information on the Apache Software Foundation, please see
|
||||
* <http://www.apache.org/>.
|
||||
*
|
||||
*/
|
||||
|
||||
package org.apache.hc.core5.net;
|
||||
|
||||
public final class URIAuthority {
|
||||
public String getUserInfo() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public String getHostName() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public int getPort() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public boolean equals(final Object obj) {
|
||||
return false;
|
||||
}
|
||||
|
||||
public int hashCode() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,93 @@
|
||||
/*
|
||||
* ====================================================================
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
* ====================================================================
|
||||
*
|
||||
* This software consists of voluntary contributions made by many
|
||||
* individuals on behalf of the Apache Software Foundation. For more
|
||||
* information on the Apache Software Foundation, please see
|
||||
* <http://www.apache.org/>.
|
||||
*
|
||||
*/
|
||||
|
||||
package org.apache.hc.core5.util;
|
||||
|
||||
import org.apache.hc.core5.http.EntityDetails;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
public class Args {
|
||||
public static void check(final boolean expression, final String message) {
|
||||
}
|
||||
|
||||
public static void check(final boolean expression, final String message, final Object... args) {
|
||||
}
|
||||
|
||||
public static void check(final boolean expression, final String message, final Object arg) {
|
||||
}
|
||||
|
||||
public static long checkContentLength(final EntityDetails entityDetails) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
public static int checkRange(final int value, final int lowInclusive, final int highInclusive,
|
||||
final String message) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
public static long checkRange(final long value, final long lowInclusive, final long highInclusive,
|
||||
final String message) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
public static <T extends CharSequence> T containsNoBlanks(final T argument, final String name) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static <T extends CharSequence> T notBlank(final T argument, final String name) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static <T extends CharSequence> T notEmpty(final T argument, final String name) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static <E, T extends Collection<E>> T notEmpty(final T argument, final String name) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static int notNegative(final int n, final String name) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
public static long notNegative(final long n, final String name) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
public static <T> T notNull(final T argument, final String name) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static int positive(final int n, final String name) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
public static long positive(final long n, final String name) {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,97 @@
|
||||
/*
|
||||
* ====================================================================
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
* ====================================================================
|
||||
*
|
||||
* This software consists of voluntary contributions made by many
|
||||
* individuals on behalf of the Apache Software Foundation. For more
|
||||
* information on the Apache Software Foundation, please see
|
||||
* <http://www.apache.org/>.
|
||||
*
|
||||
*/
|
||||
|
||||
package org.apache.hc.core5.util;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.nio.ByteBuffer;
|
||||
|
||||
public final class ByteArrayBuffer implements Serializable {
|
||||
public ByteArrayBuffer(final int capacity) {
|
||||
}
|
||||
|
||||
public void append(final byte[] b, final int off, final int len) {
|
||||
}
|
||||
|
||||
public void append(final int b) {
|
||||
}
|
||||
|
||||
public void append(final char[] b, final int off, final int len) {
|
||||
}
|
||||
|
||||
public void append(final CharArrayBuffer b, final int off, final int len) {
|
||||
}
|
||||
|
||||
public void append(final ByteBuffer buffer) {
|
||||
}
|
||||
|
||||
public void clear() {
|
||||
}
|
||||
|
||||
public byte[] toByteArray() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public int byteAt(final int i) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
public int capacity() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
public int length() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
public void ensureCapacity(final int required) {
|
||||
}
|
||||
|
||||
public byte[] array() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public void setLength(final int len) {
|
||||
}
|
||||
|
||||
public boolean isEmpty() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean isFull() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public int indexOf(final byte b, final int from, final int to) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
public int indexOf(final byte b) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,125 @@
|
||||
/*
|
||||
* ====================================================================
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
* ====================================================================
|
||||
*
|
||||
* This software consists of voluntary contributions made by many
|
||||
* individuals on behalf of the Apache Software Foundation. For more
|
||||
* information on the Apache Software Foundation, please see
|
||||
* <http://www.apache.org/>.
|
||||
*
|
||||
*/
|
||||
|
||||
package org.apache.hc.core5.util;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
public final class CharArrayBuffer implements CharSequence, Serializable {
|
||||
public CharArrayBuffer(final int capacity) {
|
||||
}
|
||||
|
||||
public void append(final char[] b, final int off, final int len) {
|
||||
}
|
||||
|
||||
public void append(final String str) {
|
||||
}
|
||||
|
||||
public void append(final CharArrayBuffer b, final int off, final int len) {
|
||||
}
|
||||
|
||||
public void append(final CharArrayBuffer b) {
|
||||
}
|
||||
|
||||
public void append(final char ch) {
|
||||
}
|
||||
|
||||
public void append(final byte[] b, final int off, final int len) {
|
||||
}
|
||||
|
||||
public void append(final ByteArrayBuffer b, final int off, final int len) {
|
||||
}
|
||||
|
||||
public void append(final Object obj) {
|
||||
}
|
||||
|
||||
public void clear() {
|
||||
}
|
||||
|
||||
public char[] toCharArray() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public char charAt(final int i) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
public char[] array() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public int capacity() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int length() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
public void ensureCapacity(final int required) {
|
||||
}
|
||||
|
||||
public void setLength(final int len) {
|
||||
}
|
||||
|
||||
public boolean isEmpty() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean isFull() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public int indexOf(final int ch, final int from, final int to) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
public int indexOf(final int ch) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
public String substring(final int beginIndex, final int endIndex) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public String substringTrimmed(final int beginIndex, final int endIndex) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CharSequence subSequence(final int beginIndex, final int endIndex) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
71
java/ql/test/stubs/ejb-3.2/javax/ejb/CreateException.java
Normal file
71
java/ql/test/stubs/ejb-3.2/javax/ejb/CreateException.java
Normal file
@@ -0,0 +1,71 @@
|
||||
/*
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
|
||||
*
|
||||
* Copyright (c) 1997-2018 Oracle and/or its affiliates. All rights reserved.
|
||||
*
|
||||
* The contents of this file are subject to the terms of either the GNU
|
||||
* General Public License Version 2 only ("GPL") or the Common Development
|
||||
* and Distribution License("CDDL") (collectively, the "License"). You
|
||||
* may not use this file except in compliance with the License. You can
|
||||
* obtain a copy of the License at
|
||||
* https://oss.oracle.com/licenses/CDDL+GPL-1.1
|
||||
* or LICENSE.txt. See the License for the specific
|
||||
* language governing permissions and limitations under the License.
|
||||
*
|
||||
* When distributing the software, include this License Header Notice in each
|
||||
* file and include the License file at LICENSE.txt.
|
||||
*
|
||||
* GPL Classpath Exception:
|
||||
* Oracle designates this particular file as subject to the "Classpath"
|
||||
* exception as provided by Oracle in the GPL Version 2 section of the License
|
||||
* file that accompanied this code.
|
||||
*
|
||||
* Modifications:
|
||||
* If applicable, add the following below the License Header, with the fields
|
||||
* enclosed by brackets [] replaced by your own identifying information:
|
||||
* "Portions Copyright [year] [name of copyright owner]"
|
||||
*
|
||||
* Contributor(s):
|
||||
* If you wish your version of this file to be governed by only the CDDL or
|
||||
* only the GPL Version 2, indicate your decision by adding "[Contributor]
|
||||
* elects to include this software in this distribution under the [CDDL or GPL
|
||||
* Version 2] license." If you don't indicate a single choice of license, a
|
||||
* recipient has the option to distribute your version of this file under
|
||||
* either the CDDL, the GPL Version 2 or to extend the choice of license to
|
||||
* its licensees as provided above. However, if you add GPL Version 2 code
|
||||
* and therefore, elected the GPL Version 2 license, then the option applies
|
||||
* only if the new code is made subject to such option by the copyright
|
||||
* holder.
|
||||
*/
|
||||
|
||||
package javax.ejb;
|
||||
|
||||
/**
|
||||
* The CreateException exception must be included in the throws clauses of
|
||||
* all create methods defined in an enterprise bean's home or local home
|
||||
* interface.
|
||||
*
|
||||
* <p> This exception is used as a standard application-level exception to
|
||||
* report a failure to create an EJB object or local object.
|
||||
*
|
||||
* @since EJB 1.0
|
||||
*/
|
||||
public class CreateException extends java.lang.Exception {
|
||||
|
||||
private static final long serialVersionUID = 6295951740865457514L;
|
||||
|
||||
/**
|
||||
* Constructs a CreateException with no detail message.
|
||||
*/
|
||||
public CreateException() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a CreateException with the specified
|
||||
* detail message.
|
||||
*/
|
||||
public CreateException(String message) {
|
||||
super(message);
|
||||
}
|
||||
}
|
||||
|
||||
133
java/ql/test/stubs/ejb-3.2/javax/ejb/EJB.java
Normal file
133
java/ql/test/stubs/ejb-3.2/javax/ejb/EJB.java
Normal file
@@ -0,0 +1,133 @@
|
||||
/*
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
|
||||
*
|
||||
* Copyright (c) 1997-2018 Oracle and/or its affiliates. All rights reserved.
|
||||
*
|
||||
* The contents of this file are subject to the terms of either the GNU
|
||||
* General Public License Version 2 only ("GPL") or the Common Development
|
||||
* and Distribution License("CDDL") (collectively, the "License"). You
|
||||
* may not use this file except in compliance with the License. You can
|
||||
* obtain a copy of the License at
|
||||
* https://oss.oracle.com/licenses/CDDL+GPL-1.1
|
||||
* or LICENSE.txt. See the License for the specific
|
||||
* language governing permissions and limitations under the License.
|
||||
*
|
||||
* When distributing the software, include this License Header Notice in each
|
||||
* file and include the License file at LICENSE.txt.
|
||||
*
|
||||
* GPL Classpath Exception:
|
||||
* Oracle designates this particular file as subject to the "Classpath"
|
||||
* exception as provided by Oracle in the GPL Version 2 section of the License
|
||||
* file that accompanied this code.
|
||||
*
|
||||
* Modifications:
|
||||
* If applicable, add the following below the License Header, with the fields
|
||||
* enclosed by brackets [] replaced by your own identifying information:
|
||||
* "Portions Copyright [year] [name of copyright owner]"
|
||||
*
|
||||
* Contributor(s):
|
||||
* If you wish your version of this file to be governed by only the CDDL or
|
||||
* only the GPL Version 2, indicate your decision by adding "[Contributor]
|
||||
* elects to include this software in this distribution under the [CDDL or GPL
|
||||
* Version 2] license." If you don't indicate a single choice of license, a
|
||||
* recipient has the option to distribute your version of this file under
|
||||
* either the CDDL, the GPL Version 2 or to extend the choice of license to
|
||||
* its licensees as provided above. However, if you add GPL Version 2 code
|
||||
* and therefore, elected the GPL Version 2 license, then the option applies
|
||||
* only if the new code is made subject to such option by the copyright
|
||||
* holder.
|
||||
*/
|
||||
|
||||
package javax.ejb;
|
||||
|
||||
import java.lang.annotation.Target;
|
||||
import static java.lang.annotation.ElementType.*;
|
||||
import java.lang.annotation.Retention;
|
||||
import static java.lang.annotation.RetentionPolicy.*;
|
||||
|
||||
/**
|
||||
* Indicates a dependency on the local, no-interface, or remote view of an Enterprise
|
||||
* JavaBean.
|
||||
* <p>
|
||||
* Either the <code>beanName</code> or the <code>lookup</code> element can
|
||||
* be used to resolve the EJB dependency to its target session bean component.
|
||||
* It is an error to specify values for both <code>beanName</code> and
|
||||
* <code>lookup</code>.
|
||||
* <p>
|
||||
* If no explicit linking information is provided and there is only one session
|
||||
* bean within the same application that exposes the matching client view type,
|
||||
* by default the EJB dependency resolves to that session bean.
|
||||
*
|
||||
* @since EJB 3.0
|
||||
*/
|
||||
|
||||
@Target({TYPE, METHOD, FIELD})
|
||||
@Retention(RUNTIME)
|
||||
public @interface EJB {
|
||||
|
||||
/**
|
||||
* The logical name of the ejb reference within the declaring component's
|
||||
* (e.g., java:comp/env) environment.
|
||||
*/
|
||||
String name() default "";
|
||||
|
||||
/**
|
||||
* A string describing the bean.
|
||||
*/
|
||||
String description() default "";
|
||||
|
||||
/**
|
||||
* The <code>beanName</code> element references the value of the <code>name</code>
|
||||
* element of the <code>Stateful</code> or <code>Stateless</code> annotation,
|
||||
* whether defaulted or explicit. If the deployment descriptor was used to define
|
||||
* the name of the bean, the <code>beanName</code> element references the
|
||||
* <code>ejb-name</code> element of the bean definition.
|
||||
* <p>
|
||||
* The <code>beanName</code> element allows disambiguation if multiple session
|
||||
* beans in the ejb-jar implement the same interface.
|
||||
* <p>
|
||||
* In order to reference a bean in another ejb-jar file in the same application,
|
||||
* the <code>beanName</code> may be composed of a path name specifying the ejb-jar
|
||||
* containing the referenced bean with the bean name of the target bean appended and
|
||||
* separated from the path name by #. The path name is relative to the jar file
|
||||
* containing the component that is referencing the target bean.
|
||||
* <p>
|
||||
* Only applicable if the target EJB is defined within the
|
||||
* same application or stand-alone module as the declaring component.
|
||||
*/
|
||||
String beanName() default "";
|
||||
|
||||
/**
|
||||
* The interface type of the Enterprise Java Bean to which this reference
|
||||
* is mapped.
|
||||
* <p>
|
||||
* Holds one of the following types of the target EJB :
|
||||
* <ul>
|
||||
* <li> Local business interface
|
||||
* <li> Bean class (for no-interface view)
|
||||
* <li> Remote business interface
|
||||
* <li> Local Home interface
|
||||
* <li> Remote Home interface
|
||||
* </ul>
|
||||
*/
|
||||
Class beanInterface() default Object.class;
|
||||
|
||||
/**
|
||||
* The product specific name of the EJB component to which this
|
||||
* ejb reference should be mapped. This mapped name is often a
|
||||
* global JNDI name, but may be a name of any form.
|
||||
* <p>
|
||||
* Application servers are not required to support any particular
|
||||
* form or type of mapped name, nor the ability to use mapped names.
|
||||
* The mapped name is product-dependent and often installation-dependent.
|
||||
* No use of a mapped name is portable.
|
||||
*/
|
||||
String mappedName() default "";
|
||||
|
||||
/**
|
||||
* A portable lookup string containing the JNDI name for the target EJB component.
|
||||
*
|
||||
* @since EJB 3.1
|
||||
*/
|
||||
String lookup() default "";
|
||||
}
|
||||
252
java/ql/test/stubs/ejb-3.2/javax/ejb/EJBContext.java
Normal file
252
java/ql/test/stubs/ejb-3.2/javax/ejb/EJBContext.java
Normal file
@@ -0,0 +1,252 @@
|
||||
/*
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
|
||||
*
|
||||
* Copyright (c) 1997-2018 Oracle and/or its affiliates. All rights reserved.
|
||||
*
|
||||
* The contents of this file are subject to the terms of either the GNU
|
||||
* General Public License Version 2 only ("GPL") or the Common Development
|
||||
* and Distribution License("CDDL") (collectively, the "License"). You
|
||||
* may not use this file except in compliance with the License. You can
|
||||
* obtain a copy of the License at
|
||||
* https://oss.oracle.com/licenses/CDDL+GPL-1.1
|
||||
* or LICENSE.txt. See the License for the specific
|
||||
* language governing permissions and limitations under the License.
|
||||
*
|
||||
* When distributing the software, include this License Header Notice in each
|
||||
* file and include the License file at LICENSE.txt.
|
||||
*
|
||||
* GPL Classpath Exception:
|
||||
* Oracle designates this particular file as subject to the "Classpath"
|
||||
* exception as provided by Oracle in the GPL Version 2 section of the License
|
||||
* file that accompanied this code.
|
||||
*
|
||||
* Modifications:
|
||||
* If applicable, add the following below the License Header, with the fields
|
||||
* enclosed by brackets [] replaced by your own identifying information:
|
||||
* "Portions Copyright [year] [name of copyright owner]"
|
||||
*
|
||||
* Contributor(s):
|
||||
* If you wish your version of this file to be governed by only the CDDL or
|
||||
* only the GPL Version 2, indicate your decision by adding "[Contributor]
|
||||
* elects to include this software in this distribution under the [CDDL or GPL
|
||||
* Version 2] license." If you don't indicate a single choice of license, a
|
||||
* recipient has the option to distribute your version of this file under
|
||||
* either the CDDL, the GPL Version 2 or to extend the choice of license to
|
||||
* its licensees as provided above. However, if you add GPL Version 2 code
|
||||
* and therefore, elected the GPL Version 2 license, then the option applies
|
||||
* only if the new code is made subject to such option by the copyright
|
||||
* holder.
|
||||
*/
|
||||
|
||||
package javax.ejb;
|
||||
|
||||
import java.util.*;
|
||||
import java.security.Identity;
|
||||
import java.security.Principal;
|
||||
import javax.transaction.UserTransaction;
|
||||
|
||||
/**
|
||||
* The EJBContext interface provides an instance with access to the
|
||||
* container-provided runtime context of an enterprise bean instance.
|
||||
*
|
||||
* <p> This interface is extended by the <code>SessionContext</code>,
|
||||
* <code>EntityContext</code>, and <code>MessageDrivenContext</code> interfaces
|
||||
* to provide additional methods specific to the enterprise interface bean type.
|
||||
*
|
||||
* @see SessionContext
|
||||
* @see MessageDrivenContext
|
||||
* @see EntityContext
|
||||
*
|
||||
* @since EJB 1.0
|
||||
*/
|
||||
public interface EJBContext
|
||||
{
|
||||
/**
|
||||
* Obtain the enterprise bean's remote home interface.
|
||||
*
|
||||
* @return The enterprise bean's remote home interface.
|
||||
*
|
||||
* @exception java.lang.IllegalStateException if the enterprise bean
|
||||
* does not have a remote home interface.
|
||||
*/
|
||||
EJBHome getEJBHome() throws IllegalStateException;
|
||||
|
||||
/**
|
||||
* Obtain the enterprise bean's local home interface.
|
||||
*
|
||||
* @return The enterprise bean's local home interface.
|
||||
*
|
||||
* @exception java.lang.IllegalStateException if the enterprise bean
|
||||
* does not have a local home interface.
|
||||
*
|
||||
* @since EJB 2.0
|
||||
*/
|
||||
EJBLocalHome getEJBLocalHome() throws IllegalStateException;
|
||||
|
||||
/**
|
||||
* Obtain the enterprise bean's environment properties.
|
||||
*
|
||||
* <p><b>Note:</b> If the enterprise bean has no environment properties
|
||||
* this method returns an empty <code>java.util.Properties</code> object.
|
||||
* This method never returns <code>null</code>.
|
||||
*
|
||||
* @return The environment properties for the enterprise bean.
|
||||
*
|
||||
* @deprecated Use the JNDI naming context java:comp/env to access
|
||||
* enterprise bean's environment.
|
||||
*/
|
||||
Properties getEnvironment();
|
||||
|
||||
/**
|
||||
* Obtain the <code>java.security.Identity</code> of the caller.
|
||||
*
|
||||
* This method is deprecated in EJB 1.1. The Container
|
||||
* is allowed to return always <code>null</code> from this method. The enterprise
|
||||
* bean should use the <code>getCallerPrincipal</code> method instead.
|
||||
*
|
||||
* @return The <code>Identity</code> object that identifies the caller.
|
||||
*
|
||||
* @deprecated Use Principal getCallerPrincipal() instead.
|
||||
*/
|
||||
Identity getCallerIdentity();
|
||||
|
||||
|
||||
/**
|
||||
* Obtain the <code>java.security.Principal</code> that identifies the caller.
|
||||
*
|
||||
* @return The <code>Principal</code> object that identifies the caller. This
|
||||
* method never returns <code>null</code>.
|
||||
*
|
||||
* @exception IllegalStateException The Container throws the exception
|
||||
* if the instance is not allowed to call this method.
|
||||
*
|
||||
* @since EJB 1.1
|
||||
*/
|
||||
Principal getCallerPrincipal() throws IllegalStateException;
|
||||
|
||||
/**
|
||||
* Test if the caller has a given role.
|
||||
*
|
||||
* <p>This method is deprecated in EJB 1.1. The enterprise bean
|
||||
* should use the <code>isCallerInRole(String roleName)</code> method instead.
|
||||
*
|
||||
* @param role The <code>java.security.Identity</code> of the role to be tested.
|
||||
*
|
||||
* @return True if the caller has the specified role.
|
||||
*
|
||||
* @deprecated Use boolean isCallerInRole(String roleName) instead.
|
||||
*/
|
||||
boolean isCallerInRole(Identity role);
|
||||
|
||||
/**
|
||||
* Test if the caller has a given security role.
|
||||
*
|
||||
* @param roleName The name of the security role. The role must be one of
|
||||
* the security roles that is defined in the deployment descriptor.
|
||||
*
|
||||
* @return True if the caller has the specified role.
|
||||
*
|
||||
* @exception IllegalStateException The Container throws the exception
|
||||
* if the instance is not allowed to call this method.
|
||||
*
|
||||
* @since EJB 1.1
|
||||
*/
|
||||
boolean isCallerInRole(String roleName) throws IllegalStateException;
|
||||
|
||||
/**
|
||||
* Obtain the transaction demarcation interface.
|
||||
*
|
||||
* Only enterprise beans with bean-managed transactions are allowed to
|
||||
* to use the <code>UserTransaction</code> interface. As entity beans must always use
|
||||
* container-managed transactions, only session beans or message-driven
|
||||
* beans with bean-managed transactions are allowed to invoke this method.
|
||||
*
|
||||
* @return The <code>UserTransaction</code> interface that the enterprise bean
|
||||
* instance can use for transaction demarcation.
|
||||
*
|
||||
* @exception IllegalStateException The Container throws the exception
|
||||
* if the instance is not allowed to use the <code>UserTransaction</code> interface
|
||||
* (i.e. the instance is of a bean with container-managed transactions).
|
||||
*/
|
||||
UserTransaction getUserTransaction() throws IllegalStateException;
|
||||
|
||||
/**
|
||||
* Mark the current transaction for rollback. The transaction will become
|
||||
* permanently marked for rollback. A transaction marked for rollback
|
||||
* can never commit.
|
||||
*
|
||||
* Only enterprise beans with container-managed transactions are allowed
|
||||
* to use this method.
|
||||
*
|
||||
* @exception IllegalStateException The Container throws the exception
|
||||
* if the instance is not allowed to use this method (i.e. the
|
||||
* instance is of a bean with bean-managed transactions).
|
||||
*/
|
||||
void setRollbackOnly() throws IllegalStateException;
|
||||
|
||||
/**
|
||||
* Test if the transaction has been marked for rollback only. An enterprise
|
||||
* bean instance can use this operation, for example, to test after an
|
||||
* exception has been caught, whether it is fruitless to continue
|
||||
* computation on behalf of the current transaction.
|
||||
*
|
||||
* Only enterprise beans with container-managed transactions are allowed
|
||||
* to use this method.
|
||||
*
|
||||
* @return True if the current transaction is marked for rollback, false
|
||||
* otherwise.
|
||||
*
|
||||
* @exception IllegalStateException The Container throws the exception
|
||||
* if the instance is not allowed to use this method (i.e. the
|
||||
* instance is of a bean with bean-managed transactions).
|
||||
*/
|
||||
boolean getRollbackOnly() throws IllegalStateException;
|
||||
|
||||
/**
|
||||
* Get access to the EJB Timer Service.
|
||||
*
|
||||
* @exception IllegalStateException The Container throws the exception
|
||||
* if the instance is not allowed to use this method (e.g. if the bean
|
||||
* is a stateful session bean)
|
||||
*
|
||||
* @since EJB 2.1
|
||||
*/
|
||||
//TimerService getTimerService() throws IllegalStateException;
|
||||
|
||||
/**
|
||||
* Lookup a resource within the <code>java:</code> namespace. Names referring to
|
||||
* entries within the private component namespace can be passed as
|
||||
* unqualified strings. In that case the lookup will be relative to
|
||||
* <code>"java:comp/env/"</code>.
|
||||
*
|
||||
* For example, assuming an enterprise bean defines an <code>ejb-local-ref</code>
|
||||
* with <code>ejb-ref-name</code> <code>"ejb/BarRef"</code> the following two
|
||||
* calls to <code> EJBContext.lookup</code> are equivalent :
|
||||
*
|
||||
* <code>ejbContext.lookup("ejb/BarRef")</code>;
|
||||
* <code>ejbContext.lookup("java:comp/env/ejb/BarRef")</code>;
|
||||
*
|
||||
* @param name Name of the entry
|
||||
*
|
||||
* @exception IllegalArgumentException The Container throws the exception
|
||||
* if the given name does not match an entry within the component's
|
||||
* environment.
|
||||
*
|
||||
* @since EJB 3.0
|
||||
*/
|
||||
Object lookup(String name) throws IllegalArgumentException;
|
||||
|
||||
/**
|
||||
* The <code>getContextData</code> method enables a business method, lifecycle
|
||||
* callback method, or timeout method to retrieve any interceptor/webservices context
|
||||
* associated with its invocation.
|
||||
*
|
||||
* @return the context data that interceptor context associated with this invocation.
|
||||
* If there is no context data, an empty <code>Map<String,Object></code>
|
||||
* object will be returned.
|
||||
*
|
||||
* @since EJB 3.1
|
||||
*/
|
||||
Map<String, Object> getContextData();
|
||||
|
||||
}
|
||||
94
java/ql/test/stubs/ejb-3.2/javax/ejb/EJBException.java
Normal file
94
java/ql/test/stubs/ejb-3.2/javax/ejb/EJBException.java
Normal file
@@ -0,0 +1,94 @@
|
||||
/*
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
|
||||
*
|
||||
* Copyright (c) 1997-2018 Oracle and/or its affiliates. All rights reserved.
|
||||
*
|
||||
* The contents of this file are subject to the terms of either the GNU
|
||||
* General Public License Version 2 only ("GPL") or the Common Development
|
||||
* and Distribution License("CDDL") (collectively, the "License"). You
|
||||
* may not use this file except in compliance with the License. You can
|
||||
* obtain a copy of the License at
|
||||
* https://oss.oracle.com/licenses/CDDL+GPL-1.1
|
||||
* or LICENSE.txt. See the License for the specific
|
||||
* language governing permissions and limitations under the License.
|
||||
*
|
||||
* When distributing the software, include this License Header Notice in each
|
||||
* file and include the License file at LICENSE.txt.
|
||||
*
|
||||
* GPL Classpath Exception:
|
||||
* Oracle designates this particular file as subject to the "Classpath"
|
||||
* exception as provided by Oracle in the GPL Version 2 section of the License
|
||||
* file that accompanied this code.
|
||||
*
|
||||
* Modifications:
|
||||
* If applicable, add the following below the License Header, with the fields
|
||||
* enclosed by brackets [] replaced by your own identifying information:
|
||||
* "Portions Copyright [year] [name of copyright owner]"
|
||||
*
|
||||
* Contributor(s):
|
||||
* If you wish your version of this file to be governed by only the CDDL or
|
||||
* only the GPL Version 2, indicate your decision by adding "[Contributor]
|
||||
* elects to include this software in this distribution under the [CDDL or GPL
|
||||
* Version 2] license." If you don't indicate a single choice of license, a
|
||||
* recipient has the option to distribute your version of this file under
|
||||
* either the CDDL, the GPL Version 2 or to extend the choice of license to
|
||||
* its licensees as provided above. However, if you add GPL Version 2 code
|
||||
* and therefore, elected the GPL Version 2 license, then the option applies
|
||||
* only if the new code is made subject to such option by the copyright
|
||||
* holder.
|
||||
*/
|
||||
|
||||
package javax.ejb;
|
||||
|
||||
/**
|
||||
* The EJBException is thrown to report that the invoked
|
||||
* business method or callback method could not be completed because
|
||||
* of an unexpected error (e.g. the instance failed to open a database
|
||||
* connection).
|
||||
*
|
||||
* @since EJB 1.1
|
||||
*/
|
||||
public class EJBException extends java.lang.RuntimeException {
|
||||
|
||||
private static final long serialVersionUID = 796770993296843510L;
|
||||
|
||||
/**
|
||||
* Constructs an EJBException with no detail message.
|
||||
*/
|
||||
public EJBException() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs an EJBException with the specified
|
||||
* detailed message.
|
||||
*/
|
||||
public EJBException(String message) {
|
||||
super(message);
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs an EJBException that embeds the originally thrown exception.
|
||||
*/
|
||||
public EJBException(Exception ex) {
|
||||
super(ex);
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs an EJBException that embeds the originally thrown exception
|
||||
* with the specified detail message.
|
||||
*/
|
||||
public EJBException(String message, Exception ex) {
|
||||
super(message, ex);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Obtain the exception that caused the EJBException to be thrown.
|
||||
* It is recommended that the inherited Throwable.getCause() method
|
||||
* be used to retrieve the cause instead of this method.
|
||||
*/
|
||||
public Exception getCausedByException() {
|
||||
return (Exception) getCause();
|
||||
}
|
||||
|
||||
}
|
||||
120
java/ql/test/stubs/ejb-3.2/javax/ejb/EJBHome.java
Normal file
120
java/ql/test/stubs/ejb-3.2/javax/ejb/EJBHome.java
Normal file
@@ -0,0 +1,120 @@
|
||||
/*
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
|
||||
*
|
||||
* Copyright (c) 1997-2018 Oracle and/or its affiliates. All rights reserved.
|
||||
*
|
||||
* The contents of this file are subject to the terms of either the GNU
|
||||
* General Public License Version 2 only ("GPL") or the Common Development
|
||||
* and Distribution License("CDDL") (collectively, the "License"). You
|
||||
* may not use this file except in compliance with the License. You can
|
||||
* obtain a copy of the License at
|
||||
* https://oss.oracle.com/licenses/CDDL+GPL-1.1
|
||||
* or LICENSE.txt. See the License for the specific
|
||||
* language governing permissions and limitations under the License.
|
||||
*
|
||||
* When distributing the software, include this License Header Notice in each
|
||||
* file and include the License file at LICENSE.txt.
|
||||
*
|
||||
* GPL Classpath Exception:
|
||||
* Oracle designates this particular file as subject to the "Classpath"
|
||||
* exception as provided by Oracle in the GPL Version 2 section of the License
|
||||
* file that accompanied this code.
|
||||
*
|
||||
* Modifications:
|
||||
* If applicable, add the following below the License Header, with the fields
|
||||
* enclosed by brackets [] replaced by your own identifying information:
|
||||
* "Portions Copyright [year] [name of copyright owner]"
|
||||
*
|
||||
* Contributor(s):
|
||||
* If you wish your version of this file to be governed by only the CDDL or
|
||||
* only the GPL Version 2, indicate your decision by adding "[Contributor]
|
||||
* elects to include this software in this distribution under the [CDDL or GPL
|
||||
* Version 2] license." If you don't indicate a single choice of license, a
|
||||
* recipient has the option to distribute your version of this file under
|
||||
* either the CDDL, the GPL Version 2 or to extend the choice of license to
|
||||
* its licensees as provided above. However, if you add GPL Version 2 code
|
||||
* and therefore, elected the GPL Version 2 license, then the option applies
|
||||
* only if the new code is made subject to such option by the copyright
|
||||
* holder.
|
||||
*/
|
||||
|
||||
package javax.ejb;
|
||||
|
||||
import java.rmi.RemoteException;
|
||||
|
||||
/**
|
||||
* The EJBHome interface must be extended by all enterprise beans'
|
||||
* remote home interfaces. An enterprise bean's remote home interface
|
||||
* defines the methods that allow a remote client to create, find, and
|
||||
* remove EJB objects.
|
||||
*
|
||||
* <p> The remote home interface is defined by the enterprise bean provider and
|
||||
* implemented by the enterprise bean container.
|
||||
* <p>
|
||||
* Enterprise beans written to the EJB 3.0 and later APIs do not require
|
||||
* a home interface.
|
||||
*
|
||||
* @since EJB 1.0
|
||||
*/
|
||||
public interface EJBHome extends java.rmi.Remote {
|
||||
|
||||
/**
|
||||
* Remove an EJB object identified by its handle.
|
||||
*
|
||||
* @param handle the handle of the EJB object to be removed
|
||||
*
|
||||
* @exception RemoveException Thrown if the enterprise bean or
|
||||
* the container does not allow the client to remove the object.
|
||||
*
|
||||
* @exception RemoteException Thrown when the method failed due to a
|
||||
* system-level failure.
|
||||
*/
|
||||
void remove(Handle handle) throws RemoteException, RemoveException;
|
||||
|
||||
/**
|
||||
* Remove an EJB object identified by its primary key.
|
||||
*
|
||||
* <p>This method can be used only for an entity bean. An attempt
|
||||
* to call this method on a session bean will result in a RemoveException.
|
||||
*
|
||||
* <p><b>Note:</b> Support for entity beans is optional as of EJB 3.2.
|
||||
*
|
||||
* @param primaryKey the primary key of the EJB object to be removed
|
||||
*
|
||||
* @exception RemoveException Thrown if the enterprise bean or
|
||||
* the container does not allow the client to remove the object.
|
||||
*
|
||||
* @exception RemoteException Thrown when the method failed due to a
|
||||
* system-level failure.
|
||||
*/
|
||||
void remove(Object primaryKey) throws RemoteException, RemoveException;
|
||||
|
||||
/**
|
||||
* Obtain the EJBMetaData interface for the enterprise bean. The
|
||||
* EJBMetaData interface allows the client to obtain information about
|
||||
* the enterprise bean.
|
||||
*
|
||||
* <p> The information obtainable via the EJBMetaData interface is
|
||||
* intended to be used by tools.
|
||||
*
|
||||
* @return The enterprise Bean's EJBMetaData interface.
|
||||
*
|
||||
* @exception RemoteException Thrown when the method failed due to a
|
||||
* system-level failure.
|
||||
*/
|
||||
EJBMetaData getEJBMetaData() throws RemoteException;
|
||||
|
||||
/**
|
||||
* Obtain a handle for the remote home object. The handle can be used at
|
||||
* later time to re-obtain a reference to the remote home object, possibly
|
||||
* in a different Java Virtual Machine.
|
||||
*
|
||||
* @return A handle for the remote home object.
|
||||
*
|
||||
* @exception RemoteException Thrown when the method failed due to a
|
||||
* system-level failure.
|
||||
*
|
||||
* @since EJB 1.1
|
||||
*/
|
||||
HomeHandle getHomeHandle() throws RemoteException;
|
||||
}
|
||||
80
java/ql/test/stubs/ejb-3.2/javax/ejb/EJBLocalHome.java
Normal file
80
java/ql/test/stubs/ejb-3.2/javax/ejb/EJBLocalHome.java
Normal file
@@ -0,0 +1,80 @@
|
||||
/*
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
|
||||
*
|
||||
* Copyright (c) 1997-2018 Oracle and/or its affiliates. All rights reserved.
|
||||
*
|
||||
* The contents of this file are subject to the terms of either the GNU
|
||||
* General Public License Version 2 only ("GPL") or the Common Development
|
||||
* and Distribution License("CDDL") (collectively, the "License"). You
|
||||
* may not use this file except in compliance with the License. You can
|
||||
* obtain a copy of the License at
|
||||
* https://oss.oracle.com/licenses/CDDL+GPL-1.1
|
||||
* or LICENSE.txt. See the License for the specific
|
||||
* language governing permissions and limitations under the License.
|
||||
*
|
||||
* When distributing the software, include this License Header Notice in each
|
||||
* file and include the License file at LICENSE.txt.
|
||||
*
|
||||
* GPL Classpath Exception:
|
||||
* Oracle designates this particular file as subject to the "Classpath"
|
||||
* exception as provided by Oracle in the GPL Version 2 section of the License
|
||||
* file that accompanied this code.
|
||||
*
|
||||
* Modifications:
|
||||
* If applicable, add the following below the License Header, with the fields
|
||||
* enclosed by brackets [] replaced by your own identifying information:
|
||||
* "Portions Copyright [year] [name of copyright owner]"
|
||||
*
|
||||
* Contributor(s):
|
||||
* If you wish your version of this file to be governed by only the CDDL or
|
||||
* only the GPL Version 2, indicate your decision by adding "[Contributor]
|
||||
* elects to include this software in this distribution under the [CDDL or GPL
|
||||
* Version 2] license." If you don't indicate a single choice of license, a
|
||||
* recipient has the option to distribute your version of this file under
|
||||
* either the CDDL, the GPL Version 2 or to extend the choice of license to
|
||||
* its licensees as provided above. However, if you add GPL Version 2 code
|
||||
* and therefore, elected the GPL Version 2 license, then the option applies
|
||||
* only if the new code is made subject to such option by the copyright
|
||||
* holder.
|
||||
*/
|
||||
|
||||
package javax.ejb;
|
||||
|
||||
/**
|
||||
* The EJBLocalHome interface must be extended by all enterprise
|
||||
* beans' local home interfaces. An enterprise bean's local home
|
||||
* interface defines the methods that allow local clients to create,
|
||||
* find, and remove EJB objects.
|
||||
*
|
||||
* <p> The local home interface is defined by the enterprise bean provider
|
||||
* and implemented by the enterprise bean container.
|
||||
* <p>
|
||||
* Enterprise beans written to the EJB 3.0 and later APIs do not require
|
||||
* a local home interface.
|
||||
*
|
||||
* @since EJB 2.0
|
||||
*/
|
||||
public interface EJBLocalHome {
|
||||
|
||||
/**
|
||||
* Remove an EJB object identified by its primary key.
|
||||
*
|
||||
* <p>This method can only be used by local clients of an entity
|
||||
* bean. An attempt to call this method on a session bean will
|
||||
* result in a RemoveException.
|
||||
*
|
||||
* <p><b>Note:</b> Support for entity beans is optional as of EJB 3.2.
|
||||
*
|
||||
* @param primaryKey the primary key of the EJB object to be removed
|
||||
*
|
||||
* @exception RemoveException Thrown if the enterprise bean or
|
||||
* the container does not allow the client to remove the object.
|
||||
*
|
||||
* @exception EJBException Thrown when the method failed due to a
|
||||
* system-level failure.
|
||||
*
|
||||
*/
|
||||
void remove(Object primaryKey) throws RemoveException, EJBException;
|
||||
|
||||
}
|
||||
|
||||
117
java/ql/test/stubs/ejb-3.2/javax/ejb/EJBLocalObject.java
Normal file
117
java/ql/test/stubs/ejb-3.2/javax/ejb/EJBLocalObject.java
Normal file
@@ -0,0 +1,117 @@
|
||||
/*
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
|
||||
*
|
||||
* Copyright (c) 1997-2018 Oracle and/or its affiliates. All rights reserved.
|
||||
*
|
||||
* The contents of this file are subject to the terms of either the GNU
|
||||
* General Public License Version 2 only ("GPL") or the Common Development
|
||||
* and Distribution License("CDDL") (collectively, the "License"). You
|
||||
* may not use this file except in compliance with the License. You can
|
||||
* obtain a copy of the License at
|
||||
* https://oss.oracle.com/licenses/CDDL+GPL-1.1
|
||||
* or LICENSE.txt. See the License for the specific
|
||||
* language governing permissions and limitations under the License.
|
||||
*
|
||||
* When distributing the software, include this License Header Notice in each
|
||||
* file and include the License file at LICENSE.txt.
|
||||
*
|
||||
* GPL Classpath Exception:
|
||||
* Oracle designates this particular file as subject to the "Classpath"
|
||||
* exception as provided by Oracle in the GPL Version 2 section of the License
|
||||
* file that accompanied this code.
|
||||
*
|
||||
* Modifications:
|
||||
* If applicable, add the following below the License Header, with the fields
|
||||
* enclosed by brackets [] replaced by your own identifying information:
|
||||
* "Portions Copyright [year] [name of copyright owner]"
|
||||
*
|
||||
* Contributor(s):
|
||||
* If you wish your version of this file to be governed by only the CDDL or
|
||||
* only the GPL Version 2, indicate your decision by adding "[Contributor]
|
||||
* elects to include this software in this distribution under the [CDDL or GPL
|
||||
* Version 2] license." If you don't indicate a single choice of license, a
|
||||
* recipient has the option to distribute your version of this file under
|
||||
* either the CDDL, the GPL Version 2 or to extend the choice of license to
|
||||
* its licensees as provided above. However, if you add GPL Version 2 code
|
||||
* and therefore, elected the GPL Version 2 license, then the option applies
|
||||
* only if the new code is made subject to such option by the copyright
|
||||
* holder.
|
||||
*/
|
||||
|
||||
package javax.ejb;
|
||||
|
||||
/**
|
||||
* The EJBLocalObject interface must be extended by all enterprise beans' local
|
||||
* interfaces. An enterprise bean's local interface provides the local client
|
||||
* view of an EJB object. An enterprise bean's local interface defines
|
||||
* the business methods callable by local clients.
|
||||
*
|
||||
* <p> The enterprise bean's local interface is defined by the enterprise
|
||||
* bean provider and implemented by the enterprise bean container.
|
||||
*
|
||||
* <p>
|
||||
* Enterprise beans written to the EJB 3.0 and later APIs do not require
|
||||
* a local interface that extends the EJBLocalObject interface. A local
|
||||
* business interface can be used instead.
|
||||
*
|
||||
* @since EJB 2.0
|
||||
*/
|
||||
public interface EJBLocalObject {
|
||||
/**
|
||||
* Obtain the enterprise bean's local home interface. The local home
|
||||
* interface defines the enterprise bean's create, finder, remove,
|
||||
* and home business methods that are available to local clients.
|
||||
*
|
||||
* @return A reference to the enterprise bean's local home interface.
|
||||
*
|
||||
* @exception EJBException Thrown when the method failed due to a
|
||||
* system-level failure.
|
||||
*
|
||||
*/
|
||||
public EJBLocalHome getEJBLocalHome() throws EJBException;
|
||||
|
||||
/**
|
||||
* Obtain the primary key of the EJB local object.
|
||||
*
|
||||
* <p> This method can be called on an entity bean.
|
||||
* An attempt to invoke this method on a session bean will result in
|
||||
* an EJBException.
|
||||
*
|
||||
* <p><b>Note:</b> Support for entity beans is optional as of EJB 3.2.
|
||||
*
|
||||
* @return The EJB local object's primary key.
|
||||
*
|
||||
* @exception EJBException Thrown when the method failed due to a
|
||||
* system-level failure or when invoked on a session bean.
|
||||
*
|
||||
*/
|
||||
public Object getPrimaryKey() throws EJBException;
|
||||
|
||||
/**
|
||||
* Remove the EJB local object.
|
||||
*
|
||||
* @exception RemoveException The enterprise bean or the container
|
||||
* does not allow destruction of the object.
|
||||
*
|
||||
* @exception EJBException Thrown when the method failed due to a
|
||||
* system-level failure.
|
||||
*
|
||||
*/
|
||||
public void remove() throws RemoveException, EJBException;
|
||||
|
||||
/**
|
||||
* Test if a given EJB local object is identical to the invoked EJB
|
||||
* local object.
|
||||
*
|
||||
* @param obj An object to test for identity with the invoked object.
|
||||
*
|
||||
* @return True if the given EJB local object is identical to the
|
||||
* invoked object, false otherwise.
|
||||
*
|
||||
*
|
||||
* @exception EJBException Thrown when the method failed due to a
|
||||
* system-level failure.
|
||||
*
|
||||
*/
|
||||
boolean isIdentical(EJBLocalObject obj) throws EJBException;
|
||||
}
|
||||
101
java/ql/test/stubs/ejb-3.2/javax/ejb/EJBMetaData.java
Normal file
101
java/ql/test/stubs/ejb-3.2/javax/ejb/EJBMetaData.java
Normal file
@@ -0,0 +1,101 @@
|
||||
/*
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
|
||||
*
|
||||
* Copyright (c) 1997-2018 Oracle and/or its affiliates. All rights reserved.
|
||||
*
|
||||
* The contents of this file are subject to the terms of either the GNU
|
||||
* General Public License Version 2 only ("GPL") or the Common Development
|
||||
* and Distribution License("CDDL") (collectively, the "License"). You
|
||||
* may not use this file except in compliance with the License. You can
|
||||
* obtain a copy of the License at
|
||||
* https://oss.oracle.com/licenses/CDDL+GPL-1.1
|
||||
* or LICENSE.txt. See the License for the specific
|
||||
* language governing permissions and limitations under the License.
|
||||
*
|
||||
* When distributing the software, include this License Header Notice in each
|
||||
* file and include the License file at LICENSE.txt.
|
||||
*
|
||||
* GPL Classpath Exception:
|
||||
* Oracle designates this particular file as subject to the "Classpath"
|
||||
* exception as provided by Oracle in the GPL Version 2 section of the License
|
||||
* file that accompanied this code.
|
||||
*
|
||||
* Modifications:
|
||||
* If applicable, add the following below the License Header, with the fields
|
||||
* enclosed by brackets [] replaced by your own identifying information:
|
||||
* "Portions Copyright [year] [name of copyright owner]"
|
||||
*
|
||||
* Contributor(s):
|
||||
* If you wish your version of this file to be governed by only the CDDL or
|
||||
* only the GPL Version 2, indicate your decision by adding "[Contributor]
|
||||
* elects to include this software in this distribution under the [CDDL or GPL
|
||||
* Version 2] license." If you don't indicate a single choice of license, a
|
||||
* recipient has the option to distribute your version of this file under
|
||||
* either the CDDL, the GPL Version 2 or to extend the choice of license to
|
||||
* its licensees as provided above. However, if you add GPL Version 2 code
|
||||
* and therefore, elected the GPL Version 2 license, then the option applies
|
||||
* only if the new code is made subject to such option by the copyright
|
||||
* holder.
|
||||
*/
|
||||
|
||||
package javax.ejb;
|
||||
|
||||
/**
|
||||
* The EJBMetaData interface allows a client to obtain the enterprise bean's
|
||||
* meta-data information.
|
||||
*
|
||||
* <p> The meta-data is intended for development tools used for
|
||||
* building applications that use deployed enterprise beans, and for clients
|
||||
* using a scripting language to access the enterprise bean.
|
||||
*
|
||||
* <p> Note that the EJBMetaData is not a remote interface. The class that
|
||||
* implements this interface (this class is typically generated by container
|
||||
* tools) must be serializable, and must be a valid RMI/IDL value type.
|
||||
*
|
||||
* @since EJB 1.0
|
||||
*/
|
||||
public interface EJBMetaData {
|
||||
/**
|
||||
* Obtain the remote home interface of the enterprise bean.
|
||||
*
|
||||
* @return the remote home interface of the enterprise bean.
|
||||
*/
|
||||
EJBHome getEJBHome();
|
||||
|
||||
/**
|
||||
* Obtain the class object for the enterprise bean's remote home interface.
|
||||
* @return the class object for the enterprise bean's remote home interface.
|
||||
*/
|
||||
Class getHomeInterfaceClass();
|
||||
|
||||
/**
|
||||
* Obtain the class object for the enterprise bean's remote interface.
|
||||
*
|
||||
* @return the class object for the enterprise bean's remote interface.
|
||||
*/
|
||||
Class getRemoteInterfaceClass();
|
||||
|
||||
/**
|
||||
* Obtain the class object for the enterprise bean's primary key class.
|
||||
*
|
||||
* @return the class object for the enterprise bean's primary key class.
|
||||
*/
|
||||
Class getPrimaryKeyClass();
|
||||
|
||||
/**
|
||||
* Test if the enterprise bean's type is "session".
|
||||
*
|
||||
* @return True if the type of the enterprise bean is session bean.
|
||||
*/
|
||||
boolean isSession();
|
||||
|
||||
/**
|
||||
* Test if the enterprise bean's type is "stateless session".
|
||||
*
|
||||
* @return True if the type of the enterprise Bean is stateless
|
||||
* session.
|
||||
*
|
||||
* @since EJB 1.1
|
||||
*/
|
||||
boolean isStatelessSession();
|
||||
}
|
||||
128
java/ql/test/stubs/ejb-3.2/javax/ejb/EJBObject.java
Normal file
128
java/ql/test/stubs/ejb-3.2/javax/ejb/EJBObject.java
Normal file
@@ -0,0 +1,128 @@
|
||||
/*
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
|
||||
*
|
||||
* Copyright (c) 1997-2018 Oracle and/or its affiliates. All rights reserved.
|
||||
*
|
||||
* The contents of this file are subject to the terms of either the GNU
|
||||
* General Public License Version 2 only ("GPL") or the Common Development
|
||||
* and Distribution License("CDDL") (collectively, the "License"). You
|
||||
* may not use this file except in compliance with the License. You can
|
||||
* obtain a copy of the License at
|
||||
* https://oss.oracle.com/licenses/CDDL+GPL-1.1
|
||||
* or LICENSE.txt. See the License for the specific
|
||||
* language governing permissions and limitations under the License.
|
||||
*
|
||||
* When distributing the software, include this License Header Notice in each
|
||||
* file and include the License file at LICENSE.txt.
|
||||
*
|
||||
* GPL Classpath Exception:
|
||||
* Oracle designates this particular file as subject to the "Classpath"
|
||||
* exception as provided by Oracle in the GPL Version 2 section of the License
|
||||
* file that accompanied this code.
|
||||
*
|
||||
* Modifications:
|
||||
* If applicable, add the following below the License Header, with the fields
|
||||
* enclosed by brackets [] replaced by your own identifying information:
|
||||
* "Portions Copyright [year] [name of copyright owner]"
|
||||
*
|
||||
* Contributor(s):
|
||||
* If you wish your version of this file to be governed by only the CDDL or
|
||||
* only the GPL Version 2, indicate your decision by adding "[Contributor]
|
||||
* elects to include this software in this distribution under the [CDDL or GPL
|
||||
* Version 2] license." If you don't indicate a single choice of license, a
|
||||
* recipient has the option to distribute your version of this file under
|
||||
* either the CDDL, the GPL Version 2 or to extend the choice of license to
|
||||
* its licensees as provided above. However, if you add GPL Version 2 code
|
||||
* and therefore, elected the GPL Version 2 license, then the option applies
|
||||
* only if the new code is made subject to such option by the copyright
|
||||
* holder.
|
||||
*/
|
||||
|
||||
package javax.ejb;
|
||||
|
||||
import java.rmi.RemoteException;
|
||||
|
||||
/**
|
||||
* The EJBObject interface is extended by all enterprise beans' remote
|
||||
* interfaces. An enterprise bean's remote interface provides the
|
||||
* remote client view of an EJB object. An enterprise bean's remote
|
||||
* interface defines the business methods callable by a remote client.
|
||||
*
|
||||
* <p> The remote interface must extend the javax.ejb.EJBObject
|
||||
* interface, and define the enterprise bean specific business
|
||||
* methods.
|
||||
*
|
||||
* <p> The enterprise bean's remote interface is defined by the enterprise
|
||||
* bean provider and implemented by the enterprise bean container.
|
||||
*
|
||||
* <p>
|
||||
* Enterprise beans written to the EJB 3.0 and later APIs do not require
|
||||
* a remote interface that extends the EJBObject interface. A remote
|
||||
* business interface can be used instead.
|
||||
*
|
||||
* @since EJB 1.0
|
||||
*/
|
||||
public interface EJBObject extends java.rmi.Remote {
|
||||
/**
|
||||
* Obtain the enterprise bean's remote home interface. The remote home
|
||||
* interface defines the enterprise bean's create, finder, remove,
|
||||
* and home business methods.
|
||||
*
|
||||
* @return A reference to the enterprise bean's home interface.
|
||||
*
|
||||
* @exception RemoteException Thrown when the method failed due to a
|
||||
* system-level failure.
|
||||
*/
|
||||
public EJBHome getEJBHome() throws RemoteException;
|
||||
|
||||
/**
|
||||
* Obtain the primary key of the EJB object.
|
||||
*
|
||||
* <p> This method can be called on an entity bean. An attempt to invoke
|
||||
* this method on a session bean will result in RemoteException.
|
||||
*
|
||||
* <p><b>Note:</b> Support for entity beans is optional as of EJB 3.2.
|
||||
*
|
||||
* @return The EJB object's primary key.
|
||||
*
|
||||
* @exception RemoteException Thrown when the method failed due to a
|
||||
* system-level failure or when invoked on a session bean.
|
||||
*/
|
||||
public Object getPrimaryKey() throws RemoteException;
|
||||
|
||||
/**
|
||||
* Remove the EJB object.
|
||||
*
|
||||
* @exception RemoteException Thrown when the method failed due to a
|
||||
* system-level failure.
|
||||
*
|
||||
* @exception RemoveException The enterprise bean or the container
|
||||
* does not allow destruction of the object.
|
||||
*/
|
||||
public void remove() throws RemoteException, RemoveException;
|
||||
|
||||
/**
|
||||
* Obtain a handle for the EJB object. The handle can be used at later
|
||||
* time to re-obtain a reference to the EJB object, possibly in a
|
||||
* different Java Virtual Machine.
|
||||
*
|
||||
* @return A handle for the EJB object.
|
||||
*
|
||||
* @exception RemoteException Thrown when the method failed due to a
|
||||
* system-level failure.
|
||||
*/
|
||||
public Handle getHandle() throws RemoteException;
|
||||
|
||||
/**
|
||||
* Test if a given EJB object is identical to the invoked EJB object.
|
||||
*
|
||||
* @param obj An object to test for identity with the invoked object.
|
||||
*
|
||||
* @return True if the given EJB object is identical to the invoked object,
|
||||
* false otherwise.
|
||||
*
|
||||
* @exception RemoteException Thrown when the method failed due to a
|
||||
* system-level failure.
|
||||
*/
|
||||
boolean isIdentical(EJBObject obj) throws RemoteException;
|
||||
}
|
||||
54
java/ql/test/stubs/ejb-3.2/javax/ejb/EnterpriseBean.java
Normal file
54
java/ql/test/stubs/ejb-3.2/javax/ejb/EnterpriseBean.java
Normal file
@@ -0,0 +1,54 @@
|
||||
/*
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
|
||||
*
|
||||
* Copyright (c) 1997-2018 Oracle and/or its affiliates. All rights reserved.
|
||||
*
|
||||
* The contents of this file are subject to the terms of either the GNU
|
||||
* General Public License Version 2 only ("GPL") or the Common Development
|
||||
* and Distribution License("CDDL") (collectively, the "License"). You
|
||||
* may not use this file except in compliance with the License. You can
|
||||
* obtain a copy of the License at
|
||||
* https://oss.oracle.com/licenses/CDDL+GPL-1.1
|
||||
* or LICENSE.txt. See the License for the specific
|
||||
* language governing permissions and limitations under the License.
|
||||
*
|
||||
* When distributing the software, include this License Header Notice in each
|
||||
* file and include the License file at LICENSE.txt.
|
||||
*
|
||||
* GPL Classpath Exception:
|
||||
* Oracle designates this particular file as subject to the "Classpath"
|
||||
* exception as provided by Oracle in the GPL Version 2 section of the License
|
||||
* file that accompanied this code.
|
||||
*
|
||||
* Modifications:
|
||||
* If applicable, add the following below the License Header, with the fields
|
||||
* enclosed by brackets [] replaced by your own identifying information:
|
||||
* "Portions Copyright [year] [name of copyright owner]"
|
||||
*
|
||||
* Contributor(s):
|
||||
* If you wish your version of this file to be governed by only the CDDL or
|
||||
* only the GPL Version 2, indicate your decision by adding "[Contributor]
|
||||
* elects to include this software in this distribution under the [CDDL or GPL
|
||||
* Version 2] license." If you don't indicate a single choice of license, a
|
||||
* recipient has the option to distribute your version of this file under
|
||||
* either the CDDL, the GPL Version 2 or to extend the choice of license to
|
||||
* its licensees as provided above. However, if you add GPL Version 2 code
|
||||
* and therefore, elected the GPL Version 2 license, then the option applies
|
||||
* only if the new code is made subject to such option by the copyright
|
||||
* holder.
|
||||
*/
|
||||
|
||||
package javax.ejb;
|
||||
|
||||
/**
|
||||
* The EnterpriseBean interface is a common superinterface for the
|
||||
* SessionBean, EntityBean and MessageDrivenBean interfaces.
|
||||
*
|
||||
* @see SessionBean
|
||||
* @see MessageDrivenBean
|
||||
* @see EntityBean
|
||||
*
|
||||
* @since EJB 1.0
|
||||
*/
|
||||
public interface EnterpriseBean extends java.io.Serializable {
|
||||
}
|
||||
220
java/ql/test/stubs/ejb-3.2/javax/ejb/EntityBean.java
Normal file
220
java/ql/test/stubs/ejb-3.2/javax/ejb/EntityBean.java
Normal file
@@ -0,0 +1,220 @@
|
||||
/*
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
|
||||
*
|
||||
* Copyright (c) 1997-2018 Oracle and/or its affiliates. All rights reserved.
|
||||
*
|
||||
* The contents of this file are subject to the terms of either the GNU
|
||||
* General Public License Version 2 only ("GPL") or the Common Development
|
||||
* and Distribution License("CDDL") (collectively, the "License"). You
|
||||
* may not use this file except in compliance with the License. You can
|
||||
* obtain a copy of the License at
|
||||
* https://oss.oracle.com/licenses/CDDL+GPL-1.1
|
||||
* or LICENSE.txt. See the License for the specific
|
||||
* language governing permissions and limitations under the License.
|
||||
*
|
||||
* When distributing the software, include this License Header Notice in each
|
||||
* file and include the License file at LICENSE.txt.
|
||||
*
|
||||
* GPL Classpath Exception:
|
||||
* Oracle designates this particular file as subject to the "Classpath"
|
||||
* exception as provided by Oracle in the GPL Version 2 section of the License
|
||||
* file that accompanied this code.
|
||||
*
|
||||
* Modifications:
|
||||
* If applicable, add the following below the License Header, with the fields
|
||||
* enclosed by brackets [] replaced by your own identifying information:
|
||||
* "Portions Copyright [year] [name of copyright owner]"
|
||||
*
|
||||
* Contributor(s):
|
||||
* If you wish your version of this file to be governed by only the CDDL or
|
||||
* only the GPL Version 2, indicate your decision by adding "[Contributor]
|
||||
* elects to include this software in this distribution under the [CDDL or GPL
|
||||
* Version 2] license." If you don't indicate a single choice of license, a
|
||||
* recipient has the option to distribute your version of this file under
|
||||
* either the CDDL, the GPL Version 2 or to extend the choice of license to
|
||||
* its licensees as provided above. However, if you add GPL Version 2 code
|
||||
* and therefore, elected the GPL Version 2 license, then the option applies
|
||||
* only if the new code is made subject to such option by the copyright
|
||||
* holder.
|
||||
*/
|
||||
|
||||
package javax.ejb;
|
||||
|
||||
import java.rmi.RemoteException;
|
||||
|
||||
|
||||
/**
|
||||
* The EntityBean interface is implemented by every entity bean
|
||||
* class. The container uses the EntityBean methods to notify the entity
|
||||
* bean instances of the instance's life cycle events.
|
||||
*
|
||||
* <p>
|
||||
* Applications written to the EJB 3.0 and later APIs should use the facilities
|
||||
* of the Java Persistence API (<code>javax.persistence</code>) to model
|
||||
* persistent entities.
|
||||
*
|
||||
* <p><b>Note:</b> Support for entity beans is optional as of EJB 3.2.
|
||||
*
|
||||
* @since EJB 1.0
|
||||
*/
|
||||
public interface EntityBean extends EnterpriseBean {
|
||||
/**
|
||||
* Set the associated entity context. The container invokes this method
|
||||
* on an instance after the instance has been created.
|
||||
*
|
||||
* <p> This method is called in an unspecified transaction context.
|
||||
*
|
||||
* @param ctx An EntityContext interface for the instance. The instance
|
||||
* should store the reference to the context in an instance variable.
|
||||
*
|
||||
* @exception EJBException Thrown by the method to indicate a failure
|
||||
* caused by a system-level error.
|
||||
*
|
||||
* @exception RemoteException This exception is defined in the method
|
||||
* signature to provide backward compatibility for enterprise beans
|
||||
* written for the EJB 1.0 specification. Enterprise beans written
|
||||
* for the EJB 1.1 specification should throw the
|
||||
* javax.ejb.EJBException instead of this exception.
|
||||
* Enterprise beans written for the EJB2.0 and higher specifications
|
||||
* must throw the javax.ejb.EJBException instead of this exception.
|
||||
*/
|
||||
public void setEntityContext(EntityContext ctx) throws EJBException,
|
||||
RemoteException;
|
||||
|
||||
/**
|
||||
* Unset the associated entity context. The container calls this method
|
||||
* before removing the instance.
|
||||
*
|
||||
* <p> This is the last method that the container invokes on the instance.
|
||||
* The Java garbage collector will eventually invoke the finalize() method
|
||||
* on the instance.
|
||||
*
|
||||
* <p> This method is called in an unspecified transaction context.
|
||||
*
|
||||
* @exception EJBException Thrown by the method to indicate a failure
|
||||
* caused by a system-level error.
|
||||
*
|
||||
* @exception RemoteException This exception is defined in the method
|
||||
* signature to provide backward compatibility for enterprise beans
|
||||
* written for the EJB 1.0 specification. Enterprise beans written
|
||||
* for the EJB 1.1 specification should throw the
|
||||
* javax.ejb.EJBException instead of this exception.
|
||||
* Enterprise beans written for the EJB2.0 and higher specifications
|
||||
* must throw the javax.ejb.EJBException instead of this exception.
|
||||
*/
|
||||
public void unsetEntityContext() throws EJBException, RemoteException;
|
||||
|
||||
/**
|
||||
* A container invokes this method before it removes the EJB object
|
||||
* that is currently associated with the instance. This method
|
||||
* is invoked when a client invokes a remove operation on the
|
||||
* entity bean's home interface or the EJB object's remote interface.
|
||||
* This method transitions the instance from the ready state to the pool
|
||||
* of available instances.
|
||||
*
|
||||
* <p> This method is called in the transaction context of the remove
|
||||
* operation.
|
||||
*
|
||||
* @exception RemoveException The enterprise Bean does not allow
|
||||
* destruction of the object.
|
||||
*
|
||||
* @exception EJBException Thrown by the method to indicate a failure
|
||||
* caused by a system-level error.
|
||||
*
|
||||
* @exception RemoteException This exception is defined in the method
|
||||
* signature to provide backward compatibility for enterprise beans
|
||||
* written for the EJB 1.0 specification. Enterprise beans written
|
||||
* for the EJB 1.1 specification should throw the
|
||||
* javax.ejb.EJBException instead of this exception.
|
||||
* Enterprise beans written for the EJB2.0 and higher specifications
|
||||
* must throw the javax.ejb.EJBException instead of this exception.
|
||||
*/
|
||||
public void ejbRemove() throws RemoveException, EJBException,
|
||||
RemoteException;
|
||||
|
||||
/**
|
||||
* A container invokes this method when the instance
|
||||
* is taken out of the pool of available instances to become associated
|
||||
* with a specific EJB object. This method transitions the instance to
|
||||
* the ready state.
|
||||
*
|
||||
* <p> This method executes in an unspecified transaction context.
|
||||
*
|
||||
* @exception EJBException Thrown by the method to indicate a failure
|
||||
* caused by a system-level error.
|
||||
*
|
||||
* @exception RemoteException This exception is defined in the method
|
||||
* signature to provide backward compatibility for enterprise beans
|
||||
* written for the EJB 1.0 specification. Enterprise beans written
|
||||
* for the EJB 1.1 specification should throw the
|
||||
* javax.ejb.EJBException instead of this exception.
|
||||
* Enterprise beans written for the EJB2.0 and higher specifications
|
||||
* must throw the javax.ejb.EJBException instead of this exception.
|
||||
*/
|
||||
public void ejbActivate() throws EJBException, RemoteException;
|
||||
|
||||
/**
|
||||
* A container invokes this method on an instance before the instance
|
||||
* becomes disassociated with a specific EJB object. After this method
|
||||
* completes, the container will place the instance into the pool of
|
||||
* available instances.
|
||||
*
|
||||
* <p> This method executes in an unspecified transaction context.
|
||||
*
|
||||
* @exception EJBException Thrown by the method to indicate a failure
|
||||
* caused by a system-level error.
|
||||
*
|
||||
* @exception RemoteException This exception is defined in the method
|
||||
* signature to provide backward compatibility for enterprise beans
|
||||
* written for the EJB 1.0 specification. Enterprise beans written
|
||||
* for the EJB 1.1 specification should throw the
|
||||
* javax.ejb.EJBException instead of this exception.
|
||||
* Enterprise beans written for the EJB2.0 and higher specifications
|
||||
* must throw the javax.ejb.EJBException instead of this exception.
|
||||
*/
|
||||
public void ejbPassivate() throws EJBException, RemoteException;
|
||||
|
||||
/**
|
||||
* A container invokes this method to instruct the
|
||||
* instance to synchronize its state by loading it state from the
|
||||
* underlying database.
|
||||
*
|
||||
* <p> This method always executes in the transaction context determined
|
||||
* by the value of the transaction attribute in the deployment descriptor.
|
||||
*
|
||||
* @exception EJBException Thrown by the method to indicate a failure
|
||||
* caused by a system-level error.
|
||||
*
|
||||
* @exception RemoteException This exception is defined in the method
|
||||
* signature to provide backward compatibility for enterprise beans
|
||||
* written for the EJB 1.0 specification. Enterprise beans written
|
||||
* for the EJB 1.1 specification should throw the
|
||||
* javax.ejb.EJBException instead of this exception.
|
||||
* Enterprise beans written for the EJB2.0 and higher specifications
|
||||
* must throw the javax.ejb.EJBException instead of this exception.
|
||||
*/
|
||||
public void ejbLoad() throws EJBException, RemoteException;
|
||||
|
||||
/**
|
||||
* A container invokes this method to instruct the
|
||||
* instance to synchronize its state by storing it to the underlying
|
||||
* database.
|
||||
*
|
||||
* <p> This method always executes in the transaction context determined
|
||||
* by the value of the transaction attribute in the deployment descriptor.
|
||||
*
|
||||
* @exception EJBException Thrown by the method to indicate a failure
|
||||
* caused by a system-level error.
|
||||
*
|
||||
* @exception RemoteException This exception is defined in the method
|
||||
* signature to provide backward compatibility for enterprise beans
|
||||
* written for the EJB 1.0 specification. Enterprise beans written
|
||||
* for the EJB 1.1 specification should throw the
|
||||
* javax.ejb.EJBException instead of this exception.
|
||||
* Enterprise beans written for the EJB2.0 and higher specifications
|
||||
* must throw the javax.ejb.EJBException instead of this exception.
|
||||
*/
|
||||
public void ejbStore() throws EJBException, RemoteException;
|
||||
}
|
||||
|
||||
|
||||
62
java/ql/test/stubs/ejb-3.2/javax/ejb/Handle.java
Normal file
62
java/ql/test/stubs/ejb-3.2/javax/ejb/Handle.java
Normal file
@@ -0,0 +1,62 @@
|
||||
/*
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
|
||||
*
|
||||
* Copyright (c) 1997-2018 Oracle and/or its affiliates. All rights reserved.
|
||||
*
|
||||
* The contents of this file are subject to the terms of either the GNU
|
||||
* General Public License Version 2 only ("GPL") or the Common Development
|
||||
* and Distribution License("CDDL") (collectively, the "License"). You
|
||||
* may not use this file except in compliance with the License. You can
|
||||
* obtain a copy of the License at
|
||||
* https://oss.oracle.com/licenses/CDDL+GPL-1.1
|
||||
* or LICENSE.txt. See the License for the specific
|
||||
* language governing permissions and limitations under the License.
|
||||
*
|
||||
* When distributing the software, include this License Header Notice in each
|
||||
* file and include the License file at LICENSE.txt.
|
||||
*
|
||||
* GPL Classpath Exception:
|
||||
* Oracle designates this particular file as subject to the "Classpath"
|
||||
* exception as provided by Oracle in the GPL Version 2 section of the License
|
||||
* file that accompanied this code.
|
||||
*
|
||||
* Modifications:
|
||||
* If applicable, add the following below the License Header, with the fields
|
||||
* enclosed by brackets [] replaced by your own identifying information:
|
||||
* "Portions Copyright [year] [name of copyright owner]"
|
||||
*
|
||||
* Contributor(s):
|
||||
* If you wish your version of this file to be governed by only the CDDL or
|
||||
* only the GPL Version 2, indicate your decision by adding "[Contributor]
|
||||
* elects to include this software in this distribution under the [CDDL or GPL
|
||||
* Version 2] license." If you don't indicate a single choice of license, a
|
||||
* recipient has the option to distribute your version of this file under
|
||||
* either the CDDL, the GPL Version 2 or to extend the choice of license to
|
||||
* its licensees as provided above. However, if you add GPL Version 2 code
|
||||
* and therefore, elected the GPL Version 2 license, then the option applies
|
||||
* only if the new code is made subject to such option by the copyright
|
||||
* holder.
|
||||
*/
|
||||
|
||||
package javax.ejb;
|
||||
|
||||
import java.rmi.RemoteException;
|
||||
|
||||
/**
|
||||
* The Handle interface is implemented by all EJB object handles. A handle
|
||||
* is an abstraction of a network reference to an EJB object. A handle is
|
||||
* intended to be used as a "robust" persistent reference to an EJB object.
|
||||
*
|
||||
* @since EJB 1.0
|
||||
*/
|
||||
public interface Handle extends java.io.Serializable {
|
||||
/**
|
||||
* Obtain the EJB object reference represented by this handle.
|
||||
*
|
||||
* @return the EJB object reference represented by this handle.
|
||||
*
|
||||
* @exception RemoteException The EJB object could not be obtained
|
||||
* because of a system-level failure.
|
||||
*/
|
||||
public EJBObject getEJBObject() throws RemoteException;
|
||||
}
|
||||
62
java/ql/test/stubs/ejb-3.2/javax/ejb/Handler.java
Normal file
62
java/ql/test/stubs/ejb-3.2/javax/ejb/Handler.java
Normal file
@@ -0,0 +1,62 @@
|
||||
/*
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
|
||||
*
|
||||
* Copyright (c) 1997-2018 Oracle and/or its affiliates. All rights reserved.
|
||||
*
|
||||
* The contents of this file are subject to the terms of either the GNU
|
||||
* General Public License Version 2 only ("GPL") or the Common Development
|
||||
* and Distribution License("CDDL") (collectively, the "License"). You
|
||||
* may not use this file except in compliance with the License. You can
|
||||
* obtain a copy of the License at
|
||||
* https://oss.oracle.com/licenses/CDDL+GPL-1.1
|
||||
* or LICENSE.txt. See the License for the specific
|
||||
* language governing permissions and limitations under the License.
|
||||
*
|
||||
* When distributing the software, include this License Header Notice in each
|
||||
* file and include the License file at LICENSE.txt.
|
||||
*
|
||||
* GPL Classpath Exception:
|
||||
* Oracle designates this particular file as subject to the "Classpath"
|
||||
* exception as provided by Oracle in the GPL Version 2 section of the License
|
||||
* file that accompanied this code.
|
||||
*
|
||||
* Modifications:
|
||||
* If applicable, add the following below the License Header, with the fields
|
||||
* enclosed by brackets [] replaced by your own identifying information:
|
||||
* "Portions Copyright [year] [name of copyright owner]"
|
||||
*
|
||||
* Contributor(s):
|
||||
* If you wish your version of this file to be governed by only the CDDL or
|
||||
* only the GPL Version 2, indicate your decision by adding "[Contributor]
|
||||
* elects to include this software in this distribution under the [CDDL or GPL
|
||||
* Version 2] license." If you don't indicate a single choice of license, a
|
||||
* recipient has the option to distribute your version of this file under
|
||||
* either the CDDL, the GPL Version 2 or to extend the choice of license to
|
||||
* its licensees as provided above. However, if you add GPL Version 2 code
|
||||
* and therefore, elected the GPL Version 2 license, then the option applies
|
||||
* only if the new code is made subject to such option by the copyright
|
||||
* holder.
|
||||
*/
|
||||
|
||||
package javax.ejb;
|
||||
|
||||
import java.rmi.RemoteException;
|
||||
|
||||
/**
|
||||
* The Handle interface is implemented by all EJB object handles. A handle
|
||||
* is an abstraction of a network reference to an EJB object. A handle is
|
||||
* intended to be used as a "robust" persistent reference to an EJB object.
|
||||
*
|
||||
* @since EJB 1.0
|
||||
*/
|
||||
public interface Handle extends java.io.Serializable {
|
||||
/**
|
||||
* Obtain the EJB object reference represented by this handle.
|
||||
*
|
||||
* @return the EJB object reference represented by this handle.
|
||||
*
|
||||
* @exception RemoteException The EJB object could not be obtained
|
||||
* because of a system-level failure.
|
||||
*/
|
||||
public EJBObject getEJBObject() throws RemoteException;
|
||||
}
|
||||
62
java/ql/test/stubs/ejb-3.2/javax/ejb/HomeHandle.java
Normal file
62
java/ql/test/stubs/ejb-3.2/javax/ejb/HomeHandle.java
Normal file
@@ -0,0 +1,62 @@
|
||||
/*
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
|
||||
*
|
||||
* Copyright (c) 1997-2018 Oracle and/or its affiliates. All rights reserved.
|
||||
*
|
||||
* The contents of this file are subject to the terms of either the GNU
|
||||
* General Public License Version 2 only ("GPL") or the Common Development
|
||||
* and Distribution License("CDDL") (collectively, the "License"). You
|
||||
* may not use this file except in compliance with the License. You can
|
||||
* obtain a copy of the License at
|
||||
* https://oss.oracle.com/licenses/CDDL+GPL-1.1
|
||||
* or LICENSE.txt. See the License for the specific
|
||||
* language governing permissions and limitations under the License.
|
||||
*
|
||||
* When distributing the software, include this License Header Notice in each
|
||||
* file and include the License file at LICENSE.txt.
|
||||
*
|
||||
* GPL Classpath Exception:
|
||||
* Oracle designates this particular file as subject to the "Classpath"
|
||||
* exception as provided by Oracle in the GPL Version 2 section of the License
|
||||
* file that accompanied this code.
|
||||
*
|
||||
* Modifications:
|
||||
* If applicable, add the following below the License Header, with the fields
|
||||
* enclosed by brackets [] replaced by your own identifying information:
|
||||
* "Portions Copyright [year] [name of copyright owner]"
|
||||
*
|
||||
* Contributor(s):
|
||||
* If you wish your version of this file to be governed by only the CDDL or
|
||||
* only the GPL Version 2, indicate your decision by adding "[Contributor]
|
||||
* elects to include this software in this distribution under the [CDDL or GPL
|
||||
* Version 2] license." If you don't indicate a single choice of license, a
|
||||
* recipient has the option to distribute your version of this file under
|
||||
* either the CDDL, the GPL Version 2 or to extend the choice of license to
|
||||
* its licensees as provided above. However, if you add GPL Version 2 code
|
||||
* and therefore, elected the GPL Version 2 license, then the option applies
|
||||
* only if the new code is made subject to such option by the copyright
|
||||
* holder.
|
||||
*/
|
||||
|
||||
package javax.ejb;
|
||||
|
||||
import java.rmi.RemoteException;
|
||||
|
||||
/**
|
||||
* The HomeHandle interface is implemented by all home object handles. A handle
|
||||
* is an abstraction of a network reference to a home object. A handle is
|
||||
* intended to be used as a "robust" persistent reference to a home object.
|
||||
*
|
||||
* @since EJB 1.1
|
||||
*/
|
||||
public interface HomeHandle extends java.io.Serializable {
|
||||
/**
|
||||
* Obtain the home object represented by this handle.
|
||||
*
|
||||
* @return the home object represented by this handle.
|
||||
*
|
||||
* @exception RemoteException The home object could not be obtained
|
||||
* because of a system-level failure.
|
||||
*/
|
||||
public EJBHome getEJBHome() throws RemoteException;
|
||||
}
|
||||
85
java/ql/test/stubs/ejb-3.2/javax/ejb/Remote.java
Normal file
85
java/ql/test/stubs/ejb-3.2/javax/ejb/Remote.java
Normal file
@@ -0,0 +1,85 @@
|
||||
/*
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
|
||||
*
|
||||
* Copyright (c) 1997-2018 Oracle and/or its affiliates. All rights reserved.
|
||||
*
|
||||
* The contents of this file are subject to the terms of either the GNU
|
||||
* General Public License Version 2 only ("GPL") or the Common Development
|
||||
* and Distribution License("CDDL") (collectively, the "License"). You
|
||||
* may not use this file except in compliance with the License. You can
|
||||
* obtain a copy of the License at
|
||||
* https://oss.oracle.com/licenses/CDDL+GPL-1.1
|
||||
* or LICENSE.txt. See the License for the specific
|
||||
* language governing permissions and limitations under the License.
|
||||
*
|
||||
* When distributing the software, include this License Header Notice in each
|
||||
* file and include the License file at LICENSE.txt.
|
||||
*
|
||||
* GPL Classpath Exception:
|
||||
* Oracle designates this particular file as subject to the "Classpath"
|
||||
* exception as provided by Oracle in the GPL Version 2 section of the License
|
||||
* file that accompanied this code.
|
||||
*
|
||||
* Modifications:
|
||||
* If applicable, add the following below the License Header, with the fields
|
||||
* enclosed by brackets [] replaced by your own identifying information:
|
||||
* "Portions Copyright [year] [name of copyright owner]"
|
||||
*
|
||||
* Contributor(s):
|
||||
* If you wish your version of this file to be governed by only the CDDL or
|
||||
* only the GPL Version 2, indicate your decision by adding "[Contributor]
|
||||
* elects to include this software in this distribution under the [CDDL or GPL
|
||||
* Version 2] license." If you don't indicate a single choice of license, a
|
||||
* recipient has the option to distribute your version of this file under
|
||||
* either the CDDL, the GPL Version 2 or to extend the choice of license to
|
||||
* its licensees as provided above. However, if you add GPL Version 2 code
|
||||
* and therefore, elected the GPL Version 2 license, then the option applies
|
||||
* only if the new code is made subject to such option by the copyright
|
||||
* holder.
|
||||
*/
|
||||
|
||||
package javax.ejb;
|
||||
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.lang.annotation.ElementType;
|
||||
|
||||
import java.lang.annotation.Target;
|
||||
import java.lang.annotation.Retention;
|
||||
|
||||
/**
|
||||
* Declares the remote business interface(s) for a session bean.
|
||||
* <p>
|
||||
* The <code>Remote</code> annotation is applied to the session bean class or remote
|
||||
* business interface to designate a remote business interface of the bean.
|
||||
* <p>
|
||||
* When used on an interface, designates that interface as a remote
|
||||
* business interface. In this case, no <code>value</code> element should
|
||||
* be provided.
|
||||
* <p>
|
||||
* The <code>Remote</code> annotation applies only to session beans and
|
||||
* their interfaces.
|
||||
*
|
||||
* @since EJB 3.0
|
||||
*/
|
||||
|
||||
@Target({ElementType.TYPE})
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
public @interface Remote {
|
||||
|
||||
/**
|
||||
* Specifies the remote business interface(s) of the bean. The <code>value</code>
|
||||
* element is specified only when the annotation is applied to the bean class.
|
||||
* It is only required to be specified if any of the following is true:
|
||||
* <ul>
|
||||
* <li>the bean class does not implement its remote business interface
|
||||
* <li>at least one of the implemented interfaces is designated as a local interface
|
||||
* <li>the bean class implements two or more interfaces and at
|
||||
* least one of the implemented interfaces is designated
|
||||
* as a remote business interface using <code>Remote</code> annotation on the interface,
|
||||
* and at least one other interface (excluding <code>java.io.Serializable</code>,
|
||||
* <code>java.io.Externalizable</code>, and any of the interfaces
|
||||
* defined by the <code>javax.ejb</code> package) has no designation.
|
||||
* </ul>
|
||||
*/
|
||||
Class[] value() default {};
|
||||
}
|
||||
68
java/ql/test/stubs/ejb-3.2/javax/ejb/RemoveException.java
Normal file
68
java/ql/test/stubs/ejb-3.2/javax/ejb/RemoveException.java
Normal file
@@ -0,0 +1,68 @@
|
||||
/*
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
|
||||
*
|
||||
* Copyright (c) 1997-2018 Oracle and/or its affiliates. All rights reserved.
|
||||
*
|
||||
* The contents of this file are subject to the terms of either the GNU
|
||||
* General Public License Version 2 only ("GPL") or the Common Development
|
||||
* and Distribution License("CDDL") (collectively, the "License"). You
|
||||
* may not use this file except in compliance with the License. You can
|
||||
* obtain a copy of the License at
|
||||
* https://oss.oracle.com/licenses/CDDL+GPL-1.1
|
||||
* or LICENSE.txt. See the License for the specific
|
||||
* language governing permissions and limitations under the License.
|
||||
*
|
||||
* When distributing the software, include this License Header Notice in each
|
||||
* file and include the License file at LICENSE.txt.
|
||||
*
|
||||
* GPL Classpath Exception:
|
||||
* Oracle designates this particular file as subject to the "Classpath"
|
||||
* exception as provided by Oracle in the GPL Version 2 section of the License
|
||||
* file that accompanied this code.
|
||||
*
|
||||
* Modifications:
|
||||
* If applicable, add the following below the License Header, with the fields
|
||||
* enclosed by brackets [] replaced by your own identifying information:
|
||||
* "Portions Copyright [year] [name of copyright owner]"
|
||||
*
|
||||
* Contributor(s):
|
||||
* If you wish your version of this file to be governed by only the CDDL or
|
||||
* only the GPL Version 2, indicate your decision by adding "[Contributor]
|
||||
* elects to include this software in this distribution under the [CDDL or GPL
|
||||
* Version 2] license." If you don't indicate a single choice of license, a
|
||||
* recipient has the option to distribute your version of this file under
|
||||
* either the CDDL, the GPL Version 2 or to extend the choice of license to
|
||||
* its licensees as provided above. However, if you add GPL Version 2 code
|
||||
* and therefore, elected the GPL Version 2 license, then the option applies
|
||||
* only if the new code is made subject to such option by the copyright
|
||||
* holder.
|
||||
*/
|
||||
|
||||
package javax.ejb;
|
||||
|
||||
/**
|
||||
* The RemoveException is thrown at an attempt to remove an
|
||||
* EJB object or local EJB object when the enterprise bean or the
|
||||
* container does not allow the EJB object to be removed.
|
||||
*
|
||||
* @since EJB 1.0
|
||||
*/
|
||||
public class RemoveException extends java.lang.Exception {
|
||||
|
||||
private static final long serialVersionUID = -4581849053220157910L;
|
||||
|
||||
/**
|
||||
* Constructs an RemoveException with no detail message.
|
||||
*/
|
||||
public RemoveException() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs an RemoveException with the specified
|
||||
* detail message.
|
||||
*/
|
||||
public RemoveException(String message) {
|
||||
super(message);
|
||||
}
|
||||
}
|
||||
|
||||
144
java/ql/test/stubs/ejb-3.2/javax/ejb/SessionBean.java
Normal file
144
java/ql/test/stubs/ejb-3.2/javax/ejb/SessionBean.java
Normal file
@@ -0,0 +1,144 @@
|
||||
/*
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
|
||||
*
|
||||
* Copyright (c) 1997-2018 Oracle and/or its affiliates. All rights reserved.
|
||||
*
|
||||
* The contents of this file are subject to the terms of either the GNU
|
||||
* General Public License Version 2 only ("GPL") or the Common Development
|
||||
* and Distribution License("CDDL") (collectively, the "License"). You
|
||||
* may not use this file except in compliance with the License. You can
|
||||
* obtain a copy of the License at
|
||||
* https://oss.oracle.com/licenses/CDDL+GPL-1.1
|
||||
* or LICENSE.txt. See the License for the specific
|
||||
* language governing permissions and limitations under the License.
|
||||
*
|
||||
* When distributing the software, include this License Header Notice in each
|
||||
* file and include the License file at LICENSE.txt.
|
||||
*
|
||||
* GPL Classpath Exception:
|
||||
* Oracle designates this particular file as subject to the "Classpath"
|
||||
* exception as provided by Oracle in the GPL Version 2 section of the License
|
||||
* file that accompanied this code.
|
||||
*
|
||||
* Modifications:
|
||||
* If applicable, add the following below the License Header, with the fields
|
||||
* enclosed by brackets [] replaced by your own identifying information:
|
||||
* "Portions Copyright [year] [name of copyright owner]"
|
||||
*
|
||||
* Contributor(s):
|
||||
* If you wish your version of this file to be governed by only the CDDL or
|
||||
* only the GPL Version 2, indicate your decision by adding "[Contributor]
|
||||
* elects to include this software in this distribution under the [CDDL or GPL
|
||||
* Version 2] license." If you don't indicate a single choice of license, a
|
||||
* recipient has the option to distribute your version of this file under
|
||||
* either the CDDL, the GPL Version 2 or to extend the choice of license to
|
||||
* its licensees as provided above. However, if you add GPL Version 2 code
|
||||
* and therefore, elected the GPL Version 2 license, then the option applies
|
||||
* only if the new code is made subject to such option by the copyright
|
||||
* holder.
|
||||
*/
|
||||
|
||||
package javax.ejb;
|
||||
|
||||
import java.rmi.RemoteException;
|
||||
|
||||
/**
|
||||
* The SessionBean interface defines methods that the EJB container uses
|
||||
* to notify a session bean instance of the instance's life cycle events.
|
||||
* <p>
|
||||
* As of EJB 3.0 it is no longer required that a session bean class
|
||||
* implement this interface.
|
||||
*
|
||||
* @since EJB 1.0
|
||||
*/
|
||||
public interface SessionBean extends EnterpriseBean {
|
||||
/**
|
||||
* Set the associated session context. The container calls this method
|
||||
* after the instance creation.
|
||||
*
|
||||
* <p> The session bean instance should store the reference to the
|
||||
* context object in an instance variable.
|
||||
*
|
||||
* <p> This method is called with no transaction context.
|
||||
*
|
||||
* @param ctx A SessionContext interface for the instance.
|
||||
*
|
||||
* @exception EJBException Thrown by the method to indicate a failure
|
||||
* caused by a system-level error.
|
||||
*
|
||||
* @exception RemoteException This exception is defined in the method
|
||||
* signature to provide backward compatibility for applications written
|
||||
* for the EJB 1.0 specification. Enterprise beans written for the
|
||||
* EJB 1.1 specification should throw the
|
||||
* javax.ejb.EJBException instead of this exception.
|
||||
* Enterprise beans written for the EJB2.0 and higher specifications
|
||||
* must throw the javax.ejb.EJBException instead of this exception.
|
||||
*/
|
||||
void setSessionContext(SessionContext ctx) throws EJBException,
|
||||
RemoteException;
|
||||
|
||||
/**
|
||||
* A container invokes this method before it ends the life of the session
|
||||
* object. This happens as a result of a client's invoking a remove
|
||||
* operation, or when a container decides to terminate the session object
|
||||
* after a timeout.
|
||||
*
|
||||
* <p> This method is called with no transaction context.
|
||||
*
|
||||
* @exception EJBException Thrown by the method to indicate a failure
|
||||
* caused by a system-level error.
|
||||
*
|
||||
* @exception RemoteException This exception is defined in the method
|
||||
* signature to provide backward compatibility for enterprise beans
|
||||
* written for the EJB 1.0 specification. Enterprise beans written
|
||||
* for the EJB 1.1 specification should throw the
|
||||
* javax.ejb.EJBException instead of this exception.
|
||||
* Enterprise beans written for the EJB2.0 and higher specifications
|
||||
* must throw the javax.ejb.EJBException instead of this exception.
|
||||
*/
|
||||
void ejbRemove() throws EJBException, RemoteException;
|
||||
|
||||
/**
|
||||
* The activate method is called when a stateful session bean instance is activated
|
||||
* from its "passive" state. The instance should acquire any resource
|
||||
* that it has released earlier in the <code>ejbPassivate</code> method.
|
||||
*
|
||||
* <p> This method is called with no transaction context.
|
||||
*
|
||||
* @exception EJBException Thrown by the method to indicate a failure
|
||||
* caused by a system-level error.
|
||||
*
|
||||
* @exception RemoteException This exception is defined in the method
|
||||
* signature to provide backward compatibility for enterprise beans
|
||||
* written for the EJB 1.0 specification. Enterprise beans written
|
||||
* for the EJB 1.1 specification should throw the
|
||||
* javax.ejb.EJBException instead of this exception.
|
||||
* Enterprise beans written for the EJB2.0 and higher specifications
|
||||
* must throw the javax.ejb.EJBException instead of this exception.
|
||||
*/
|
||||
void ejbActivate() throws EJBException, RemoteException;
|
||||
|
||||
/**
|
||||
* The passivate method is called before a stateful session bean instance enters
|
||||
* the "passive" state. The instance should release any resources that
|
||||
* it can re-acquire later in the <code>ejbActivate</code> method.
|
||||
*
|
||||
* <p> After the passivate method completes, the instance must be
|
||||
* in a state that allows the container to use the Java Serialization
|
||||
* protocol to externalize and store away the instance's state.
|
||||
*
|
||||
* <p> This method is called with no transaction context.
|
||||
*
|
||||
* @exception EJBException Thrown by the method to indicate a failure
|
||||
* caused by a system-level error.
|
||||
*
|
||||
* @exception RemoteException This exception is defined in the method
|
||||
* signature to provide backward compatibility for enterprise beans
|
||||
* written for the EJB 1.0 specification. Enterprise beans written
|
||||
* for the EJB 1.1 specification should throw the
|
||||
* javax.ejb.EJBException instead of this exception.
|
||||
* Enterprise beans written for the EJB2.0 and higher specifications
|
||||
* must throw the javax.ejb.EJBException instead of this exception.
|
||||
*/
|
||||
void ejbPassivate() throws EJBException, RemoteException;
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user