|
From: <ls...@us...> - 2007-06-10 12:22:24
|
Revision: 3239
http://jnode.svn.sourceforge.net/jnode/?rev=3239&view=rev
Author: lsantha
Date: 2007-06-10 05:22:23 -0700 (Sun, 10 Jun 2007)
Log Message:
-----------
javac integration from openjdk in progress.
Added Paths:
-----------
trunk/core/src/openjdk/javax/javax/annotation/
trunk/core/src/openjdk/javax/javax/annotation/Generated.java
trunk/core/src/openjdk/javax/javax/annotation/PostConstruct.java
trunk/core/src/openjdk/javax/javax/annotation/PreDestroy.java
trunk/core/src/openjdk/javax/javax/annotation/Resource.java
trunk/core/src/openjdk/javax/javax/annotation/Resources.java
trunk/core/src/openjdk/javax/javax/annotation/processing/
trunk/core/src/openjdk/javax/javax/annotation/processing/AbstractProcessor.java
trunk/core/src/openjdk/javax/javax/annotation/processing/Completion.java
trunk/core/src/openjdk/javax/javax/annotation/processing/Completions.java
trunk/core/src/openjdk/javax/javax/annotation/processing/Filer.java
trunk/core/src/openjdk/javax/javax/annotation/processing/FilerException.java
trunk/core/src/openjdk/javax/javax/annotation/processing/Messager.java
trunk/core/src/openjdk/javax/javax/annotation/processing/ProcessingEnvironment.java
trunk/core/src/openjdk/javax/javax/annotation/processing/Processor.java
trunk/core/src/openjdk/javax/javax/annotation/processing/RoundEnvironment.java
trunk/core/src/openjdk/javax/javax/annotation/processing/SupportedAnnotationTypes.java
trunk/core/src/openjdk/javax/javax/annotation/processing/SupportedOptions.java
trunk/core/src/openjdk/javax/javax/annotation/processing/SupportedSourceVersion.java
trunk/core/src/openjdk/javax/javax/annotation/processing/package-info.java
trunk/core/src/openjdk/javax/javax/lang/
trunk/core/src/openjdk/javax/javax/lang/model/
trunk/core/src/openjdk/javax/javax/lang/model/SourceVersion.java
trunk/core/src/openjdk/javax/javax/lang/model/element/
trunk/core/src/openjdk/javax/javax/lang/model/element/AnnotationMirror.java
trunk/core/src/openjdk/javax/javax/lang/model/element/AnnotationValue.java
trunk/core/src/openjdk/javax/javax/lang/model/element/AnnotationValueVisitor.java
trunk/core/src/openjdk/javax/javax/lang/model/element/Element.java
trunk/core/src/openjdk/javax/javax/lang/model/element/ElementKind.java
trunk/core/src/openjdk/javax/javax/lang/model/element/ElementVisitor.java
trunk/core/src/openjdk/javax/javax/lang/model/element/ExecutableElement.java
trunk/core/src/openjdk/javax/javax/lang/model/element/Modifier.java
trunk/core/src/openjdk/javax/javax/lang/model/element/Name.java
trunk/core/src/openjdk/javax/javax/lang/model/element/NestingKind.java
trunk/core/src/openjdk/javax/javax/lang/model/element/PackageElement.java
trunk/core/src/openjdk/javax/javax/lang/model/element/TypeElement.java
trunk/core/src/openjdk/javax/javax/lang/model/element/TypeParameterElement.java
trunk/core/src/openjdk/javax/javax/lang/model/element/UnknownAnnotationValueException.java
trunk/core/src/openjdk/javax/javax/lang/model/element/UnknownElementException.java
trunk/core/src/openjdk/javax/javax/lang/model/element/VariableElement.java
trunk/core/src/openjdk/javax/javax/lang/model/element/package-info.java
trunk/core/src/openjdk/javax/javax/lang/model/overview.html
trunk/core/src/openjdk/javax/javax/lang/model/package-info.java
trunk/core/src/openjdk/javax/javax/lang/model/type/
trunk/core/src/openjdk/javax/javax/lang/model/type/ArrayType.java
trunk/core/src/openjdk/javax/javax/lang/model/type/DeclaredType.java
trunk/core/src/openjdk/javax/javax/lang/model/type/ErrorType.java
trunk/core/src/openjdk/javax/javax/lang/model/type/ExecutableType.java
trunk/core/src/openjdk/javax/javax/lang/model/type/MirroredTypeException.java
trunk/core/src/openjdk/javax/javax/lang/model/type/MirroredTypesException.java
trunk/core/src/openjdk/javax/javax/lang/model/type/NoType.java
trunk/core/src/openjdk/javax/javax/lang/model/type/NullType.java
trunk/core/src/openjdk/javax/javax/lang/model/type/PrimitiveType.java
trunk/core/src/openjdk/javax/javax/lang/model/type/ReferenceType.java
trunk/core/src/openjdk/javax/javax/lang/model/type/TypeKind.java
trunk/core/src/openjdk/javax/javax/lang/model/type/TypeMirror.java
trunk/core/src/openjdk/javax/javax/lang/model/type/TypeVariable.java
trunk/core/src/openjdk/javax/javax/lang/model/type/TypeVisitor.java
trunk/core/src/openjdk/javax/javax/lang/model/type/UnknownTypeException.java
trunk/core/src/openjdk/javax/javax/lang/model/type/WildcardType.java
trunk/core/src/openjdk/javax/javax/lang/model/type/package-info.java
trunk/core/src/openjdk/javax/javax/lang/model/util/
trunk/core/src/openjdk/javax/javax/lang/model/util/AbstractAnnotationValueVisitor6.java
trunk/core/src/openjdk/javax/javax/lang/model/util/AbstractElementVisitor6.java
trunk/core/src/openjdk/javax/javax/lang/model/util/AbstractTypeVisitor6.java
trunk/core/src/openjdk/javax/javax/lang/model/util/ElementFilter.java
trunk/core/src/openjdk/javax/javax/lang/model/util/ElementKindVisitor6.java
trunk/core/src/openjdk/javax/javax/lang/model/util/ElementScanner6.java
trunk/core/src/openjdk/javax/javax/lang/model/util/Elements.java
trunk/core/src/openjdk/javax/javax/lang/model/util/SimpleAnnotationValueVisitor6.java
trunk/core/src/openjdk/javax/javax/lang/model/util/SimpleElementVisitor6.java
trunk/core/src/openjdk/javax/javax/lang/model/util/SimpleTypeVisitor6.java
trunk/core/src/openjdk/javax/javax/lang/model/util/TypeKindVisitor6.java
trunk/core/src/openjdk/javax/javax/lang/model/util/Types.java
trunk/core/src/openjdk/javax/javax/lang/model/util/package-info.java
trunk/core/src/openjdk/javax/javax/tools/
trunk/core/src/openjdk/javax/javax/tools/Diagnostic.java
trunk/core/src/openjdk/javax/javax/tools/DiagnosticCollector.java
trunk/core/src/openjdk/javax/javax/tools/DiagnosticListener.java
trunk/core/src/openjdk/javax/javax/tools/FileObject.java
trunk/core/src/openjdk/javax/javax/tools/ForwardingFileObject.java
trunk/core/src/openjdk/javax/javax/tools/ForwardingJavaFileManager.java
trunk/core/src/openjdk/javax/javax/tools/ForwardingJavaFileObject.java
trunk/core/src/openjdk/javax/javax/tools/JavaCompiler.java
trunk/core/src/openjdk/javax/javax/tools/JavaFileManager.java
trunk/core/src/openjdk/javax/javax/tools/JavaFileObject.java
trunk/core/src/openjdk/javax/javax/tools/OptionChecker.java
trunk/core/src/openjdk/javax/javax/tools/SimpleJavaFileObject.java
trunk/core/src/openjdk/javax/javax/tools/StandardJavaFileManager.java
trunk/core/src/openjdk/javax/javax/tools/StandardLocation.java
trunk/core/src/openjdk/javax/javax/tools/Tool.java
trunk/core/src/openjdk/javax/javax/tools/ToolProvider.java
trunk/core/src/openjdk/javax/javax/tools/overview.html
trunk/core/src/openjdk/javax/javax/tools/package-info.java
Added: trunk/core/src/openjdk/javax/javax/annotation/Generated.java
===================================================================
--- trunk/core/src/openjdk/javax/javax/annotation/Generated.java (rev 0)
+++ trunk/core/src/openjdk/javax/javax/annotation/Generated.java 2007-06-10 12:22:23 UTC (rev 3239)
@@ -0,0 +1,73 @@
+/*
+ * Copyright 2005-2006 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+//Copyright Sun Microsystems Inc. 2004 - 2005.
+
+package javax.annotation;
+import java.lang.annotation.*;
+import static java.lang.annotation.ElementType.*;
+import static java.lang.annotation.RetentionPolicy.*;
+
+/**
+ * The Generated annoation is used to mark source code that has been generated.
+ * It can also be used to differentiate user written code from generated code
+ * in a single file. When used, the value element must have the name of the
+ * code generator. The recommended convention is to use the fully qualified
+ * name of the code generator in the value field .
+ * For example: com.company.package.classname.
+ * The date element is used to indicate the date the source was generated.
+ * The date element must follow the ISO 8601 standard. For example the date
+ * element would have the following value 2001-07-04T12:08:56.235-0700
+ * which represents 2001-07-04 12:08:56 local time in the U.S. Pacific
+ * Time time zone.
+ * The comment element is a place holder for any comments that the code
+ * generator may want to include in the generated code.
+ *
+ * @since Common Annotations 1.0
+ */
+
+@Documented
+@Retention(SOURCE)
+@Target({PACKAGE, TYPE, ANNOTATION_TYPE, METHOD, CONSTRUCTOR, FIELD,
+ LOCAL_VARIABLE, PARAMETER})
+public @interface Generated {
+ /**
+ * This is used by the code generator to mark the generated classes
+ * and methods.
+ */
+ String[] value();
+
+ /**
+ * Date when the source was generated.
+ */
+ String date() default "";
+
+ /**
+ * A place holder for any comments that the code generator may want to
+ * include in the generated code.
+ */
+ String comments() default "";
+}
+
Added: trunk/core/src/openjdk/javax/javax/annotation/PostConstruct.java
===================================================================
--- trunk/core/src/openjdk/javax/javax/annotation/PostConstruct.java (rev 0)
+++ trunk/core/src/openjdk/javax/javax/annotation/PostConstruct.java 2007-06-10 12:22:23 UTC (rev 3239)
@@ -0,0 +1,64 @@
+/*
+ * Copyright 2005-2006 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+//Copyright Sun Microsystems Inc. 2004 - 2005.
+
+package javax.annotation;
+
+import java.lang.annotation.*;
+import static java.lang.annotation.ElementType.*;
+import static java.lang.annotation.RetentionPolicy.*;
+
+/**
+ * The PostConstruct annotation is used on a method that needs to be executed
+ * after dependency injection is done to perform any initialization. This
+ * method MUST be invoked before the class is put into service. This
+ * annotation MUST be supported on all classes that support dependency
+ * injection. The method annotated with PostConstruct MUST be invoked even
+ * if the class does not request any resources to be injected. Only one
+ * method can be annotated with this annotation. The method on which the
+ * PostConstruct annotation is applied MUST fulfill all of the following
+ * criteria -
+- The method MUST NOT have any parameters except in the case of EJB
+ * interceptors in which case it takes an InvocationC ontext object as
+ * defined by the EJB specification.
+ * - The return type of the method MUST be void.
+ * - The method MUST NOT throw a checked exception.
+ * - The method on which PostConstruct is applied MAY be public, protected,
+ * package private or private.
+ * - The method MUST NOT be static except for the application client.
+ * - The method MAY be final.
+ * - If the method throws an unchecked exception the class MUST NOT be put into
+ * service except in the case of EJBs where the EJB can handle exceptions and
+ * even recover from them.
+ * @since Common Annotations 1.0
+ * @see javax.annotation.PreDestroy
+ * @see javax.annotation.Resource
+ */
+@Documented
+@Retention (RUNTIME)
+@Target(METHOD)
+public @interface PostConstruct {
+}
Added: trunk/core/src/openjdk/javax/javax/annotation/PreDestroy.java
===================================================================
--- trunk/core/src/openjdk/javax/javax/annotation/PreDestroy.java (rev 0)
+++ trunk/core/src/openjdk/javax/javax/annotation/PreDestroy.java 2007-06-10 12:22:23 UTC (rev 3239)
@@ -0,0 +1,64 @@
+/*
+ * Copyright 2005-2006 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+//Copyright Sun Microsystems Inc. 2004 - 2005.
+
+package javax.annotation;
+
+import java.lang.annotation.*;
+import static java.lang.annotation.ElementType.*;
+import static java.lang.annotation.RetentionPolicy.*;
+
+/**
+ * The PreDestroy annotation is used on methods as a callback notification to
+ * signal that the instance is in the process of being removed by the
+ * container. The method annotated with PreDestroy is typically used to
+ * release resources that it has been holding. This annotation MUST be
+ * supported by all container managed objects that support PostConstruct
+ * except the application client container in Java EE 5. The method on which
+ * the PreDestroy annotation is applied MUST fulfill all of the following
+ * criteria -
+ * - The method MUST NOT have any parameters except in the case of EJB
+ * interceptors in which case it takes an InvocationContext object as defined
+ * by the EJB specification.
+ * - The return type of the method MUST be void.
+ * - The method MUST NOT throw a checked exception.
+ * - The method on which PreDestroy is applied MAY be public, protected,
+ * package private or private.
+ * - The method MUST NOT be static.
+ * - The method MAY be final.
+ * - If the method throws an unchecked exception it is ignored except in the
+ * case of EJBs where the EJB can handle exceptions.
+ *
+ * @see javax.annotation.PostConstruct
+ * @see javax.annotation.Resource
+ * @since Common Annotations 1.0
+ */
+
+@Documented
+@Retention (RUNTIME)
+@Target(METHOD)
+public @interface PreDestroy {
+}
Added: trunk/core/src/openjdk/javax/javax/annotation/Resource.java
===================================================================
--- trunk/core/src/openjdk/javax/javax/annotation/Resource.java (rev 0)
+++ trunk/core/src/openjdk/javax/javax/annotation/Resource.java 2007-06-10 12:22:23 UTC (rev 3239)
@@ -0,0 +1,125 @@
+/*
+ * Copyright 2005-2006 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+//Copyright Sun Microsystems Inc. 2004 - 2005.
+
+package javax.annotation;
+
+import java.lang.annotation.*;
+import static java.lang.annotation.ElementType.*;
+import static java.lang.annotation.RetentionPolicy.*;
+
+/**
+ * The Resource annotation marks a resource that is needed
+ * by the application. This annotation may be applied to an
+ * application component class, or to fields or methods of the
+ * component class. When the annotation is applied to a
+ * field or method, the container will inject an instance
+ * of the requested resource into the application component
+ * when the component is initialized. If the annotation is
+ * applied to the component class, the annotation declares a
+ * resource that the application will look up at runtime. <p>
+ *
+ * Even though this annotation is not marked Inherited, deployment
+ * tools are required to examine all superclasses of any component
+ * class to discover all uses of this annotation in all superclasses.
+ * All such annotation instances specify resources that are needed
+ * by the application component. Note that this annotation may
+ * appear on private fields and methods of superclasses; the container
+ * is required to perform injection in these cases as well.
+ *
+ * @since Common Annotations 1.0
+ */
+@Target({TYPE, FIELD, METHOD})
+@Retention(RUNTIME)
+public @interface Resource {
+ /**
+ * The JNDI name of the resource. For field annotations,
+ * the default is the field name. For method annotations,
+ * the default is the JavaBeans property name corresponding
+ * to the method. For class annotations, there is no default
+ * and this must be specified.
+ */
+ String name() default "";
+
+ /**
+ * The Java type of the resource. For field annotations,
+ * the default is the type of the field. For method annotations,
+ * the default is the type of the JavaBeans property.
+ * For class annotations, there is no default and this must be
+ * specified.
+ */
+ Class type() default java.lang.Object.class;
+
+ /**
+ * The two possible authentication types for a resource.
+ */
+ enum AuthenticationType {
+ CONTAINER,
+ APPLICATION
+ }
+
+ /**
+ * The authentication type to use for this resource.
+ * This may be specified for resources representing a
+ * connection factory of any supported type, and must
+ * not be specified for resources of other types.
+ */
+ AuthenticationType authenticationType() default AuthenticationType.CONTAINER;
+
+ /**
+ * Indicates whether this resource can be shared between
+ * this component and other components.
+ * This may be specified for resources representing a
+ * connection factory of any supported type, and must
+ * not be specified for resources of other types.
+ */
+ boolean shareable() default true;
+
+ /**
+ * A product specific name that this resource should be mapped to.
+ * The name of this resource, as defined by the <code>name</code>
+ * element or defaulted, is a name that is local to the application
+ * component using the resource. (It's a name in the JNDI
+ * <code>java:comp/env</code> namespace.) Many application servers
+ * provide a way to map these local names to names of resources
+ * known to the application server. This mapped name is often a
+ * <i>global</i> 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 "";
+
+ /**
+ * Description of this resource. The description is expected
+ * to be in the default language of the system on which the
+ * application is deployed. The description can be presented
+ * to the Deployer to help in choosing the correct resource.
+ */
+ String description() default "";
+}
Added: trunk/core/src/openjdk/javax/javax/annotation/Resources.java
===================================================================
--- trunk/core/src/openjdk/javax/javax/annotation/Resources.java (rev 0)
+++ trunk/core/src/openjdk/javax/javax/annotation/Resources.java 2007-06-10 12:22:23 UTC (rev 3239)
@@ -0,0 +1,48 @@
+/*
+ * Copyright 2005-2006 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+//Copyright Sun Microsystems Inc. 2004 - 2005.
+
+package javax.annotation;
+import java.lang.annotation.*;
+import static java.lang.annotation.ElementType.*;
+import static java.lang.annotation.RetentionPolicy.*;
+
+/**
+ * This class is used to allow multiple resources declarations.
+ *
+ * @see javax.annotation.Resource
+ * @since Common Annotations 1.0
+ */
+
+@Documented
+@Retention(RUNTIME)
+@Target(TYPE)
+public @interface Resources {
+ /**
+ * Array used for multiple resource declarations.
+ */
+ Resource[] value();
+}
Added: trunk/core/src/openjdk/javax/javax/annotation/processing/AbstractProcessor.java
===================================================================
--- trunk/core/src/openjdk/javax/javax/annotation/processing/AbstractProcessor.java (rev 0)
+++ trunk/core/src/openjdk/javax/javax/annotation/processing/AbstractProcessor.java 2007-06-10 12:22:23 UTC (rev 3239)
@@ -0,0 +1,196 @@
+/*
+ * Copyright 2005-2006 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package javax.annotation.processing;
+
+import java.util.Set;
+import java.util.HashSet;
+import java.util.Collections;
+import javax.lang.model.element.*;
+import javax.lang.model.SourceVersion;
+import javax.tools.Diagnostic;
+
+/**
+ * An abstract annotation processor designed to be a convenient
+ * superclass for most concrete annotation processors. This class
+ * examines annotation values to compute the {@linkplain
+ * #getSupportedOptions options}, {@linkplain
+ * #getSupportedAnnotationTypes annotations}, and {@linkplain
+ * #getSupportedSourceVersion source version} supported by its
+ * subtypes.
+ *
+ * <p>The getter methods may {@linkplain Messager#printMessage issue
+ * warnings} about noteworthy conditions using the facilities available
+ * after the processor has been {@linkplain #isInitialized
+ * initialized}.
+ *
+ * <p>Subclasses are free to override the implementation and
+ * specification of any of the methods in this class as long as the
+ * general {@link javax.annotation.processing.Processor Processor}
+ * contract for that method is obeyed.
+ *
+ * @author Joseph D. Darcy
+ * @author Scott Seligman
+ * @author Peter von der Ahé
+ * @version 1.14 07/05/05
+ * @since 1.6
+ */
+public abstract class AbstractProcessor implements Processor {
+ /**
+ * Processing environment providing by the tool framework.
+ */
+ protected ProcessingEnvironment processingEnv;
+ private boolean initialized = false;
+
+ /**
+ * Constructor for subclasses to call.
+ */
+ protected AbstractProcessor() {}
+
+ /**
+ * If the processor class is annotated with {@link
+ * SupportedOptions}, return an unmodifiable set with the same set
+ * of strings as the annotation. If the class is not so
+ * annotated, an empty set is returned.
+ *
+ * @return the options recognized by this processor, or an empty
+ * set if none
+ */
+ public Set<String> getSupportedOptions() {
+ SupportedOptions so = this.getClass().getAnnotation(SupportedOptions.class);
+ if (so == null)
+ return Collections.emptySet();
+ else
+ return arrayToSet(so.value());
+ }
+
+ /**
+ * If the processor class is annotated with {@link
+ * SupportedAnnotationTypes}, return an unmodifiable set with the
+ * same set of strings as the annotation. If the class is not so
+ * annotated, an empty set is returned.
+ *
+ * @return the names of the annotation types supported by this
+ * processor, or an empty set if none
+ */
+ public Set<String> getSupportedAnnotationTypes() {
+ SupportedAnnotationTypes sat = this.getClass().getAnnotation(SupportedAnnotationTypes.class);
+ if (sat == null) {
+ if (isInitialized())
+ processingEnv.getMessager().printMessage(Diagnostic.Kind.WARNING,
+ "No SupportedAnnotationTypes annotation " +
+ "found on " + this.getClass().getName() +
+ ", returning an empty set.");
+ return Collections.emptySet();
+ }
+ else
+ return arrayToSet(sat.value());
+ }
+
+ /**
+ * If the processor class is annotated with {@link
+ * SupportedSourceVersion}, return the source version in the
+ * annotation. If the class is not so annotated, {@link
+ * SourceVersion#RELEASE_6} is returned.
+ *
+ * @return the latest source version supported by this processor
+ */
+ public SourceVersion getSupportedSourceVersion() {
+ SupportedSourceVersion ssv = this.getClass().getAnnotation(SupportedSourceVersion.class);
+ SourceVersion sv = null;
+ if (ssv == null) {
+ sv = SourceVersion.RELEASE_6;
+ if (isInitialized())
+ processingEnv.getMessager().printMessage(Diagnostic.Kind.WARNING,
+ "No SupportedSourceVersion annotation " +
+ "found on " + this.getClass().getName() +
+ ", returning " + sv + ".");
+ } else
+ sv = ssv.value();
+ return sv;
+ }
+
+
+ /**
+ * Initializes the processor with the processing environment by
+ * setting the {@code processingEnv} field to th...
[truncated message content] |
|
From: <ls...@us...> - 2007-06-21 19:31:59
|
Revision: 3283
http://jnode.svn.sourceforge.net/jnode/?rev=3283&view=rev
Author: lsantha
Date: 2007-06-21 12:31:53 -0700 (Thu, 21 Jun 2007)
Log Message:
-----------
Openjdk integration.
Added Paths:
-----------
trunk/core/src/openjdk/javax/javax/sql/
trunk/core/src/openjdk/javax/javax/sql/CommonDataSource.java
trunk/core/src/openjdk/javax/javax/sql/ConnectionEvent.java
trunk/core/src/openjdk/javax/javax/sql/ConnectionEventListener.java
trunk/core/src/openjdk/javax/javax/sql/ConnectionPoolDataSource.java
trunk/core/src/openjdk/javax/javax/sql/DataSource.java
trunk/core/src/openjdk/javax/javax/sql/PooledConnection.java
trunk/core/src/openjdk/javax/javax/sql/RowSet.java
trunk/core/src/openjdk/javax/javax/sql/RowSetEvent.java
trunk/core/src/openjdk/javax/javax/sql/RowSetInternal.java
trunk/core/src/openjdk/javax/javax/sql/RowSetListener.java
trunk/core/src/openjdk/javax/javax/sql/RowSetMetaData.java
trunk/core/src/openjdk/javax/javax/sql/RowSetReader.java
trunk/core/src/openjdk/javax/javax/sql/RowSetWriter.java
trunk/core/src/openjdk/javax/javax/sql/StatementEvent.java
trunk/core/src/openjdk/javax/javax/sql/StatementEventListener.java
trunk/core/src/openjdk/javax/javax/sql/XAConnection.java
trunk/core/src/openjdk/javax/javax/sql/XADataSource.java
trunk/core/src/openjdk/javax/javax/sql/package.html
trunk/core/src/openjdk/javax/javax/sql/rowset/
trunk/core/src/openjdk/javax/javax/sql/rowset/BaseRowSet.java
trunk/core/src/openjdk/javax/javax/sql/rowset/CachedRowSet.java
trunk/core/src/openjdk/javax/javax/sql/rowset/FilteredRowSet.java
trunk/core/src/openjdk/javax/javax/sql/rowset/JdbcRowSet.java
trunk/core/src/openjdk/javax/javax/sql/rowset/JoinRowSet.java
trunk/core/src/openjdk/javax/javax/sql/rowset/Joinable.java
trunk/core/src/openjdk/javax/javax/sql/rowset/Predicate.java
trunk/core/src/openjdk/javax/javax/sql/rowset/RowSetMetaDataImpl.java
trunk/core/src/openjdk/javax/javax/sql/rowset/RowSetWarning.java
trunk/core/src/openjdk/javax/javax/sql/rowset/WebRowSet.java
trunk/core/src/openjdk/javax/javax/sql/rowset/package.html
trunk/core/src/openjdk/javax/javax/sql/rowset/rowset.properties
trunk/core/src/openjdk/javax/javax/sql/rowset/serial/
trunk/core/src/openjdk/javax/javax/sql/rowset/serial/SQLInputImpl.java
trunk/core/src/openjdk/javax/javax/sql/rowset/serial/SQLOutputImpl.java
trunk/core/src/openjdk/javax/javax/sql/rowset/serial/SerialArray.java
trunk/core/src/openjdk/javax/javax/sql/rowset/serial/SerialBlob.java
trunk/core/src/openjdk/javax/javax/sql/rowset/serial/SerialClob.java
trunk/core/src/openjdk/javax/javax/sql/rowset/serial/SerialDatalink.java
trunk/core/src/openjdk/javax/javax/sql/rowset/serial/SerialException.java
trunk/core/src/openjdk/javax/javax/sql/rowset/serial/SerialJavaObject.java
trunk/core/src/openjdk/javax/javax/sql/rowset/serial/SerialRef.java
trunk/core/src/openjdk/javax/javax/sql/rowset/serial/SerialStruct.java
trunk/core/src/openjdk/javax/javax/sql/rowset/serial/package.html
trunk/core/src/openjdk/javax/javax/sql/rowset/spi/
trunk/core/src/openjdk/javax/javax/sql/rowset/spi/SyncFactory.java
trunk/core/src/openjdk/javax/javax/sql/rowset/spi/SyncFactoryException.java
trunk/core/src/openjdk/javax/javax/sql/rowset/spi/SyncProvider.java
trunk/core/src/openjdk/javax/javax/sql/rowset/spi/SyncProviderException.java
trunk/core/src/openjdk/javax/javax/sql/rowset/spi/SyncResolver.java
trunk/core/src/openjdk/javax/javax/sql/rowset/spi/TransactionalWriter.java
trunk/core/src/openjdk/javax/javax/sql/rowset/spi/XmlReader.java
trunk/core/src/openjdk/javax/javax/sql/rowset/spi/XmlWriter.java
trunk/core/src/openjdk/javax/javax/sql/rowset/spi/package.html
trunk/core/src/openjdk/javax/javax/sql/rowset/sqlxml.xsd
trunk/core/src/openjdk/javax/javax/sql/rowset/webrowset.xsd
trunk/core/src/openjdk/javax/javax/transaction/
trunk/core/src/openjdk/javax/javax/transaction/InvalidTransactionException.java
trunk/core/src/openjdk/javax/javax/transaction/TransactionRequiredException.java
trunk/core/src/openjdk/javax/javax/transaction/TransactionRolledbackException.java
trunk/core/src/openjdk/javax/javax/transaction/package.html
trunk/core/src/openjdk/javax/javax/transaction/xa/
trunk/core/src/openjdk/javax/javax/transaction/xa/XAException.java
trunk/core/src/openjdk/javax/javax/transaction/xa/XAResource.java
trunk/core/src/openjdk/javax/javax/transaction/xa/Xid.java
trunk/core/src/openjdk/javax/javax/transaction/xa/package.html
Added: trunk/core/src/openjdk/javax/javax/sql/CommonDataSource.java
===================================================================
--- trunk/core/src/openjdk/javax/javax/sql/CommonDataSource.java (rev 0)
+++ trunk/core/src/openjdk/javax/javax/sql/CommonDataSource.java 2007-06-21 19:31:53 UTC (rev 3283)
@@ -0,0 +1,113 @@
+/*
+ * Copyright 2005-2006 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package javax.sql;
+
+import java.sql.SQLException;
+import java.io.PrintWriter;
+
+/**
+ * Interface that defines the methods which are common between <code>DataSource</code>,
+ * <code>XADataSource</code> and <code>ConnectionPoolDataSource</code>.
+ *<p>
+ */
+public interface CommonDataSource {
+
+ /**
+ * <p>Retrieves the log writer for this <code>DataSource</code>
+ * object.
+ *
+ * <p>The log writer is a character output stream to which all logging
+ * and tracing messages for this data source will be
+ * printed. This includes messages printed by the methods of this
+ * object, messages printed by methods of other objects manufactured
+ * by this object, and so on. Messages printed to a data source
+ * specific log writer are not printed to the log writer associated
+ * with the <code>java.sql.DriverManager</code> class. When a
+ * <code>DataSource</code> object is
+ * created, the log writer is initially null; in other words, the
+ * default is for logging to be disabled.
+ *
+ * @return the log writer for this data source or null if
+ * logging is disabled
+ * @exception java.sql.SQLException if a database access error occurs
+ * @see #setLogWriter
+ * @since 1.4
+ */
+ java.io.PrintWriter getLogWriter() throws SQLException;
+
+ /**
+ * <p>Sets the log writer for this <code>DataSource</code>
+ * object to the given <code>java.io.PrintWriter</code> object.
+ *
+ * <p>The log writer is a character output stream to which all logging
+ * and tracing messages for this data source will be
+ * printed. This includes messages printed by the methods of this
+ * object, messages printed by methods of other objects manufactured
+ * by this object, and so on. Messages printed to a data source-
+ * specific log writer are not printed to the log writer associated
+ * with the <code>java.sql.DriverManager</code> class. When a
+ * <code>DataSource</code> object is created the log writer is
+ * initially null; in other words, the default is for logging to be
+ * disabled.
+ *
+ * @param out the new log writer; to disable logging, set to null
+ * @exception SQLException if a database access error occurs
+ * @see #getLogWriter
+ * @since 1.4
+ */
+ void setLogWriter(java.io.PrintWriter out) throws SQLException;
+
+ /**
+ * <p>Sets the maximum time in seconds that this data source will wait
+ * while attempting to connect to a database. A value of zero
+ * specifies that the timeout is the default system timeout
+ * if there is one; otherwise, it specifies that there is no timeout.
+ * When a <code>DataSource</code> object is created, the login timeout is
+ * initially zero.
+ *
+ * @param seconds the data source login time limit
+ * @exception SQLException if a database access error occurs.
+ * @see #getLoginTimeout
+ * @since 1.4
+ */
+ void setLoginTimeout(int seconds) throws SQLException;
+
+ /**
+ * Gets the maximum time in seconds that this data source can wait
+ * while attempting to connect to a database. A value of zero
+ * means that the timeout is the default system timeout
+ * if there is one; otherwise, it means that there is no timeout.
+ * When a <code>DataSource</code> object is created, the login timeout is
+ * initially zero.
+ *
+ * @return the data source login time limit
+ * @exception SQLException if a database access error occurs.
+ * @see #setLoginTimeout
+ * @since 1.4
+ */
+ int getLoginTimeout() throws SQLException;
+
+}
Property changes on: trunk/core/src/openjdk/javax/javax/sql/CommonDataSource.java
___________________________________________________________________
Name: svn:executable
+ *
Added: trunk/core/src/openjdk/javax/javax/sql/ConnectionEvent.java
===================================================================
--- trunk/core/src/openjdk/javax/javax/sql/ConnectionEvent.java (rev 0)
+++ trunk/core/src/openjdk/javax/javax/sql/ConnectionEvent.java 2007-06-21 19:31:53 UTC (rev 3283)
@@ -0,0 +1,100 @@
+/*
+ * Copyright 2000-2006 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package javax.sql;
+
+import java.sql.SQLException;
+
+/**
+ * <P>An <code>Event</code> object that provides information about the
+ * source of a connection-related event. <code>ConnectionEvent</code>
+ * objects are generated when an application closes a pooled connection
+ * and when an error occurs. The <code>ConnectionEvent</code> object
+ * contains two kinds of information:
+ * <UL>
+ * <LI>The pooled connection closed by the application
+ * <LI>In the case of an error event, the <code>SQLException</code>
+ * about to be thrown to the application
+ * </UL>
+ *
+ * @since 1.4
+ */
+
+public class ConnectionEvent extends java.util.EventObject {
+
+ /**
+ * <P>Constructs a <code>ConnectionEvent</code> object initialized with
+ * the given <code>PooledConnection</code> object. <code>SQLException</code>
+ * defaults to <code>null</code>.
+ *
+ * @param con the pooled connection that is the source of the event
+ * @throws IllegalArgumentException if <code>con</code> is null.
+ */
+ public ConnectionEvent(PooledConnection con) {
+ super(con);
+ }
+
+ /**
+ * <P>Constructs a <code>ConnectionEvent</code> object initialized with
+ * the given <code>PooledConnection</code> object and
+ * <code>SQLException</code> object.
+ *
+ * @param con the pooled connection that is the source of the event
+ * @param ex the SQLException about to be thrown to the application
+ * @throws IllegalArgumentException if <code>con</code> is null.
+ */
+ public ConnectionEvent(PooledConnection con, SQLException ex) {
+ super(con);
+ this.ex = ex;
+ }
+
+ /**
+ * <P>Retrieves the <code>SQLException</code> for this
+ * <code>ConnectionEvent</code> object. May be <code>null</code>.
+ *
+ * @return the SQLException about to be thrown or <code>null</code>
+ */
+ public SQLException getSQLException() { return ex; }
+
+ /**
+ * The <code>SQLException</code> that the driver will throw to the
+ * application when an error occurs and the pooled connection is no
+ * longer usable.
+ * @serial
+ */
+ private SQLException ex = null;
+
+ /**
+ * Private serial version unique ID to ensure serialization
+ * compatibility.
+ */
+ static final long serialVersionUID = -4843217645290030002L;
+
+ }
+
+
+
+
+
Added: trunk/core/src/openjdk/javax/javax/sql/ConnectionEventListener.java
===================================================================
--- trunk/core/src/openjdk/javax/javax/sql/ConnectionEventListener.java (rev 0)
+++ trunk/core/src/openjdk/javax/javax/sql/ConnectionEventListener.java 2007-06-21 19:31:53 UTC (rev 3283)
@@ -0,0 +1,81 @@
+/*
+ * Copyright 2000-2001 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package javax.sql;
+
+/**
+ * <P>
+ * An object that registers to be notified of events generated by a
+ * <code>PooledConnection</code> object.
+ * <P>
+ * The <code>ConnectionEventListener</code> interface is implemented by a
+ * connection pooling component. A connection pooling component will
+ * usually be provided by a JDBC driver vendor or another system software
+ * vendor. A JDBC driver notifies a <code>ConnectionEventListener</code>
+ * object when an application is finished using a pooled connection with
+ * which the listener has registered. The notification
+ * occurs after the application calls the method <code>close</code> on
+ * its representation of a <code>PooledConnection</code> object. A
+ * <code>ConnectionEventListener</code> is also notified when a
+ * connection error occurs due to the fact that the <code>PooledConnection</code>
+ * is unfit for future use---the server has crashed, for example.
+ * The listener is notified by the JDBC driver just before the driver throws an
+ * <code>SQLException</code> to the application using the
+ * <code>PooledConnection</code> object.
+ *
+ * @since 1.4
+ */
+
+public interface ConnectionEventListener extends java.util.EventListener {
+
+ /**
+ * Notifies this <code>ConnectionEventListener</code> that
+ * the application has called the method <code>close</code> on its
+ * representation of a pooled connection.
+ *
+ * @param event an event object describing the source of
+ * the event
+ */
+ void connectionClosed(ConnectionEvent event);
+
+ /**
+ * Notifies this <code>ConnectionEventListener</code> that
+ * a fatal error has occurred and the pooled connection can
+ * no longer be used. The driver makes this notification just
+ * before it throws the application the <code>SQLException</code>
+ * contained in the given <code>ConnectionEvent</code> object.
+ *
+ * @param event an event object describing the source of
+ * the event and containing the <code>SQLException</code> that the
+ * driver is about to throw
+ */
+ void connectionErrorOccurred(ConnectionEvent event);
+
+ }
+
+
+
+
+
Added: trunk/core/src/openjdk/javax/javax/sql/ConnectionPoolDataSource.java
===================================================================
--- trunk/core/src/openjdk/javax/javax/sql/ConnectionPoolDataSource.java (rev 0)
+++ trunk/core/src/openjdk/javax/javax/sql/ConnectionPoolDataSource.java 2007-06-21 19:31:53 UTC (rev 3283)
@@ -0,0 +1,78 @@
+/*
+ * Copyright 2000-2006 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package javax.sql;
+
+import java.sql.SQLException;
+
+
+/**
+ * A factory for <code>PooledConnection</code>
+ * objects. An object that implements this interface will typically be
+ * registered with a naming service that is based on the
+ * Java<sup><font size=-2>TM</font></sup> Naming and Directory Interface
+ * (JNDI).
+ *
+ * @since 1.4
+ */
+
+public interface ConnectionPoolDataSource extends CommonDataSource {
+
+ /**
+ * Attempts to establish a physical database connection that can
+ * be used as a pooled connection.
+ *
+ * @return a <code>PooledConnection</code> object that is a physical
+ * connection to the database that this
+ * <code>ConnectionPoolDataSource</code> object represents
+ * @exception SQLException if a database access error occurs
+ * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
+ * this method
+ * @since 1.4
+ */
+ PooledConnection getPooledConnection() throws SQLException;
+
+ /**
+ * Attempts to establish a physical database connection that can
+ * be used as a pooled connection.
+ *
+ * @param user the database user on whose behalf the connection is being made
+ * @param password the user's password
+ * @return a <code>PooledConnection</code> object that is a physical
+ * connection to the database that this
+ * <code>ConnectionPoolDataSource</code> object represents
+ * @exception SQLException if a database access error occurs
+ * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
+ * this method
+ * @since 1.4
+ */
+ PooledConnection getPooledConnection(String user, String password)
+ throws SQLException;
+ }
+
+
+
+
+
Added: trunk/core/src/openjdk/javax/javax/sql/DataSource.java
===================================================================
--- trunk/core/src/openjdk/javax/javax/sql/DataSource.java (rev 0)
+++ trunk/core/src/openjdk/javax/javax/sql/DataSource.java 2007-06-21 19:31:53 UTC (rev 3283)
@@ -0,0 +1,104 @@
+/*
+ * Copyright 2000-2006 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package javax.sql;
+
+import java.sql.Connection;
+import java.sql.SQLException;
+import java.sql.Wrapper;
+
+/**
+ * <p>A factory for connections to the physical data source that this
+ * <code>DataSource</code> object represents. An alternative to the
+ * <code>DriverManager</code> facility, a <code>DataSource</code> object
+ * is the preferred means of getting a connection. An object that implements
+ * the <code>DataSource</code> interface will typically be
+ * registered with a naming service based on the
+ * Java<sup><font size=-2>TM</font></sup> Naming and Directory (JNDI) API.
+ * <P>
+ * The <code>DataSource</code> interface is implemented by a driver vendor.
+ * There are three types of implementations:
+ * <OL>
+ * <LI>Basic implementation -- produces a standard <code>Connection</code>
+ * object
+ * <LI>Connection pooling implementation -- produces a <code>Connection</code>
+ * object that will automatically participate in connection pooling. This
+ * implementation works with a middle-tier connection pooling manager.
+ * <LI>Distributed transaction implementation -- produces a
+ * <code>Connection</code> object that may be used for distributed
+ * transactions and almost always participates in connection pooling.
+ * This implementation works with a middle-tier
+ * transaction manager and almost always with a connection
+ * pooling manager.
+ * </OL>
+ * <P>
+ * A <code>DataSource</code> object has properties that can be modified
+ * when necessary. For example, if the data source is moved to a different
+ * server, the property for the server can be changed. The benefit is that
+ * because the data source's properties can be changed, any code accessing
+ * that data source does not need to be changed.
+ * <P>
+ * A driver that is accessed via a <code>DataSource</code> object does not
+ * register itself with the <code>DriverManager</code>. Rather, a
+ * <code>DataSource</code> object is retrieved though a lookup operation
+ * and then used to create a <code>Connection</code> object. With a basic
+ * implementation, the connection obtained through a <code>DataSource</code>
+ * object is identical to a connection obtained through the
+ * <code>DriverManager</code> facility.
+ *
+ * @since 1.4
+ */
+
+public interface DataSource extends CommonDataSource,Wrapper {
+
+ /**
+ * <p>Attempts to establish a connection with the data source that
+ * this <code>DataSource</code> object represents.
+ *
+ * @return a connection to the data source
+ * @exception SQLException if a database access error occurs
+ */
+ Connection getConnection() throws SQLException;
+
+ /**
+ * <p>Attempts to establish a connection with the data source that
+ * this <code>DataSource</code> object represents.
+ *
+ * @param username the database user on whose behalf the connection is
+ * being made
+ * @param password the user's password
+ * @return a connection to the data source
+ * @exception SQLException if a database access error occurs
+ * @since 1.4
+ */
+ Connection getConnection(String username, String password)
+ throws SQLException;
+
+}
+
+
+
+
+
Added: trunk/core/src/openjdk/javax/javax/sql/PooledConnection.java
===================================================================
--- trunk/core/src/openjdk/javax/javax/sql/PooledConnection.java (rev 0)
+++ trunk/core/src/openjdk/javax/javax/sql/PooledConnection.java 2007-06-21 19:31:53 UTC (rev 3283)
@@ -0,0 +1,178 @@
+/*
+ * Copyright 2000-2006 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package javax.sql;
+
+import java.sql.Connection;
+import java.sql.SQLException;
+
+/**
+ * An object that provides hooks for connection pool management.
+ * A <code>PooledConnection</code> object
+ * represents a physical connection to a data source. The connection
+ * can be recycled rather than being closed when an application is
+ * finished with it, thus reducing the number of connections that
+ * need to be made.
+ * <P>
+ * An application programmer does not use the <code>PooledConnection</code>
+ * interface directly; rather, it is used by a middle tier infrastructure
+ * that manages the pooling of connections.
+ * <P>
+ * When an application calls the method <code>DataSource.getConnection</code>,
+ * it gets back a <code>Connection</code> object. If connection pooling is
+ * being done, that <code>Connection</code> object is actually a handle to
+ * a <code>PooledConnection</code> object, which is a physical connection.
+ * <P>
+ * The connection pool manager, typically the application server, maintains
+ * a pool of <code>PooledConnection</code> objects. If there is a
+ * <code>PooledConnection</code> object available in the pool, the
+ * connection pool manager returns a <code>Connection</code> object that
+ * is a handle to that physical connection.
+ * If no <code>PooledConnection</code> object is available, the
+ * connection pool manager calls the <code>ConnectionPoolDataSource</code>
+ * method <code>getPoolConnection</code> to create a new physical connection. The
+ * JDBC driver implementing <code>ConnectionPoolDataSource</code> creates a
+ * new <code>PooledConnection</code> object and returns a handle to it.
+ * <P>
+ * When an application closes a connection, it calls the <code>Connection</code>
+ * method <code>close</code>. When connection pooling is being done,
+ * the connection pool manager is notified because it has registered itself as
+ * a <code>ConnectionEventListener</code> object using the
+ * <code>ConnectionPool</code> method <code>addConnectionEventListener</code>.
+ * The connection pool manager deactivates the handle to
+ * the <code>PooledConnection</code> object and returns the
+ * <code>PooledConnection</code> object to the pool of connections so that
+ * it can be used again. Thus, when an application closes its connection,
+ * the underlying physical connection is recycled rather than being closed.
+ * <P>
+ * The physical connection is not closed until the connection pool manager
+ * calls the <code>PooledConnection</code> method <code>close</code>.
+ * This method is generally called to have an orderly shutdown of the server or
+ * if a fatal error has made the connection unusable.
+ *
+ * <p>
+ * A connection pool manager is often also a statement pool manager, maintining
+ * a pool of <code>PreparedStatement</code> objects.
+ * When an application closes a prepared statement, it calls the
+ * <code>PreparedStatement</code>
+ * method <code>close</code>. When <code>Statement</code> pooling is be...
[truncated message content] |
|
From: <ls...@us...> - 2007-06-23 04:57:10
|
Revision: 3290
http://jnode.svn.sourceforge.net/jnode/?rev=3290&view=rev
Author: lsantha
Date: 2007-06-22 21:57:09 -0700 (Fri, 22 Jun 2007)
Log Message:
-----------
Openjdk integration.
Added Paths:
-----------
trunk/core/src/openjdk/javax/javax/naming/
trunk/core/src/openjdk/javax/javax/naming/AuthenticationException.java
trunk/core/src/openjdk/javax/javax/naming/AuthenticationNotSupportedException.java
trunk/core/src/openjdk/javax/javax/naming/BinaryRefAddr.java
trunk/core/src/openjdk/javax/javax/naming/Binding.java
trunk/core/src/openjdk/javax/javax/naming/CannotProceedException.java
trunk/core/src/openjdk/javax/javax/naming/CommunicationException.java
trunk/core/src/openjdk/javax/javax/naming/CompositeName.java
trunk/core/src/openjdk/javax/javax/naming/CompoundName.java
trunk/core/src/openjdk/javax/javax/naming/ConfigurationException.java
trunk/core/src/openjdk/javax/javax/naming/Context.java
trunk/core/src/openjdk/javax/javax/naming/ContextNotEmptyException.java
trunk/core/src/openjdk/javax/javax/naming/InitialContext.java
trunk/core/src/openjdk/javax/javax/naming/InsufficientResourcesException.java
trunk/core/src/openjdk/javax/javax/naming/InterruptedNamingException.java
trunk/core/src/openjdk/javax/javax/naming/InvalidNameException.java
trunk/core/src/openjdk/javax/javax/naming/LimitExceededException.java
trunk/core/src/openjdk/javax/javax/naming/LinkException.java
trunk/core/src/openjdk/javax/javax/naming/LinkLoopException.java
trunk/core/src/openjdk/javax/javax/naming/LinkRef.java
trunk/core/src/openjdk/javax/javax/naming/MalformedLinkException.java
trunk/core/src/openjdk/javax/javax/naming/Name.java
trunk/core/src/openjdk/javax/javax/naming/NameAlreadyBoundException.java
trunk/core/src/openjdk/javax/javax/naming/NameClassPair.java
trunk/core/src/openjdk/javax/javax/naming/NameImpl.java
trunk/core/src/openjdk/javax/javax/naming/NameNotFoundException.java
trunk/core/src/openjdk/javax/javax/naming/NameParser.java
trunk/core/src/openjdk/javax/javax/naming/NamingEnumeration.java
trunk/core/src/openjdk/javax/javax/naming/NamingException.java
trunk/core/src/openjdk/javax/javax/naming/NamingSecurityException.java
trunk/core/src/openjdk/javax/javax/naming/NoInitialContextException.java
trunk/core/src/openjdk/javax/javax/naming/NoPermissionException.java
trunk/core/src/openjdk/javax/javax/naming/NotContextException.java
trunk/core/src/openjdk/javax/javax/naming/OperationNotSupportedException.java
trunk/core/src/openjdk/javax/javax/naming/PartialResultException.java
trunk/core/src/openjdk/javax/javax/naming/RefAddr.java
trunk/core/src/openjdk/javax/javax/naming/Reference.java
trunk/core/src/openjdk/javax/javax/naming/Referenceable.java
trunk/core/src/openjdk/javax/javax/naming/ReferralException.java
trunk/core/src/openjdk/javax/javax/naming/ServiceUnavailableException.java
trunk/core/src/openjdk/javax/javax/naming/SizeLimitExceededException.java
trunk/core/src/openjdk/javax/javax/naming/StringRefAddr.java
trunk/core/src/openjdk/javax/javax/naming/TimeLimitExceededException.java
trunk/core/src/openjdk/javax/javax/naming/directory/
trunk/core/src/openjdk/javax/javax/naming/directory/Attribute.java
trunk/core/src/openjdk/javax/javax/naming/directory/AttributeInUseException.java
trunk/core/src/openjdk/javax/javax/naming/directory/AttributeModificationException.java
trunk/core/src/openjdk/javax/javax/naming/directory/Attributes.java
trunk/core/src/openjdk/javax/javax/naming/directory/BasicAttribute.java
trunk/core/src/openjdk/javax/javax/naming/directory/BasicAttributes.java
trunk/core/src/openjdk/javax/javax/naming/directory/DirContext.java
trunk/core/src/openjdk/javax/javax/naming/directory/InitialDirContext.java
trunk/core/src/openjdk/javax/javax/naming/directory/InvalidAttributeIdentifierException.java
trunk/core/src/openjdk/javax/javax/naming/directory/InvalidAttributeValueException.java
trunk/core/src/openjdk/javax/javax/naming/directory/InvalidAttributesException.java
trunk/core/src/openjdk/javax/javax/naming/directory/InvalidSearchControlsException.java
trunk/core/src/openjdk/javax/javax/naming/directory/InvalidSearchFilterException.java
trunk/core/src/openjdk/javax/javax/naming/directory/ModificationItem.java
trunk/core/src/openjdk/javax/javax/naming/directory/NoSuchAttributeException.java
trunk/core/src/openjdk/javax/javax/naming/directory/SchemaViolationException.java
trunk/core/src/openjdk/javax/javax/naming/directory/SearchControls.java
trunk/core/src/openjdk/javax/javax/naming/directory/SearchResult.java
trunk/core/src/openjdk/javax/javax/naming/directory/package.html
trunk/core/src/openjdk/javax/javax/naming/event/
trunk/core/src/openjdk/javax/javax/naming/event/EventContext.java
trunk/core/src/openjdk/javax/javax/naming/event/EventDirContext.java
trunk/core/src/openjdk/javax/javax/naming/event/NamespaceChangeListener.java
trunk/core/src/openjdk/javax/javax/naming/event/NamingEvent.java
trunk/core/src/openjdk/javax/javax/naming/event/NamingExceptionEvent.java
trunk/core/src/openjdk/javax/javax/naming/event/NamingListener.java
trunk/core/src/openjdk/javax/javax/naming/event/ObjectChangeListener.java
trunk/core/src/openjdk/javax/javax/naming/event/package.html
trunk/core/src/openjdk/javax/javax/naming/ldap/
trunk/core/src/openjdk/javax/javax/naming/ldap/BasicControl.java
trunk/core/src/openjdk/javax/javax/naming/ldap/Control.java
trunk/core/src/openjdk/javax/javax/naming/ldap/ControlFactory.java
trunk/core/src/openjdk/javax/javax/naming/ldap/ExtendedRequest.java
trunk/core/src/openjdk/javax/javax/naming/ldap/ExtendedResponse.java
trunk/core/src/openjdk/javax/javax/naming/ldap/HasControls.java
trunk/core/src/openjdk/javax/javax/naming/ldap/InitialLdapContext.java
trunk/core/src/openjdk/javax/javax/naming/ldap/LdapContext.java
trunk/core/src/openjdk/javax/javax/naming/ldap/LdapName.java
trunk/core/src/openjdk/javax/javax/naming/ldap/LdapReferralException.java
trunk/core/src/openjdk/javax/javax/naming/ldap/ManageReferralControl.java
trunk/core/src/openjdk/javax/javax/naming/ldap/PagedResultsControl.java
trunk/core/src/openjdk/javax/javax/naming/ldap/PagedResultsResponseControl.java
trunk/core/src/openjdk/javax/javax/naming/ldap/Rdn.java
trunk/core/src/openjdk/javax/javax/naming/ldap/Rfc2253Parser.java
trunk/core/src/openjdk/javax/javax/naming/ldap/SortControl.java
trunk/core/src/openjdk/javax/javax/naming/ldap/SortKey.java
trunk/core/src/openjdk/javax/javax/naming/ldap/SortResponseControl.java
trunk/core/src/openjdk/javax/javax/naming/ldap/StartTlsRequest.java
trunk/core/src/openjdk/javax/javax/naming/ldap/StartTlsResponse.java
trunk/core/src/openjdk/javax/javax/naming/ldap/UnsolicitedNotification.java
trunk/core/src/openjdk/javax/javax/naming/ldap/UnsolicitedNotificationEvent.java
trunk/core/src/openjdk/javax/javax/naming/ldap/UnsolicitedNotificationListener.java
trunk/core/src/openjdk/javax/javax/naming/ldap/package.html
trunk/core/src/openjdk/javax/javax/naming/package.html
trunk/core/src/openjdk/javax/javax/naming/spi/
trunk/core/src/openjdk/javax/javax/naming/spi/ContinuationContext.java
trunk/core/src/openjdk/javax/javax/naming/spi/ContinuationDirContext.java
trunk/core/src/openjdk/javax/javax/naming/spi/DirObjectFactory.java
trunk/core/src/openjdk/javax/javax/naming/spi/DirStateFactory.java
trunk/core/src/openjdk/javax/javax/naming/spi/DirectoryManager.java
trunk/core/src/openjdk/javax/javax/naming/spi/InitialContextFactory.java
trunk/core/src/openjdk/javax/javax/naming/spi/InitialContextFactoryBuilder.java
trunk/core/src/openjdk/javax/javax/naming/spi/NamingManager.java
trunk/core/src/openjdk/javax/javax/naming/spi/ObjectFactory.java
trunk/core/src/openjdk/javax/javax/naming/spi/ObjectFactoryBuilder.java
trunk/core/src/openjdk/javax/javax/naming/spi/ResolveResult.java
trunk/core/src/openjdk/javax/javax/naming/spi/Resolver.java
trunk/core/src/openjdk/javax/javax/naming/spi/StateFactory.java
trunk/core/src/openjdk/javax/javax/naming/spi/package.html
trunk/core/src/openjdk/javax/javax/rmi/
trunk/core/src/openjdk/javax/javax/rmi/CORBA/
trunk/core/src/openjdk/javax/javax/rmi/CORBA/ClassDesc.java
trunk/core/src/openjdk/javax/javax/rmi/CORBA/GetORBPropertiesFileAction.java
trunk/core/src/openjdk/javax/javax/rmi/CORBA/PortableRemoteObjectDelegate.java
trunk/core/src/openjdk/javax/javax/rmi/CORBA/Stub.java
trunk/core/src/openjdk/javax/javax/rmi/CORBA/StubDelegate.java
trunk/core/src/openjdk/javax/javax/rmi/CORBA/Tie.java
trunk/core/src/openjdk/javax/javax/rmi/CORBA/Util.java
trunk/core/src/openjdk/javax/javax/rmi/CORBA/UtilDelegate.java
trunk/core/src/openjdk/javax/javax/rmi/CORBA/ValueHandler.java
trunk/core/src/openjdk/javax/javax/rmi/CORBA/ValueHandlerMultiFormat.java
trunk/core/src/openjdk/javax/javax/rmi/CORBA/package.html
trunk/core/src/openjdk/javax/javax/rmi/PortableRemoteObject.java
trunk/core/src/openjdk/javax/javax/rmi/package.html
trunk/core/src/openjdk/javax/javax/rmi/ssl/
trunk/core/src/openjdk/javax/javax/rmi/ssl/SslRMIClientSocketFactory.java
trunk/core/src/openjdk/javax/javax/rmi/ssl/SslRMIServerSocketFactory.java
trunk/core/src/openjdk/javax/javax/rmi/ssl/package.html
trunk/core/src/openjdk/javax/javax/security/
trunk/core/src/openjdk/javax/javax/security/auth/
trunk/core/src/openjdk/javax/javax/security/auth/login/
trunk/core/src/openjdk/javax/javax/security/auth/login/ConfigurationSpi.java
Added: trunk/core/src/openjdk/javax/javax/naming/AuthenticationException.java
===================================================================
--- trunk/core/src/openjdk/javax/javax/naming/AuthenticationException.java (rev 0)
+++ trunk/core/src/openjdk/javax/javax/naming/AuthenticationException.java 2007-06-23 04:57:09 UTC (rev 3290)
@@ -0,0 +1,76 @@
+/*
+ * Copyright 1999 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package javax.naming;
+
+/**
+ * This exception is thrown when an authentication error occurs while
+ * accessing the naming or directory service.
+ * An authentication error can happen, for example, when the credentials
+ * supplied by the user program is invalid or otherwise fails to
+ * authenticate the user to the naming/directory service.
+ *<p>
+ * If the program wants to handle this exception in particular, it
+ * should catch AuthenticationException explicitly before attempting to
+ * catch NamingException. After catching AuthenticationException, the
+ * program could reattempt the authentication by updating
+ * the resolved context's environment properties with the appropriate
+ * appropriate credentials.
+ * <p>
+ * Synchronization and serialization issues that apply to NamingException
+ * apply directly here.
+ *
+ * @author Rosanna Lee
+ * @author Scott Seligman
+ * @version 1.14 07/05/05
+ * @since 1.3
+ */
+
+public class AuthenticationException extends NamingSecurityException {
+ /**
+ * Constructs a new instance of AuthenticationException using the
+ * explanation supplied. All other fields default to null.
+ *
+ * @param explanation A possibly null string containing
+ * additional detail about this exception.
+ * @see java.lang.Throwable#getMessage
+ */
+ public AuthenticationException(String explanation) {
+ super(explanation);
+ }
+
+ /**
+ * Constructs a new instance of AuthenticationException.
+ * All fields are set to null.
+ */
+ public AuthenticationException() {
+ super();
+ }
+
+ /**
+ * Use serialVersionUID from JNDI 1.1.1 for interoperability
+ */
+ private static final long serialVersionUID = 3678497619904568096L;
+}
Added: trunk/core/src/openjdk/javax/javax/naming/AuthenticationNotSupportedException.java
===================================================================
--- trunk/core/src/openjdk/javax/javax/naming/AuthenticationNotSupportedException.java (rev 0)
+++ trunk/core/src/openjdk/javax/javax/naming/AuthenticationNotSupportedException.java 2007-06-23 04:57:09 UTC (rev 3290)
@@ -0,0 +1,81 @@
+/*
+ * Copyright 1999 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package javax.naming;
+
+/**
+ * This exception is thrown when
+ * the particular flavor of authentication requested is not supported.
+ * For example, if the program
+ * is attempting to use strong authentication but the directory/naming
+ * supports only simple authentication, this exception would be thrown.
+ * Identification of a particular flavor of authentication is
+ * provider- and server-specific. It may be specified using
+ * specific authentication schemes such
+ * those identified using SASL, or a generic authentication specifier
+ * (such as "simple" and "strong").
+ *<p>
+ * If the program wants to handle this exception in particular, it
+ * should catch AuthenticationNotSupportedException explicitly before
+ * attempting to catch NamingException. After catching
+ * <code>AuthenticationNotSupportedException</code>, the program could
+ * reattempt the authentication using a different authentication flavor
+ * by updating the resolved context's environment properties accordingly.
+ * <p>
+ * Synchronization and serialization issues that apply to NamingException
+ * apply directly here.
+ *
+ * @author Rosanna Lee
+ * @author Scott Seligman
+ * @version 1.14 07/05/05
+ * @since 1.3
+ */
+
+public class AuthenticationNotSupportedException extends NamingSecurityException {
+ /**
+ * Constructs a new instance of AuthenticationNotSupportedException using
+ * an explanation. All other fields default to null.
+ *
+ * @param explanation A possibly null string containing additional
+ * detail about this exception.
+ * @see java.lang.Throwable#getMessage
+ */
+ public AuthenticationNotSupportedException(String explanation) {
+ super(explanation);
+ }
+
+ /**
+ * Constructs a new instance of AuthenticationNotSupportedException
+ * all name resolution fields and explanation initialized to null.
+ */
+ public AuthenticationNotSupportedException() {
+ super();
+ }
+
+ /**
+ * Use serialVersionUID from JNDI 1.1.1 for interoperability
+ */
+ private static final long serialVersionUID = -7149033933259492300L;
+}
Added: trunk/core/src/openjdk/javax/javax/naming/BinaryRefAddr.java
===================================================================
--- trunk/core/src/openjdk/javax/javax/naming/BinaryRefAddr.java (rev 0)
+++ trunk/core/src/openjdk/javax/javax/naming/BinaryRefAddr.java 2007-06-23 04:57:09 UTC (rev 3290)
@@ -0,0 +1,184 @@
+/*
+ * Copyright 1999 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package javax.naming;
+
+/**
+ * This class represents the binary form of the address of
+ * a communications end-point.
+ *<p>
+ * A BinaryRefAddr consists of a type that describes the communication mechanism
+ * and an opaque buffer containing the address description
+ * specific to that communication mechanism. The format and interpretation of
+ * the address type and the contents of the opaque buffer are based on
+ * the agreement of three parties: the client that uses the address,
+ * the object/server that can be reached using the address,
+ * and the administrator or program that creates the address.
+ *<p>
+ * An example of a binary reference address is an BER X.500 presentation address.
+ * Another example of a binary reference address is a serialized form of
+ * a service's object handle.
+ *<p>
+ * A binary reference address is immutable in the sense that its fields
+ * once created, cannot be replaced. However, it is possible to access
+ * the byte array used to hold the opaque buffer. Programs are strongly
+ * recommended against changing this byte array. Changes to this
+ * byte array need to be explicitly synchronized.
+ *
+ * @author Rosanna Lee
+ * @author Scott Seligman
+ * @version 1.14 07/05/05
+ *
+ * @see RefAddr
+ * @see StringRefAddr
+ * @since 1.3
+ */
+
+ /*
+ * The serialized form of a BinaryRefAddr object consists of its type
+ * name String and a byte array containing its "contents".
+ */
+
+public class BinaryRefAddr extends RefAddr {
+ /**
+ * Contains the bytes of the address.
+ * This field is initialized by the constructor and returned
+ * using getAddressBytes() and getAddressContents().
+ * @serial
+ */
+ private byte[] buf = null;
+
+ /**
+ * Constructs a new instance of BinaryRefAddr using its address type and a byte
+ * array for contents.
+ *
+ * @param addrType A non-null string describing the type of the address.
+ * @param src The non-null contents of the address as a byte array.
+ * The contents of src is copied into the new BinaryRefAddr.
+ */
+ public BinaryRefAddr(String addrType, byte[] src) {
+ this(addrType, src, 0, src.length);
+ }
+
+ /**
+ * Constructs a new instance of BinaryRefAddr using its address type and
+ * a region of a byte array for contents.
+ *
+ * @param addrType A non-null string describing the type of the address.
+ * @param src The non-null contents of the address as a byte array.
+ * The contents of src is copied into the new BinaryRefAddr.
+ * @param offset The starting index in src to get the bytes.
+ * 0 <= offset <= src.length.
+ * @param count The number of bytes to extract from src.
+ * 0 <= count <= src.length-offset.
+ */
+ public BinaryRefAddr(String addrType, byte[] src, int offset, int count) {
+ super(addrType);
+ buf = new byte[count];
+ System.arraycopy(src, offset, buf, 0, count);
+ }
+
+ /**
+ * Retrieves the contents of this address as an Object.
+ * The result is a byte array.
+ * Changes to this array will affect this BinaryRefAddr's contents.
+ * Programs are recommended against changing this array's contents
+ * and to lock the buffer if they need to change it.
+ *
+ * @return The non-null buffer containing this address's contents.
+ */
+ public Object getContent() {
+ return buf;
+ }
+
+
+ /**
+ * Determines whether obj is equal to this address. It is equal if
+ * it contains the same address type and their contents are byte-wise
+ * equivalent.
+ * @param obj The possibly null object to check.
+ * @return true if the object is equal; false otherwise.
+ */
+ public boolean equals(Object obj) {
+ if ((obj != null) && (obj instanceof BinaryRefAddr)) {
+ BinaryRefAddr target = (BinaryRefAddr)obj;
+ if (addrType.compareTo(target.addrType) == 0) {
+ if (buf == null && target.buf == null)
+ return true;
+ if (buf == null || target.buf == null ||
+ buf.length != target.buf.length)
+ return false;
+ for (int i = 0; i < buf.length; i++)
+ if (buf[i] != target.buf[i])
+ return false;
+ return true;
+ }
+ }
+ return false;
+ }
+
+ /**
+ * Computes the hash code of this address using its address type and contents.
+ * Two BinaryRefAddrs have the same hash code if they have
+ * the same address type and the same contents.
+ * It is also possible for different BinaryRefAddrs to have
+ * the same hash code.
+ *
+ * @return The hash code of this address as an int.
+ */
+ public int hashCode() {
+ int hash = addrType.hashCode();
+ for (int i = 0; i < buf.length; i++) {
+ hash += buf[i]; // %%% improve later
+ }
+ return hash;
+ }
+
+ /**
+ * Generates the string representation of this address.
+ * The string consists of the address's type and contents with labels.
+ * The first 32 bytes of contents are displayed (in hexadecimal).
+ * If there are more than 32 bytes, "..." is used to indicate more.
+ * This string is meant to used for debugging purposes and not
+ * meant to be interpreted programmatically.
+ * @return The non-null string representation of this address.
+ */
+ public String toString(){
+ StringBuffer str = new StringBuffer("Address Type: " + addrType + "\n");
+
+ str.append("AddressContents: ");
+ for (int i = 0; i<buf.length && i < 32; i++) {
+ str.append(Integer.toHexString(buf[i]) +" ");
+ }
+ if (buf.length >= 32)
+ str.append(" ...\n");
+ return (str.toString());
+ }
+
+ /**
+ * Use serialVersionUID from JNDI 1.1.1 for interoperability
+ */
+ private static final long serialVersionUID = -3415254970957330361L;
+}
Added: trunk/core/src/openjdk/javax/javax/naming/Binding.java
===================================================================
--- trunk/core/src/openjdk/javax/javax/naming/Binding.java (rev 0)
+++ trunk/core/src/openjdk/javax/javax/naming/Binding.java 2007-06-23 04:57:09 UTC (rev 3290)
@@ -0,0 +1,201 @@
+/*
+ * Copyright 1999 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package javax.naming;
+
+/**
+ * This class represents a name-to-object binding found in a context.
+ *<p>
+ * A context consists of name-to-object bindings.
+ * The Binding class represents such a binding. It consists
+ * of a name and an object. The <code>Context.listBindings()</code>
+ * method returns an enumeration of Binding.
+ *<p>
+ * Use subclassing for naming systems that generate contents of
+ * a binding dynamically.
+ *<p>
+ * A Binding instance is not synchronized against concurrent access by multiple
+ * threads. Threads that need to access a Binding concurrently should
+ * synchronize amongst themselves and provide the necessary locking.
+ *
+ * @author Rosanna Lee
+ * @author Scott Seligman
+ * @version 1.15 07/05/05
+ * @since 1.3
+ */
+
+public class Binding extends NameClassPair {
+ /**
+ * Contains this binding's object.
+ * It is initialized by the constuctor and can be updated using
+ * <tt>setObject</tt>.
+ * @serial
+ * @see #getObject
+ * @see #setObject
+ */
+ private Object boundObj;
+
+ /**
+ * Constructs an instance of a Binding given its name and object.
+ *<p>
+ * <tt>getClassName()</tt> will return
+ * the class name of <tt>obj</tt> (or null if <tt>obj</tt> is null)
+ * unless the class name has been explicitly set using <tt>setClassName()</tt>
+ *
+ * @param name The non-null name of the object. It is relative
+ * to the <em>target context</em> (which is
+ * named by the first parameter of the <code>listBindings()</code> method)
+ * @param obj The possibly null object bound to name.
+ * @see NameClassPair#setClassName
+ */
+ public Binding(String name, Object obj) {
+ super(name, null);
+ this.boundObj = obj;
+ }
+
+ /**
+ * Constructs an instance of a Binding given its name, object, and whether
+ * the name is relative.
+ *<p>
+ * <tt>getClassName()</tt> will return the class name of <tt>obj</tt>
+ * (or null if <tt>obj</tt> is null) unless the class name has been
+ * explicitly set using <tt>setClassName()</tt>
+ *
+ * @param name The non-null string name of the object.
+ * @param obj The possibly null object bound to name.
+ * @param isRelative true if <code>name</code> is a name relative
+ * to the target context (which is named by
+ * the first parameter of the <code>listBindings()</code> method);
+ * false if <code>name</code> is a URL string.
+ * @see NameClassPair#isRelative
+ * @see NameClassPair#setRelative
+ * @see NameClassPair#setClassName
+ */
+ public Binding(String name, Object obj, boolean isRelative) {
+ super(name, null, isRelative);
+ this.boundObj = obj;
+ }
+
+ /**
+ * Constructs an instance of a Binding given its name, class name, and object.
+ *
+ * @param name The non-null name of the object. It is relative
+ * to the <em>target context</em> (which is
+ * named by the first parameter of the <code>listBindings()</code> method)
+ * @param className The possibly null class name of the object
+ * bound to <tt>name</tt>. If null, the class name of <tt>obj</tt> is
+ * returned by <tt>getClassName()</tt>. If <tt>obj</tt> is also
+ * null, <tt>getClassName()</tt> will return null.
+ * @param obj The possibly null object bound to name.
+ * @see NameClassPair#setClassName
+ */
+ public Binding(String name, String className, Object obj) {
+ super(name, className);
+ this.boundObj = obj;
+ }
+
+ /**
+ * Constructs an instance of a Binding given its
+ * name, class name, object, and whether the name is relative.
+ *
+ * @param name The non-null string name of the object.
+ * @param className The possibly null class name of the object
+ * bound to <tt>name</tt>. If null, the class name of <tt>obj</tt> is
+ * returned by <tt>getClassName()</tt>. If <tt>obj</tt> is also
+ * null, <tt>getClassName()</tt> will return null.
+ * @param obj The possibly null object bound to name.
+ * @param isRelative true if <code>name</code> is a name relative
+ * to the target context (which is named by
+ * the first parame...
[truncated message content] |
|
From: <ls...@us...> - 2007-06-25 09:47:17
|
Revision: 3307
http://jnode.svn.sourceforge.net/jnode/?rev=3307&view=rev
Author: lsantha
Date: 2007-06-25 02:36:18 -0700 (Mon, 25 Jun 2007)
Log Message:
-----------
Openjdk integration.
Added Paths:
-----------
trunk/core/src/openjdk/javax/javax/net/
trunk/core/src/openjdk/javax/javax/net/ssl/
trunk/core/src/openjdk/javax/javax/net/ssl/SSLContext.java
trunk/core/src/openjdk/javax/javax/net/ssl/SSLContextSpi.java
trunk/core/src/openjdk/javax/javax/net/ssl/SSLParameters.java
trunk/core/src/openjdk/javax/javax/net/ssl/SSLSocket.java
trunk/core/src/openjdk/javax/javax/security/auth/kerberos/
trunk/core/src/openjdk/javax/javax/security/auth/kerberos/KerberosKey.java
trunk/core/src/openjdk/javax/javax/security/auth/kerberos/KerberosTicket.java
trunk/core/src/openjdk/javax/javax/security/auth/kerberos/KeyImpl.java
trunk/core/src/openjdk/javax/javax/security/auth/login/Configuration.java
trunk/core/src/openjdk/javax/javax/security/auth/login/LoginContext.java
trunk/core/src/openjdk/javax/javax/security/sasl/
trunk/core/src/openjdk/javax/javax/security/sasl/Sasl.java
trunk/core/src/openjdk/javax/javax/xml/
trunk/core/src/openjdk/javax/javax/xml/bind/
trunk/core/src/openjdk/javax/javax/xml/bind/Binder.java
trunk/core/src/openjdk/javax/javax/xml/bind/ContextFinder.java
trunk/core/src/openjdk/javax/javax/xml/bind/DatatypeConverter.java
trunk/core/src/openjdk/javax/javax/xml/bind/DatatypeConverterInterface.java
trunk/core/src/openjdk/javax/javax/xml/bind/Element.java
trunk/core/src/openjdk/javax/javax/xml/bind/JAXBContext.java
trunk/core/src/openjdk/javax/javax/xml/bind/JAXBElement.java
trunk/core/src/openjdk/javax/javax/xml/bind/JAXBException.java
trunk/core/src/openjdk/javax/javax/xml/bind/JAXBIntrospector.java
trunk/core/src/openjdk/javax/javax/xml/bind/MarshalException.java
trunk/core/src/openjdk/javax/javax/xml/bind/Marshaller.java
trunk/core/src/openjdk/javax/javax/xml/bind/Messages.java
trunk/core/src/openjdk/javax/javax/xml/bind/Messages.properties
trunk/core/src/openjdk/javax/javax/xml/bind/NotIdentifiableEvent.java
trunk/core/src/openjdk/javax/javax/xml/bind/ParseConversionEvent.java
trunk/core/src/openjdk/javax/javax/xml/bind/PrintConversionEvent.java
trunk/core/src/openjdk/javax/javax/xml/bind/PropertyException.java
trunk/core/src/openjdk/javax/javax/xml/bind/SchemaOutputResolver.java
trunk/core/src/openjdk/javax/javax/xml/bind/TypeConstraintException.java
trunk/core/src/openjdk/javax/javax/xml/bind/UnmarshalException.java
trunk/core/src/openjdk/javax/javax/xml/bind/Unmarshaller.java
trunk/core/src/openjdk/javax/javax/xml/bind/UnmarshallerHandler.java
trunk/core/src/openjdk/javax/javax/xml/bind/ValidationEvent.java
trunk/core/src/openjdk/javax/javax/xml/bind/ValidationEventHandler.java
trunk/core/src/openjdk/javax/javax/xml/bind/ValidationEventLocator.java
trunk/core/src/openjdk/javax/javax/xml/bind/ValidationException.java
trunk/core/src/openjdk/javax/javax/xml/bind/Validator.java
trunk/core/src/openjdk/javax/javax/xml/bind/annotation/
trunk/core/src/openjdk/javax/javax/xml/bind/annotation/DomHandler.java
trunk/core/src/openjdk/javax/javax/xml/bind/annotation/W3CDomHandler.java
trunk/core/src/openjdk/javax/javax/xml/bind/annotation/XmlAccessOrder.java
trunk/core/src/openjdk/javax/javax/xml/bind/annotation/XmlAccessType.java
trunk/core/src/openjdk/javax/javax/xml/bind/annotation/XmlAccessorOrder.java
trunk/core/src/openjdk/javax/javax/xml/bind/annotation/XmlAccessorType.java
trunk/core/src/openjdk/javax/javax/xml/bind/annotation/XmlAnyAttribute.java
trunk/core/src/openjdk/javax/javax/xml/bind/annotation/XmlAnyElement.java
trunk/core/src/openjdk/javax/javax/xml/bind/annotation/XmlAttachmentRef.java
trunk/core/src/openjdk/javax/javax/xml/bind/annotation/XmlAttribute.java
trunk/core/src/openjdk/javax/javax/xml/bind/annotation/XmlElement.java
trunk/core/src/openjdk/javax/javax/xml/bind/annotation/XmlElementDecl.java
trunk/core/src/openjdk/javax/javax/xml/bind/annotation/XmlElementRef.java
trunk/core/src/openjdk/javax/javax/xml/bind/annotation/XmlElementRefs.java
trunk/core/src/openjdk/javax/javax/xml/bind/annotation/XmlElementWrapper.java
trunk/core/src/openjdk/javax/javax/xml/bind/annotation/XmlElements.java
trunk/core/src/openjdk/javax/javax/xml/bind/annotation/XmlEnum.java
trunk/core/src/openjdk/javax/javax/xml/bind/annotation/XmlEnumValue.java
trunk/core/src/openjdk/javax/javax/xml/bind/annotation/XmlID.java
trunk/core/src/openjdk/javax/javax/xml/bind/annotation/XmlIDREF.java
trunk/core/src/openjdk/javax/javax/xml/bind/annotation/XmlInlineBinaryData.java
trunk/core/src/openjdk/javax/javax/xml/bind/annotation/XmlList.java
trunk/core/src/openjdk/javax/javax/xml/bind/annotation/XmlMimeType.java
trunk/core/src/openjdk/javax/javax/xml/bind/annotation/XmlMixed.java
trunk/core/src/openjdk/javax/javax/xml/bind/annotation/XmlNs.java
trunk/core/src/openjdk/javax/javax/xml/bind/annotation/XmlNsForm.java
trunk/core/src/openjdk/javax/javax/xml/bind/annotation/XmlRegistry.java
trunk/core/src/openjdk/javax/javax/xml/bind/annotation/XmlRootElement.java
trunk/core/src/openjdk/javax/javax/xml/bind/annotation/XmlSchema.java
trunk/core/src/openjdk/javax/javax/xml/bind/annotation/XmlSchemaType.java
trunk/core/src/openjdk/javax/javax/xml/bind/annotation/XmlSchemaTypes.java
trunk/core/src/openjdk/javax/javax/xml/bind/annotation/XmlTransient.java
trunk/core/src/openjdk/javax/javax/xml/bind/annotation/XmlType.java
trunk/core/src/openjdk/javax/javax/xml/bind/annotation/XmlValue.java
trunk/core/src/openjdk/javax/javax/xml/bind/annotation/adapters/
trunk/core/src/openjdk/javax/javax/xml/bind/annotation/adapters/CollapsedStringAdapter.java
trunk/core/src/openjdk/javax/javax/xml/bind/annotation/adapters/HexBinaryAdapter.java
trunk/core/src/openjdk/javax/javax/xml/bind/annotation/adapters/NormalizedStringAdapter.java
trunk/core/src/openjdk/javax/javax/xml/bind/annotation/adapters/XmlAdapter.java
trunk/core/src/openjdk/javax/javax/xml/bind/annotation/adapters/XmlJavaTypeAdapter.java
trunk/core/src/openjdk/javax/javax/xml/bind/annotation/adapters/XmlJavaTypeAdapters.java
trunk/core/src/openjdk/javax/javax/xml/bind/annotation/adapters/package.html
trunk/core/src/openjdk/javax/javax/xml/bind/annotation/package.html
trunk/core/src/openjdk/javax/javax/xml/bind/attachment/
trunk/core/src/openjdk/javax/javax/xml/bind/attachment/AttachmentMarshaller.java
trunk/core/src/openjdk/javax/javax/xml/bind/attachment/AttachmentUnmarshaller.java
trunk/core/src/openjdk/javax/javax/xml/bind/attachment/package.html
trunk/core/src/openjdk/javax/javax/xml/bind/helpers/
trunk/core/src/openjdk/javax/javax/xml/bind/helpers/AbstractMarshallerImpl.java
trunk/core/src/openjdk/javax/javax/xml/bind/helpers/AbstractUnmarshallerImpl.java
trunk/core/src/openjdk/javax/javax/xml/bind/helpers/DefaultValidationEventHandler.java
trunk/core/src/openjdk/javax/javax/xml/bind/helpers/Messages.java
trunk/core/src/openjdk/javax/javax/xml/bind/helpers/Messages.properties
trunk/core/src/openjdk/javax/javax/xml/bind/helpers/NotIdentifiableEventImpl.java
trunk/core/src/openjdk/javax/javax/xml/bind/helpers/ParseConversionEventImpl.java
trunk/core/src/openjdk/javax/javax/xml/bind/helpers/PrintConversionEventImpl.java
trunk/core/src/openjdk/javax/javax/xml/bind/helpers/ValidationEventImpl.java
trunk/core/src/openjdk/javax/javax/xml/bind/helpers/ValidationEventLocatorImpl.java
trunk/core/src/openjdk/javax/javax/xml/bind/helpers/package.html
trunk/core/src/openjdk/javax/javax/xml/bind/package.html
trunk/core/src/openjdk/javax/javax/xml/bind/util/
trunk/core/src/openjdk/javax/javax/xml/bind/util/JAXBResult.java
trunk/core/src/openjdk/javax/javax/xml/bind/util/JAXBSource.java
trunk/core/src/openjdk/javax/javax/xml/bind/util/Messages.java
trunk/core/src/openjdk/javax/javax/xml/bind/util/Messages.properties
trunk/core/src/openjdk/javax/javax/xml/bind/util/ValidationEventCollector.java
trunk/core/src/openjdk/javax/javax/xml/bind/util/package.html
trunk/core/src/openjdk/javax/javax/xml/crypto/
trunk/core/src/openjdk/javax/javax/xml/crypto/AlgorithmMethod.java
trunk/core/src/openjdk/javax/javax/xml/crypto/Data.java
trunk/core/src/openjdk/javax/javax/xml/crypto/KeySelector.java
trunk/core/src/openjdk/javax/javax/xml/crypto/KeySelectorException.java
trunk/core/src/openjdk/javax/javax/xml/crypto/KeySelectorResult.java
trunk/core/src/openjdk/javax/javax/xml/crypto/MarshalException.java
trunk/core/src/openjdk/javax/javax/xml/crypto/NoSuchMechanismException.java
trunk/core/src/openjdk/javax/javax/xml/crypto/NodeSetData.java
trunk/core/src/openjdk/javax/javax/xml/crypto/OctetStreamData.java
trunk/core/src/openjdk/javax/javax/xml/crypto/URIDereferencer.java
trunk/core/src/openjdk/javax/javax/xml/crypto/URIReference.java
trunk/core/src/openjdk/javax/javax/xml/crypto/URIReferenceException.java
trunk/core/src/openjdk/javax/javax/xml/crypto/XMLCryptoContext.java
trunk/core/src/openjdk/javax/javax/xml/crypto/XMLStructure.java
trunk/core/src/openjdk/javax/javax/xml/crypto/dom/
trunk/core/src/openjdk/javax/javax/xml/crypto/dom/DOMCryptoContext.java
trunk/core/src/openjdk/javax/javax/xml/crypto/dom/DOMStructure.java
trunk/core/src/openjdk/javax/javax/xml/crypto/dom/DOMURIReference.java
trunk/core/src/openjdk/javax/javax/xml/crypto/dom/package.html
trunk/core/src/openjdk/javax/javax/xml/crypto/dsig/
trunk/core/src/openjdk/javax/javax/xml/crypto/dsig/CanonicalizationMethod.java
trunk/core/src/openjdk/javax/javax/xml/crypto/dsig/DigestMethod.java
trunk/core/src/openjdk/javax/javax/xml/crypto/dsig/Manifest.java
trunk/core/src/openjdk/javax/javax/xml/crypto/dsig/Reference.java
trunk/core/src/openjdk/javax/javax/xml/crypto/dsig/SignatureMethod.java
trunk/core/src/openjdk/javax/javax/xml/crypto/dsig/SignatureProperties.java
trunk/core/src/openjdk/javax/javax/xml/crypto/dsig/SignatureProperty.java
trunk/core/src/openjdk/javax/javax/xml/crypto/dsig/SignedInfo.java
trunk/core/src/openjdk/javax/javax/xml/crypto/dsig/Transform.java
trunk/core/src/openjdk/javax/javax/xml/crypto/dsig/TransformException.java
trunk/core/src/openjdk/javax/javax/xml/crypto/dsig/TransformService.java
trunk/core/src/openjdk/javax/javax/xml/crypto/dsig/XMLObject.java
trunk/core/src/openjdk/javax/javax/xml/crypto/dsig/XMLSignContext.java
trunk/core/src/openjdk/javax/javax/xml/crypto/dsig/XMLSignature.java
trunk/core/src/openjdk/javax/javax/xml/crypto/dsig/XMLSignatureException.java
trunk/core/src/openjdk/javax/javax/xml/crypto/dsig/XMLSignatureFactory.java
trunk/core/src/openjdk/javax/javax/xml/crypto/dsig/XMLValidateContext.java
trunk/core/src/openjdk/javax/javax/xml/crypto/dsig/dom/
trunk/core/src/openjdk/javax/javax/xml/crypto/dsig/dom/DOMSignContext.java
trunk/core/src/openjdk/javax/javax/xml/crypto/dsig/dom/DOMValidateContext.java
trunk/core/src/openjdk/javax/javax/xml/crypto/dsig/dom/package.html
trunk/core/src/openjdk/javax/javax/xml/crypto/dsig/keyinfo/
trunk/core/src/openjdk/javax/javax/xml/crypto/dsig/keyinfo/KeyInfo.java
trunk/core/src/openjdk/javax/javax/xml/crypto/dsig/keyinfo/KeyInfoFactory.java
trunk/core/src/openjdk/javax/javax/xml/crypto/dsig/keyinfo/KeyName.java
trunk/core/src/openjdk/javax/javax/xml/crypto/dsig/keyinfo/KeyValue.java
trunk/core/src/openjdk/javax/javax/xml/crypto/dsig/keyinfo/PGPData.java
trunk/core/src/openjdk/javax/javax/xml/crypto/dsig/keyinfo/RetrievalMethod.java
trunk/core/src/openjdk/javax/javax/xml/crypto/dsig/keyinfo/X509Data.java
trunk/core/src/openjdk/javax/javax/xml/crypto/dsig/keyinfo/X509IssuerSerial.java
trunk/core/src/openjdk/javax/javax/xml/crypto/dsig/keyinfo/package.html
trunk/core/src/openjdk/javax/javax/xml/crypto/dsig/package.html
trunk/core/src/openjdk/javax/javax/xml/crypto/dsig/spec/
trunk/core/src/openjdk/javax/javax/xml/crypto/dsig/spec/C14NMethodParameterSpec.java
trunk/core/src/openjdk/javax/javax/xml/crypto/dsig/spec/DigestMethodParameterSpec.java
trunk/core/src/openjdk/javax/javax/xml/crypto/dsig/spec/ExcC14NParameterSpec.java
trunk/core/src/openjdk/javax/javax/xml/crypto/dsig/spec/HMACParameterSpec.java
trunk/core/src/openjdk/javax/javax/xml/crypto/dsig/spec/SignatureMethodParameterSpec.java
trunk/core/src/openjdk/javax/javax/xml/crypto/dsig/spec/TransformParameterSpec.java
trunk/core/src/openjdk/javax/javax/xml/crypto/dsig/spec/XPathFilter2ParameterSpec.java
trunk/core/src/openjdk/javax/javax/xml/crypto/dsig/spec/XPathFilterParameterSpec.java
trunk/core/src/openjdk/javax/javax/xml/crypto/dsig/spec/XPathType.java
trunk/core/src/openjdk/javax/javax/xml/crypto/dsig/spec/XSLTTransformParameterSpec.java
trunk/core/src/openjdk/javax/javax/xml/crypto/dsig/spec/package.html
trunk/core/src/openjdk/javax/javax/xml/crypto/package.html
trunk/core/src/openjdk/javax/javax/xml/soap/
trunk/core/src/openjdk/javax/javax/xml/soap/AttachmentPart.java
trunk/core/src/openjdk/javax/javax/xml/soap/Detail.java
trunk/core/src/openjdk/javax/javax/xml/soap/DetailEntry.java
trunk/core/src/openjdk/javax/javax/xml/soap/FactoryFinder.java
trunk/core/src/openjdk/javax/javax/xml/soap/MessageFactory.java
trunk/core/src/openjdk/javax/javax/xml/soap/MimeHeader.java
trunk/core/src/openjdk/javax/javax/xml/soap/MimeHeaders.java
trunk/core/src/openjdk/javax/javax/xml/soap/Name.java
trunk/core/src/openjdk/javax/javax/xml/soap/Node.java
trunk/core/src/openjdk/javax/javax/xml/soap/SAAJMetaFactory.java
trunk/core/src/openjdk/javax/javax/xml/soap/SAAJResult.java
trunk/core/src/openjdk/javax/javax/xml/soap/SOAPBody.java
trunk/core/src/openjdk/javax/javax/xml/soap/SOAPBodyElement.java
trunk/core/src/openjdk/javax/javax/xml/soap/SOAPConnection.java
trunk/core/src/openjdk/javax/javax/xml/soap/SOAPConnectionFactory.java
trunk/core/src/openjdk/javax/javax/xml/soap/SOAPConstants.java
trunk/core/src/openjdk/javax/javax/xml/soap/SOAPElement.java
trunk/core/src/openjdk/javax/javax/xml/soap/SOAPElementFactory.java
trunk/core/src/openjdk/javax/javax/xml/soap/SOAPEnvelope.java
trunk/core/src/openjdk/javax/javax/xml/soap/SOAPException.java
trunk/core/src/openjdk/javax/javax/xml/soap/SOAPFactory.java
trunk/core/src/openjdk/javax/javax/xml/soap/SOAPFault.java
trunk/core/src/openjdk/javax/javax/xml/soap/SOAPFaultElement.java
trunk/core/src/openjdk/javax/javax/xml/soap/SOAPHeader.java
trunk/core/src/openjdk/javax/javax/xml/soap/SOAPHeaderElement.java
trunk/core/src/openjdk/javax/javax/xml/soap/SOAPMessage.java
trunk/core/src/openjdk/javax/javax/xml/soap/SOAPPart.java
trunk/core/src/openjdk/javax/javax/xml/soap/Text.java
trunk/core/src/openjdk/javax/javax/xml/soap/package.html
trunk/core/src/openjdk/javax/javax/xml/stream/
trunk/core/src/openjdk/javax/javax/xml/stream/EventFilter.java
trunk/core/src/openjdk/javax/javax/xml/stream/FactoryConfigurationError.java
trunk/core/src/openjdk/javax/javax/xml/stream/FactoryFinder.java
trunk/core/src/openjdk/javax/javax/xml/stream/Location.java
trunk/core/src/openjdk/javax/javax/xml/stream/SecuritySupport.java
trunk/core/src/openjdk/javax/javax/xml/stream/StreamFilter.java
trunk/core/src/openjdk/javax/javax/xml/stream/XMLEventFactory.java
trunk/core/src/openjdk/javax/javax/xml/stream/XMLEventReader.java
trunk/core/src/openjdk/javax/javax/xml/stream/XMLEventWriter.java
trunk/core/src/openjdk/javax/javax/xml/stream/XMLInputFactory.java
trunk/core/src/openjdk/javax/javax/xml/stream/XMLOutputFactory.java
trunk/core/src/openjdk/javax/javax/xml/stream/XMLReporter.java
trunk/core/src/openjdk/javax/javax/xml/stream/XMLResolver.java
trunk/core/src/openjdk/javax/javax/xml/stream/XMLStreamConstants.java
trunk/core/src/openjdk/javax/javax/xml/stream/XMLStreamException.java
trunk/core/src/openjdk/javax/javax/xml/stream/XMLStreamReader.java
trunk/core/src/openjdk/javax/javax/xml/stream/XMLStreamWriter.java
trunk/core/src/openjdk/javax/javax/xml/stream/events/
trunk/core/src/openjdk/javax/javax/xml/stream/events/Attribute.java
trunk/core/src/openjdk/javax/javax/xml/stream/events/Characters.java
trunk/core/src/openjdk/javax/javax/xml/stream/events/Comment.java
trunk/core/src/openjdk/javax/javax/xml/stream/events/DTD.java
trunk/core/src/openjdk/javax/javax/xml/stream/events/EndDocument.java
trunk/core/src/openjdk/javax/javax/xml/stream/events/EndElement.java
trunk/core/src/openjdk/javax/javax/xml/stream/events/EntityDeclaration.java
trunk/core/src/openjdk/javax/javax/xml/stream/events/EntityReference.java
trunk/core/src/openjdk/javax/javax/xml/stream/events/Namespace.java
trunk/core/src/openjdk/javax/javax/xml/stream/events/NotationDeclaration.java
trunk/core/src/openjdk/javax/javax/xml/stream/events/ProcessingInstruction.java
trunk/core/src/openjdk/javax/javax/xml/stream/events/StartDocument.java
trunk/core/src/openjdk/javax/javax/xml/stream/events/StartElement.java
trunk/core/src/openjdk/javax/javax/xml/stream/events/XMLEvent.java
trunk/core/src/openjdk/javax/javax/xml/stream/util/
trunk/core/src/openjdk/javax/javax/xml/stream/util/EventReaderDelegate.java
trunk/core/src/openjdk/javax/javax/xml/stream/util/StreamReaderDelegate.java
trunk/core/src/openjdk/javax/javax/xml/stream/util/XMLEventAllocator.java
trunk/core/src/openjdk/javax/javax/xml/stream/util/XMLEventConsumer.java
trunk/core/src/openjdk/javax/javax/xml/transform/
trunk/core/src/openjdk/javax/javax/xml/transform/stax/
trunk/core/src/openjdk/javax/javax/xml/transform/stax/StAXResult.java
trunk/core/src/openjdk/javax/javax/xml/transform/stax/StAXSource.java
trunk/core/src/openjdk/javax/javax/xml/transform/stax/package.html
trunk/core/src/openjdk/javax/javax/xml/ws/
trunk/core/src/openjdk/javax/javax/xml/ws/AsyncHandler.java
trunk/core/src/openjdk/javax/javax/xml/ws/Binding.java
trunk/core/src/openjdk/javax/javax/xml/ws/BindingProvider.java
trunk/core/src/openjdk/javax/javax/xml/ws/BindingType.java
trunk/core/src/openjdk/javax/javax/xml/ws/Dispatch.java
trunk/core/src/openjdk/javax/javax/xml/ws/Endpoint.java
trunk/core/src/openjdk/javax/javax/xml/ws/Holder.java
trunk/core/src/openjdk/javax/javax/xml/ws/LogicalMessage.java
trunk/core/src/openjdk/javax/javax/xml/ws/ProtocolException.java
trunk/core/src/openjdk/javax/javax/xml/ws/Provider.java
trunk/core/src/openjdk/javax/javax/xml/ws/RequestWrapper.java
trunk/core/src/openjdk/javax/javax/xml/ws/Response.java
trunk/core/src/openjdk/javax/javax/xml/ws/ResponseWrapper.java
trunk/core/src/openjdk/javax/javax/xml/ws/Service.java
trunk/core/src/openjdk/javax/javax/xml/ws/ServiceMode.java
trunk/core/src/openjdk/javax/javax/xml/ws/WebEndpoint.java
trunk/core/src/openjdk/javax/javax/xml/ws/WebFault.java
trunk/core/src/openjdk/javax/javax/xml/ws/WebServiceClient.java
trunk/core/src/openjdk/javax/javax/xml/ws/WebServiceContext.java
trunk/core/src/openjdk/javax/javax/xml/ws/WebServiceException.java
trunk/core/src/openjdk/javax/javax/xml/ws/WebServicePermission.java
trunk/core/src/openjdk/javax/javax/xml/ws/WebServiceProvider.java
trunk/core/src/openjdk/javax/javax/xml/ws/WebServiceRef.java
trunk/core/src/openjdk/javax/javax/xml/ws/WebServiceRefs.java
trunk/core/src/openjdk/javax/javax/xml/ws/handler/
trunk/core/src/openjdk/javax/javax/xml/ws/handler/Handler.java
trunk/core/src/openjdk/javax/javax/xml/ws/handler/HandlerResolver.java
trunk/core/src/openjdk/javax/javax/xml/ws/handler/LogicalHandler.java
trunk/core/src/openjdk/javax/javax/xml/ws/handler/LogicalMessageContext.java
trunk/core/src/openjdk/javax/javax/xml/ws/handler/MessageContext.java
trunk/core/src/openjdk/javax/javax/xml/ws/handler/PortInfo.java
trunk/core/src/openjdk/javax/javax/xml/ws/handler/package.html
trunk/core/src/openjdk/javax/javax/xml/ws/handler/soap/
trunk/core/src/openjdk/javax/javax/xml/ws/handler/soap/SOAPHandler.java
trunk/core/src/openjdk/javax/javax/xml/ws/handler/soap/SOAPMessageContext.java
trunk/core/src/openjdk/javax/javax/xml/ws/handler/soap/package.html
trunk/core/src/openjdk/javax/javax/xml/ws/http/
trunk/core/src/openjdk/javax/javax/xml/ws/http/HTTPBinding.java
trunk/core/src/openjdk/javax/javax/xml/ws/http/HTTPException.java
trunk/core/src/openjdk/javax/javax/xml/ws/http/package.html
trunk/core/src/openjdk/javax/javax/xml/ws/package.html
trunk/core/src/openjdk/javax/javax/xml/ws/soap/
trunk/core/src/openjdk/javax/javax/xml/ws/soap/SOAPBinding.java
trunk/core/src/openjdk/javax/javax/xml/ws/soap/SOAPFaultException.java
trunk/core/src/openjdk/javax/javax/xml/ws/soap/package.html
trunk/core/src/openjdk/javax/javax/xml/ws/spi/
trunk/core/src/openjdk/javax/javax/xml/ws/spi/FactoryFinder.java
trunk/core/src/openjdk/javax/javax/xml/ws/spi/Provider.java
trunk/core/src/openjdk/javax/javax/xml/ws/spi/ServiceDelegate.java
trunk/core/src/openjdk/javax/javax/xml/ws/spi/package.html
Added: trunk/core/src/openjdk/javax/javax/net/ssl/SSLContext.java
===================================================================
--- trunk/core/src/openjdk/javax/javax/net/ssl/SSLContext.java (rev 0)
+++ trunk/core/src/openjdk/javax/javax/net/ssl/SSLContext.java 2007-06-25 09:36:18 UTC (rev 3307)
@@ -0,0 +1,423 @@
+/*
+ * Copyright 1999-2006 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package javax.net.ssl;
+
+import java.security.*;
+import java.util.*;
+
+import sun.security.jca.GetInstance;
+
+/**
+ * Instances of this class represent a secure socket protocol
+ * implementation which acts as a factory for secure socket
+ * factories or <code>SSLEngine</code>s. This class is initialized
+ * with an optional set of key and trust managers and source of
+ * secure random bytes.
+ *
+ * @since 1.4
+ * @version 1.37, 05/05/07
+ */
+public class SSLContext {
+ private final Provider provider;
+
+ private final SSLContextSpi contextSpi;
+
+ private final String protocol;
+
+ /**
+ * Creates an SSLContext object.
+ *
+ * @param contextSpi the delegate
+ * @param provider the provider
+ * @param protocol the protocol
+ */
+ protected SSLContext(SSLContextSpi contextSpi, Provider provider,
+ String protocol) {
+ this.contextSpi = contextSpi;
+ this.provider = provider;
+ this.protocol = protocol;
+ }
+
+ private static SSLContext defaultContext;
+
+ /**
+ * Returns the default SSL context.
+ *
+ * <p>If a default context was set using the {@link #setDefault
+ * SSLContext.setDefault()} method, it is returned. Otherwise, the first
+ * call of this method triggers the call
+ * <code>SSLContext.getInstance("Default")</code>.
+ * If successful, that object is made the default SSL context and returned.
+ *
+ * <p>The default context is immediately
+ * usable and does not require {@linkplain #init initialization}.
+ *
+ * @return the default SSL context
+ * @throws NoSuchAlgorithmException if the
+ * {@link SSLContext#getInstance SSLContext.getInstance()} call fails
+ * @since 1.6
+ */
+ public static synchronized SSLContext getDefault()
+ throws NoSuchAlgorithmException {
+ if (defaultContext == null) {
+ defaultContext = SSLContext.getInstance("Default");
+ }
+ return defaultContext;
+ }
+
+ /**
+ * Sets the default SSL context. It will be returned by subsequent calls
+ * to {@link #getDefault}. The default context must be immediately usable
+ * and not require {@linkplain #init initialization}.
+ *
+ * @param context the SSLContext
+ * @throws NullPointerException if context is null
+ * @throws SecurityException if a security manager exists and its
+ * <code>checkPermission</code> method does not allow
+ * <code>SSLPermission("setDefaultSSLContext")</code>
+ * @since 1.6
+ */
+ public static synchronized void setDefault(SSLContext context) {
+ if (context == null) {
+ throw new NullPointerException();
+ }
+ SecurityManager sm = System.getSecurityManager();
+ if (sm != null) {
+ sm.checkPermission(new SSLPermission("setDefaultSSLContext"));
+ }
+ defaultContext = context;
+ }
+
+ /**
+ * Returns a <code>SSLContext</code> object that implements the
+ * specified secure socket protocol.
+ *
+ * <p> This method traverses the list of registered security Providers,
+ * starting with the most preferred Provider.
+ * A new SSLContext object encapsulating the
+ * SSLContextSpi implementation from the first
+ * Provider that supports the specified protocol is returned.
+ *
+ * <p> Note that the list of registered providers may be retrieved via
+ * the {@link Security#getProviders() Security.getProviders()} method.
+ *
+ * @param protocol the standard name of the requested protocol.
+ * See Appendix A in the <a href=
+ * "{@docRoot}/../technotes/guides/security/jsse/JSSERefGuide.html#AppA">
+ * Java Secure Socket Extension Reference Guide </a>
+ * for information about standard protocol names.
+ *
+ * @return the new <code>SSLContext</code> object.
+ *
+ * @exception NoSuchAlgorithmException if no Provider supports a
+ * TrustManagerFactorySpi implementation for the
+ * specified protocol.
+ *
+ * @see java.security.Provider
+ */
+ public static SSLContext getInstance(String protocol)
+ throws NoSuchAlgorithmException {
+ GetInstance.Instance instance = GetInstance.getInstance
+ ("SSLContext", SSLContextSpi.class, protocol);
+ return new SSLContext((SSLContextSpi)instance.impl, instance.provider,
+ protocol);
+ }
+
+ /**
+ * Returns a <code>SSLContext</code> object that implements the
+ * specified secure socket protocol.
+ *
+ * <p> A new SSLContext object encapsulating the
+ * SSLContextSpi implementation from the specified provider
+ * is returned. The specified provider must be registered
+ * in the security provider list.
+ *
+ * <p> Note that the list of registered providers may be retrieved via
+ * the {@link Security#getProviders() Security.getProviders()} method.
+ *
+ * @param protocol the standard name of the requested protocol.
+ * See Appendix A in the <a href=
+ * "{@docRoot}/../technotes/guides//security/jsse/JSSERefGuide.html#AppA">
+ * Java Secure Socket Extension Reference Guide </a>
+ * for information about standard protocol names.
+ *
+ * @param provider the name of the provider.
+ *
+ * @return the new <code>SSLContext</code> object.
+ *
+ * @throws NoSuchAlgorithmException if a SSLContextSpi
+ * implementation for the specified protocol is not
+ * available from the specified provider.
+ *
+ * @throws NoSuchProviderException if the specified provider is not
+ * registered in the security provider list.
+ *
+ * @throws IllegalArgumentException if the provider name is null or empty.
+ *
+ * @see java.security.Provider
+ */
+ public static SSLContext getInstance(String protocol, String provider)
+ throws NoSuchAlgorithmException, NoSuchProviderException {
+ GetInstance.Instance instance = GetInstance.getInstance
+ ("SSLContext", SSLContextSpi.class, protocol, provider);
+ return new SSLContext((SSLContextSpi)instance.impl, instance.provider,
+ protocol);
+ }
+
+ /**
+ * Returns a <code>SSLContext</code> object that implements the
+ * specified secure socket protocol.
+ *
+ * <p> A new SSLContext object encapsulating the
+ * SSLContextSpi implementation from the specified Provider
+ * object is returned. Note that the specified Provider object
+ * does not have to be registered in the provider list.
+ *
+ * @param protocol the standard name of the requested protocol.
+ * See Appendix A in the <a href=
+ * "{@docRoot}/../technotes/guides/security/jsse/JSSERefGuide.html#AppA">
+ * Java Secure Socket Extension Reference Guide </a>
+ * for information about standard protocol names.
+ *
+ * @param provider an instance of the provider.
+ *
+ * @return the new <code>SSLContext</code> object.
+ *
+ * @throws NoSuchAlgorithmException if a KeyManagerFactorySpi
+ * implementation for the specified protocol is not available
+ * from the specified Provider object.
+ *
+ * @throws IllegalArgumentException if the provider name is null.
+ ...
[truncated message content] |