This commit is contained in:
Sean Mullan 2008-04-25 09:03:20 -04:00
commit 82c5bba334
243 changed files with 21725 additions and 4143 deletions

1
.hgtags Normal file
View File

@ -0,0 +1 @@
1cc8dd79fd1cd13d36b385196271a29632c67c3b jdk7-b24

1
.hgtags-top-repo Normal file
View File

@ -0,0 +1 @@
cfeea66a3fa8ca3686a7cfa2d0ce8ab0169f168d jdk7-b24

1
.jcheck/conf Normal file
View File

@ -0,0 +1 @@
project=jdk7

141
Makefile
View File

@ -23,25 +23,25 @@
# have any questions.
#
BUILD_PARENT_DIRECTORY=.
ifndef TOPDIR
TOPDIR:=$(shell \
if [ -r ./j2se/make/Makefile -o -r ./jdk/make/Makefile ]; then \
echo "."; \
else \
echo "../.."; \
fi)
TOPDIR:=.
endif
ifndef CONTROL_TOPDIR
CONTROL_TOPDIR=$(TOPDIR)/control
CONTROL_TOPDIR:=$(shell \
if [ -r $(TOPDIR)/control/make/Makefile ]; then \
echo "$(TOPDIR)/control"; \
else \
echo "$(TOPDIR)"; \
fi)
CONTROL_TOPDIR=$(TOPDIR)
endif
# Openjdk sources (only used if SKIP_OPENJDK_BUILD!=true)
OPENJDK_SOURCETREE=$(TOPDIR)/openjdk
OPENJDK_BUILDDIR:=$(shell \
if [ -r $(OPENJDK_SOURCETREE)/Makefile ]; then \
echo "$(OPENJDK_SOURCETREE)"; \
else \
echo "."; \
fi)
ifndef JDK_TOPDIR
JDK_TOPDIR=$(TOPDIR)/jdk
endif
@ -55,6 +55,7 @@ include ./make/Defs-internal.gmk
all::
@$(ECHO) $(PLATFORM) $(ARCH) $(RELEASE) build started: `$(DATE) '+%y-%m-%d %H:%M'`
$(MKDIR) -p $(OUTPUTDIR)
# Rules for sanity checks
include ./make/sanity-rules.gmk
@ -81,11 +82,24 @@ include ./make/deploy-rules.gmk
all:: setup build
setup:
setup: openjdk_check
$(MKDIR) -p $(OUTPUTDIR)/j2sdk-image
$(MKDIR) -p $(ABS_OUTPUTDIR)/j2sdk-image
$(MKDIR) -p $(OUTPUTDIR)-fastdebug/j2sdk-image
$(MKDIR) -p $(ABS_OUTPUTDIR)-fastdebug/j2sdk-image
# Check on whether we really can build the openjdk, need source etc.
openjdk_check: FRC
ifneq ($(SKIP_OPENJDK_BUILD), true)
@$(ECHO) " "
@$(ECHO) "================================================="
@if [ ! -r $(OPENJDK_BUILDDIR)/Makefile ] ; then \
$(ECHO) "ERROR: No openjdk source tree available at: $(OPENJDK_BUILDDIR)"; \
exit 1; \
else \
$(ECHO) "OpenJDK will be built after JDK is built"; \
$(ECHO) " OPENJDK_BUILDDIR=$(OPENJDK_BUILDDIR)"; \
fi
@$(ECHO) "================================================="
@$(ECHO) " "
endif
build:: sanity
@ -143,7 +157,7 @@ endif
COMMON_DEBUG_FLAGS= \
DEBUG_NAME=$(DEBUG_NAME) \
ALT_OUTPUTDIR=$(_OUTPUTDIR)-$(DEBUG_NAME) \
ALT_OUTPUTDIR=$(ABS_OUTPUTDIR)-$(DEBUG_NAME) \
NO_DOCS=true
product_build: setup
@ -190,46 +204,64 @@ ifneq ($(SKIP_COMPARE_IMAGES), true)
all :: compare-image
endif
ifeq ($(SKIP_OPENJDK_BUILD), false)
ifneq ($(SKIP_OPENJDK_BUILD), true)
all :: openjdk_build
endif
# If we have bundle rules, we have a chance here to do a complete cycle
# build, of production and open build.
# FIXUP: We should create the openjdk source bundle and build that?
# But how do we reliable create or get at a formal openjdk source tree?
# The one we have needs to be trimmed of built bits and closed dirs.
# The repositories might not be available.
# The openjdk source bundle is probably not available.
ifneq ($(SKIP_OPENJDK_BUILD), true)
ifeq ($(BUILD_JDK), true)
ifeq ($(BUNDLE_RULES_AVAILABLE), true)
# If we have bundle rules, we have a chance here to do a complete cycle
# build, of closed and open build.
# FIXUP: We should create the openjdk source bundle and build that?
ABS_OPENJDK_PLUGS=$(ABS_OUTPUTDIR)/$(OPENJDK_BINARY_PLUGS_INAME)
ABS_OPENJDK_OUTPUTDIR=$(ABS_OUTPUTDIR)/openjdk
OPENJDK_BUILD_NAME_PREFIX \
= $(J2SDK_NAME)-$(JDK_MKTG_UNDERSCORE_VERSION)-$(MILESTONE)
OPENJDK_BUILD_NAME_SUFFIX \
= $(BUILD_NUMBER)-$(PLATFORM)-$(ARCH)-$(BUNDLE_DATE)
OPENJDK_BUILD_NAME \
= $(OPENJDK_BUILD_NAME_PREFIX)-openjdk-$(OPENJDK_BUILD_NAME_SUFFIX)
OPENJDK_BUILD_BINARY_ZIP \
= $(ABS_BIN_BUNDLEDIR)/$(OPENJDK_BUILD_NAME).zip
all :: openjdk-build
openjdk-build:
OPENJDK_PLUGS=$(ABS_OUTPUTDIR)/$(OPENJDK_BINARY_PLUGS_INAME)
OPENJDK_OUTPUTDIR=$(ABS_OUTPUTDIR)/open-output
OPENJDK_BUILD_NAME \
= openjdk-$(JDK_MINOR_VERSION)-$(BUILD_NUMBER)-$(PLATFORM)-$(ARCH)-$(BUNDLE_DATE)
OPENJDK_BUILD_BINARY_ZIP=$(ABS_BIN_BUNDLEDIR)/$(OPENJDK_BUILD_NAME).zip
BUILT_IMAGE=$(ABS_OUTPUTDIR)/j2sdk-image
ifeq ($(PLATFORM)$(ARCH_DATA_MODEL),solaris64)
OPENJDK_BOOTDIR=$(BOOTDIR)
OPENJDK_IMPORTJDK=$(JDK_IMPORT_PATH)
else
OPENJDK_BOOTDIR=$(BUILT_IMAGE)
OPENJDK_IMPORTJDK=$(BUILT_IMAGE)
endif
openjdk_build:
@$(ECHO) " "
@$(ECHO) "================================================="
@$(ECHO) "Starting openjdk build"
@$(ECHO) " Using: ALT_JDK_DEVTOOLS_DIR=$(JDK_DEVTOOLS_DIR)"
@$(ECHO) "================================================="
@$(ECHO) " "
$(RM) -r $(ABS_OPENJDK_OUTPUTDIR)
$(MKDIR) -p $(ABS_OPENJDK_OUTPUTDIR)
$(MAKE) OPENJDK=true \
BUILD_LANGTOOLS=$(BUILD_LANGTOOLS) \
BUILD_CORBA=$(BUILD_CORBA) \
BUILD_JAXP=$(BUILD_JAXP) \
BUILD_JAXWS=$(BUILD_JAXWS) \
BUILD_HOTSPOT=$(BUILD_HOTSPOT) \
ALT_OUTPUTDIR=$(ABS_OPENJDK_OUTPUTDIR) \
ALT_BINARY_PLUGS_PATH=$(ABS_OUTPUTDIR)/$(OPENJDK_BINARY_PLUGS_INAME) \
ALT_BOOTDIR=$(ABS_OUTPUTDIR)/j2sdk-image \
ALT_JDK_IMPORT_PATH=$(ABS_OUTPUTDIR)/j2sdk-image \
product_build
$(RM) -r $(OPENJDK_OUTPUTDIR)
$(MKDIR) -p $(OPENJDK_OUTPUTDIR)
($(CD) $(OPENJDK_BUILDDIR) && $(MAKE) \
OPENJDK=true \
ALT_JDK_DEVTOOLS_DIR=$(JDK_DEVTOOLS_DIR) \
ALT_OUTPUTDIR=$(OPENJDK_OUTPUTDIR) \
ALT_BINARY_PLUGS_PATH=$(OPENJDK_PLUGS) \
ALT_BOOTDIR=$(OPENJDK_BOOTDIR) \
ALT_JDK_IMPORT_PATH=$(OPENJDK_IMPORTJDK) \
product_build )
$(RM) $(OPENJDK_BUILD_BINARY_ZIP)
( $(CD) $(ABS_OPENJDK_OUTPUTDIR)/j2sdk-image && \
( $(CD) $(OPENJDK_OUTPUTDIR)/j2sdk-image && \
$(ZIPEXE) -q -r $(OPENJDK_BUILD_BINARY_ZIP) .)
$(RM) -r $(ABS_OPENJDK_OUTPUTDIR)
$(RM) -r $(OPENJDK_OUTPUTDIR)
@$(ECHO) " "
@$(ECHO) "================================================="
@$(ECHO) "Finished openjdk build"
@$(ECHO) " Binary Bundle: $(OPENJDK_BUILD_BINARY_ZIP)"
@$(ECHO) "================================================="
@$(ECHO) " "
endif
endif
endif
@ -432,11 +464,11 @@ endif
# Cycle build. Build the jdk, use it to build the jdk again.
################################################################
ABS_BOOTJDK_OUTPUTDIR=$(ABS_OUTPUTDIR)/bootjdk
ABS_BOOTDIR_OUTPUTDIR=$(ABS_OUTPUTDIR)/bootjdk
boot_cycle:
$(MAKE) ALT_OUTPUTDIR=$(ABS_BOOTJDK_OUTPUTDIR) product_build
$(MAKE) ALT_BOOTDIR=$(ABS_BOOTJDK_OUTPUTDIR)/j2sdk-image product_build
$(MAKE) ALT_OUTPUTDIR=$(ABS_BOOTDIR_OUTPUTDIR) product_build
$(MAKE) ALT_BOOTDIR=$(ABS_BOOTDIR_OUTPUTDIR)/j2sdk-image product_build
################################################################
# JPRT rule to build
@ -452,7 +484,6 @@ include ./make/jprt.gmk
fastdebug_build debug_build product_build setup \
dev dev-build dev-sanity dev-clobber
# FIXUP: Old j2se targets
j2se_fastdebug_only: jdk_fastdebug_only
j2se_only: jdk_only
# Force target
FRC:

View File

@ -342,32 +342,29 @@
<blockquote>
<p>
The source code for the
OpenJDK is
delivered in <i>3</i> sibling directories:
The source code for the OpenJDK is delivered in a set of
directories:
<tt>hotspot</tt>,
<tt>langtools</tt>,
<tt>corba</tt>,
<tt>jaxws</tt>,
<tt>jaxp</tt>,
<tt>jdk</tt>
and
<tt>jdk</tt>.
The <tt>hotspot</tt> directory contains the source code and make
files for
building the
OpenJDK
Hotspot Virtual Machine.
The <tt>jdk</tt>
directory contains the source code and make files for
building the
OpenJDK
runtime libraries, tools and demos.
The top level Makefile is used to build the complete OpenJDK
release including building the hotspot
VM, staging the VM binaries, and building the
OpenJDK
runtime libraries,
tools and demos.
files for building the OpenJDK Hotspot Virtual Machine.
The <tt>langtools</tt> directory contains the source code and make
files for building the OpenJDK javac and language tools.
The <tt>corba</tt> directory contains the source code and make
files for building the OpenJDK Corba files.
The <tt>jaxws</tt> directory contains the source code and make
files for building the OpenJDK JAXWS files.
The <tt>jaxp</tt> directory contains the source code and make
files for building the OpenJDK JAXP files.
The <tt>jdk</tt> directory contains the source code and make files for
building the OpenJDK runtime libraries and misc files.
The top level <tt>Makefile</tt>
is used to build the entire OpenJDK.
</blockquote>
<!-- ------------------------------------------------------ -->
@ -730,17 +727,15 @@
under an open-source license.
In order to build an OpenJDK binary from source code,
you must first download and install the appropriate
binary plug bundles from the OpenJDK Download area.
binary plug bundles from the OpenJDK, go to the
<a href="http://openjdk.java.net">OpenJDK</a> site and select
the "<b>Bundles(7)</b>" link.
During the OpenJDK build process these "binary plugs"
for the encumbered components will be copied into your
resulting OpenJDK binary build image.
These binary plug files are only for the purpose of
building an OpenJDK binary.
Download the Binary Plugs by selecting the <b>Downloads</b>
link at
<a href="http://openjdk.java.net/">the OpenJDK site</a>,
install the bundle,
and make sure you set
Make sure you set
<tt><a href="#ALT_BINARY_PLUGS_PATH">ALT_BINARY_PLUGS_PATH</a></tt>
to the root of this installation.
</blockquote>

1
corba/.hgtags Normal file
View File

@ -0,0 +1 @@
55540e827aef970ecc010b7e06b912d991c8e3ce jdk7-b24

1
corba/.jcheck/conf Normal file
View File

@ -0,0 +1 @@
project=jdk7

View File

@ -281,6 +281,13 @@ endif
# Get platform specific settings
include $(BUILDDIR)/common/shared/Defs-$(PLATFORM).gmk
# Components
ifdef ALT_LANGTOOLS_DIST
LANGTOOLS_DIST :=$(call FullPath,$(ALT_LANGTOOLS_DIST))
else
LANGTOOLS_DIST =
endif
# These are the same on all platforms but require the above platform include 1st
# BOOTDIR: Bootstrap JDK, previous released JDK.

View File

@ -318,7 +318,7 @@ ORB classes:
11. RequestHandler and ORB
The RH interface is currently implemented in the ORB class, but migþt better be a separate
The RH interface is currently implemented in the ORB class, but might better be a separate
class. The API is currently almost the same as a ServerSubcontract. Should we regularize
this? Also, the API would need to be extended to handle shutdown properly.

View File

@ -774,18 +774,18 @@ module CORBA {
// orbos 98-01-18: Objects By Value -- end
enum TCKind {
tk_null, tk_void,
enum TCKind {
tk_null, tk_void,
tk_short, tk_long, tk_ushort, tk_ulong,
tk_float, tk_double, tk_boolean, tk_char,
tk_octet, tk_any, tk_TypeCode, tk_Principal, tk_objref,
tk_struct, tk_union, tk_enum, tk_string,
tk_sequence, tk_array, tk_alias, tk_except,
tk_longlong, tk_ulonglong, tk_longdouble,
tk_wchar, tk_wstring, tk_fixed,
tk_value, tk_value_box,
tk_native,
tk_abstract_interface
tk_float, tk_double, tk_boolean, tk_char,
tk_octet, tk_any, tk_TypeCode, tk_Principal, tk_objref,
tk_struct, tk_union, tk_enum, tk_string,
tk_sequence, tk_array, tk_alias, tk_except,
tk_longlong, tk_ulonglong, tk_longdouble,
tk_wchar, tk_wstring, tk_fixed,
tk_value, tk_value_box,
tk_native,
tk_abstract_interface
};
interface NativeDef : TypedefDef {

View File

@ -1042,24 +1042,24 @@ module DynamicAny {
/**
* DynValueCommon provides operations supported by both the DynValue and DynValueBox interfaces.
*/
interface DynValueCommon : DynAny {
interface DynValueCommon : DynAny {
/**
* Returns true if the DynValueCommon represents a null value type.
*/
boolean is_null();
boolean is_null();
/**
* Changes the representation of a DynValueCommon to a null value type.
*/
void set_to_null();
void set_to_null();
/**
* Replaces a null value type with a newly constructed value. Its components are initialized
* to default values as in DynAnyFactory.create_dyn_any_from_type_code.
* If the DynValueCommon represents a non-null value type, then this operation has no effect.
*/
void set_to_value();
};
void set_to_value();
};
/**
* DynValue objects support the manipulation of IDL non-boxed value types.
@ -1164,14 +1164,14 @@ module DynamicAny {
* of the boxed type. A DynValueBox representing a null value type has no components
* and a current position of -1.
*/
interface DynValueBox : DynValueCommon {
interface DynValueBox : DynValueCommon {
/**
* Returns the boxed value as an Any.
*
* @exception InvalidValue if this object represents a null value box type
*/
any get_boxed_value()
any get_boxed_value()
raises(InvalidValue);
/**
@ -1189,7 +1189,7 @@ module DynamicAny {
*
* @exception InvalidValue if this object represents a null value box type
*/
DynAny get_boxed_value_as_dyn_any()
DynAny get_boxed_value_as_dyn_any()
raises(InvalidValue);
/**
@ -1199,7 +1199,7 @@ module DynamicAny {
* @exception TypeMismatch if this object represents a non-null value box type and the type
* of the parameter is not matching the current boxed value type.
*/
void set_boxed_value_as_dyn_any(in DynAny boxed)
void set_boxed_value_as_dyn_any(in DynAny boxed)
raises(TypeMismatch);
};

1
hotspot/.hgtags Normal file
View File

@ -0,0 +1 @@
a61af66fc99eb5ec9d50c05b0c599757b1289ceb jdk7-b24

1
hotspot/.jcheck/conf Normal file
View File

@ -0,0 +1 @@
project=jdk7

1
jaxp/.hgtags Normal file
View File

@ -0,0 +1 @@
6ce5f4757bde08f7470cbb9f0b46da8f2f3d4f56 jdk7-b24

1
jaxp/.jcheck/conf Normal file
View File

@ -0,0 +1 @@
project=jdk7

View File

@ -90,7 +90,6 @@ ifdef ALT_OUTPUTDIR
else
OUTPUTDIR = ..
endif
ABS_OUTPUTDIR = $(call FullPath,$(OUTPUTDIR))
ifdef ALT_LANGTOOLS_DIST
ANT_OPTIONS += -Dbootstrap.dir=$(ALT_LANGTOOLS_DIST)/bootstrap
@ -127,7 +126,11 @@ $(ANT_TARGETS):
$(ANT_JAVA_HOME) $(ANT) $(ANT_OPTIONS) $@
# Targets for Sun's internal JPRT build system
JPRT_ARCHIVE_BUNDLE=$(OUTPUTDIR)/jprt.zip
jprt_build_product jprt_build_debug jprt_build_fastdebug: all
$(RM) $(JPRT_ARCHIVE_BUNDLE)
( cd $(OUTPUTDIR)/dist && \
zip -q -r $(JPRT_ARCHIVE_BUNDLE) . )
# Declare these phony (not filenames)
.PHONY: $(ANT_TARGETS) all clobber \

1
jaxws/.hgtags Normal file
View File

@ -0,0 +1 @@
0961a4a211765fea071b8dac419003ee0c3d5973 jdk7-b24

1
jaxws/.jcheck/conf Normal file
View File

@ -0,0 +1 @@
project=jdk7

View File

@ -69,7 +69,7 @@ else
endif
endif
# Note: j2se/make/common/Defs.gmk uses LANGUAGE_VERSION (-source NN)
# Note: jdk/make/common/Defs.gmk uses LANGUAGE_VERSION (-source NN)
# and the somewhat misnamed CLASS_VERSION (-target NN)
ifdef TARGET_CLASS_VERSION
ANT_OPTIONS += -Djavac.target=$(TARGET_CLASS_VERSION)
@ -90,7 +90,6 @@ ifdef ALT_OUTPUTDIR
else
OUTPUTDIR = ..
endif
ABS_OUTPUTDIR = $(call FullPath,$(OUTPUTDIR))
ifdef ALT_LANGTOOLS_DIST
ANT_OPTIONS += -Dbootstrap.dir=$(ALT_LANGTOOLS_DIST)/bootstrap
@ -127,7 +126,11 @@ $(ANT_TARGETS):
$(ANT_JAVA_HOME) $(ANT) $(ANT_OPTIONS) $@
# Targets for Sun's internal JPRT build system
JPRT_ARCHIVE_BUNDLE=$(OUTPUTDIR)/jprt.zip
jprt_build_product jprt_build_debug jprt_build_fastdebug: all
$(RM) $(JPRT_ARCHIVE_BUNDLE)
( cd $(OUTPUTDIR)/dist && \
zip -q -r $(JPRT_ARCHIVE_BUNDLE) . )
# Declare these phony (not filenames)
.PHONY: $(ANT_TARGETS) all clobber \

View File

@ -1 +1,2 @@
37a05a11f281b4d238e2f9e7ebb67c63f64d0e77 jdk7-b24
75fca0b0ab83ab1392e615910cea020f66535390 jdk7-b25

View File

@ -41,7 +41,7 @@ endif
# Omit mirror since it's built with the apt tool.
SUBDIRS = $(SCRIPT_SUBDIR) image security crypto/provider jndi jmx \
java inputmethods org xml rowset net/httpserver net/ssl demo \
tools jarsigner
tools jarsigner tracing
all build clean clobber::
$(SUBDIRS-loop)

View File

@ -0,0 +1,26 @@
#
# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
# SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
#
#
# Makefile for building tracing classes
#
BUILDDIR = ../../..
PACKAGE = com.sun.tracing
PRODUCT = sun
include $(BUILDDIR)/common/Defs.gmk
SUBDIRS = dtrace
all build:
$(SUBDIRS-loop)
clean clobber::
$(SUBDIRS-loop)
AUTO_FILES_JAVA_DIRS = com/sun/tracing
#
# Rules.
#
include $(BUILDDIR)/common/Classes.gmk

View File

@ -0,0 +1,19 @@
#
# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
# SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
#
#
# Makefile for building dtrace extension
#
BUILDDIR = ../../../..
PACKAGE = com.sun.tracing.dtrace
PRODUCT = sun
include $(BUILDDIR)/common/Defs.gmk
AUTO_FILES_JAVA_DIRS = com/sun/tracing/dtrace
#
# Rules.
#
include $(BUILDDIR)/common/Classes.gmk

View File

@ -32,6 +32,13 @@
# So when it includes other files, it must use JDK_TOPDIR.
#
# Check for strange explicit settings (change to empty or true)
ifdef OPENJDK
ifneq ($(OPENJDK),true)
x:=$(error "OPENJDK (if defined) can only be set to true")
endif
endif
#
# On Solaris, the 'make' utility from Sun will not work with these makefiles.
# This little rule is only understood by Sun's make, and is harmless
@ -87,19 +94,6 @@ ifeq ($(CLOSED_SRC_DIR_EXISTS), false)
OPENJDK = true
endif
# Check for strange explicit settings (change to empty or true)
ifdef OPENJDK
ifeq ($(OPENJDK),false)
# Silently treat as not defined
OPENJDK =
else
ifneq ($(OPENJDK),true)
dummy := $(warning "WARNING: OPENKJDK=$(OPENJDK) being treated as true")
OPENJDK = true
endif
endif
endif
# Define where closed directories are
ifdef OPENJDK
CLOSED_SRC =

View File

@ -67,16 +67,6 @@ ifeq ($(PLATFORM),windows)
UTILS_DEVTOOL_PATH=$(DEVTOOLS_PATH)
endif
# Utilities ant and findbugs
ifndef ANT_HOME
ANT_HOME = $(JDK_DEVTOOLS_DIR)/share/ant/latest
endif
ANT = $(ANT_HOME)/bin/ant
ifndef FINDBUGS_HOME
FINDBUGS_HOME = $(JDK_DEVTOOLS_DIR)/share/findbugs/latest
endif
FINDBUGS = $(FINDBUGS_HOME)/bin/findbugs
# Utilities
ADB = $(UTILS_COMMAND_PATH)adb
AR = $(UTILS_CCS_BIN_PATH)ar

View File

@ -512,6 +512,24 @@ JDK_CUPS_HEADERS_PATH=$(JDK_DEVTOOLS_DIR)/share/cups/include
endif
endif
# Utilities ant and findbugs
ifeq ($(ANT_HOME),)
ANT_HOME := $(call DirExists,/usr/share/ant,$(JDK_DEVTOOLS_DIR)/share/ant/latest,)
endif
ifeq ($(ANT_HOME),)
ANT = ant
else
ANT = $(ANT_HOME)/bin/ant
endif
ifeq ($(FINDBUGS_HOME),)
FINDBUGS_HOME := $(call DirExists,/usr/share/findbugs,$(JDK_DEVTOOLS_DIR)/share/findbugs/latest,)
endif
ifeq ($(FINDBUGS_HOME),)
FINDBUGS = findbugs
else
FINDBUGS = $(FINDBUGS_HOME)/bin/findbugs
endif
ifdef ALT_COPYRIGHT_YEAR
COPYRIGHT_YEAR = $(ALT_COPYRIGHT_YEAR)
else

View File

@ -270,7 +270,7 @@ ifeq ($(SYSTEM_UNAME), Linux)
REQUIRED_ALSA_VERSION = ^((0[.]9[.][1-9])|(1[.]0[.][0-9]))[0-9]*
endif
# How much RAM does this machine have:
MB_OF_MEMORY := $(shell free -m | fgrep Mem: | sed -e 's@\ \ *@ @g' | cut -d' ' -f2)
MB_OF_MEMORY := $(shell free -m | fgrep Mem: | awk '{print $$2;}' )
endif
# Windows with and without CYGWIN will be slightly different
@ -374,45 +374,35 @@ ifeq ($(PLATFORM), windows)
REQUIRED_DXSDK_VER = 0x0700
OS_VENDOR = Microsoft
# How much RAM does this machine have:
MB_OF_MEMORY := $(shell \
if [ -f "C:/cygwin/bin/free.exe" ] ; then \
( C:/cygwin/bin/bash.exe -c "C:/cygwin/bin/free.exe -m" ) | \
grep Mem: | \
sed -e 's@\ \ *@ @g' | cut -d' ' -f2 ; \
else \
echo "512"; \
fi)
endif
# Machines with 512Mb or less of real memory are considered low memory
# build machines and adjustments will be made to prevent excessing
# system swapping during the build.
# If we don't know, assume 512. Subtract 128 from MB for VM MAX.
# Don't set VM max over 1024-128=896.
ifneq ($(MB_OF_MEMORY),)
LOW_MEMORY_MACHINE := $(shell \
if [ $(MB_OF_MEMORY) -le 512 ] ; then \
echo "true"; \
else \
echo "false"; \
fi)
MAX_VM_MEMORY := $(shell \
if [ $(MB_OF_MEMORY) -le 1024 ] ; then \
expr $(MB_OF_MEMORY) '-' 128 ; \
else \
echo "896"; \
fi)
MIN_VM_MEMORY := $(shell \
if [ $(MAX_VM_MEMORY) -le 128 ] ; then \
expr $(MAX_VM_MEMORY) '-' 8 ; \
else \
echo "128"; \
fi)
else
MB_OF_MEMORY := unknown
LOW_MEMORY_MACHINE := true
MAX_VM_MEMORY := 384
MIN_VM_MEMORY := 128
ifeq ($(USING_CYGWIN),true)
# CYGWIN has the 'free' utility
_MB_OF_MEMORY := \
$(shell free -m | grep Mem: | awk '{print $$2;}' )
else
# Windows 2000 has the mem utility, but two memory areas
# extended memory is what is beyond 1024M
_B_OF_EXT_MEMORY := \
$(shell mem 2> $(DEV_NULL) | grep 'total contiguous extended memory' | awk '{print $$1;}')
ifeq ($(_B_OF_EXT_MEMORY),)
_B_OF_MEMORY := \
$(shell mem 2> $(DEV_NULL) | grep 'total conventional memory' | awk '{print $$1;}')
else
_B_OF_MEMORY := \
$(shell expr 1048576 '+' $(_B_OF_EXT_MEMORY) 2> $(DEV_NULL))
endif
ifeq ($(_B_OF_MEMORY),)
# Windows 2003 has the systeminfo utility use it if mem doesn't work
_MB_OF_MEMORY := \
$(shell systeminfo 2> $(DEV_NULL) | grep 'Total Physical Memory:' | awk '{print $$4;}' | sed -e 's@,@@')
else
_MB_OF_MEMORY := $(shell expr $(_B_OF_MEMORY) '/' 1024 2> $(DEV_NULL))
endif
endif
ifeq ($(shell expr $(_MB_OF_MEMORY) '+' 0 2> $(DEV_NULL)), $(_MB_OF_MEMORY))
MB_OF_MEMORY := $(_MB_OF_MEMORY)
else
MB_OF_MEMORY := 512
endif
endif
REQUIRED_ZIP_VER = 2.2
@ -452,6 +442,37 @@ ifneq ($(PLATFORM), windows)
ARCH_VM_SUBDIR=jre/lib/$(LIBARCH)
endif
# Machines with 512Mb or less of real memory are considered low memory
# build machines and adjustments will be made to prevent excessing
# system swapping during the build.
# If we don't know, assume 512. Subtract 128 from MB for VM MAX.
# Don't set VM max over 1024-128=896.
ifneq ($(MB_OF_MEMORY),)
LOW_MEMORY_MACHINE := $(shell \
if [ $(MB_OF_MEMORY) -le 512 ] ; then \
echo "true"; \
else \
echo "false"; \
fi)
MAX_VM_MEMORY := $(shell \
if [ $(MB_OF_MEMORY) -le 1024 ] ; then \
expr $(MB_OF_MEMORY) '-' 128 2> $(DEV_NULL) ; \
else \
echo "896"; \
fi)
MIN_VM_MEMORY := $(shell \
if [ $(MAX_VM_MEMORY) -le 128 ] ; then \
expr $(MAX_VM_MEMORY) '-' 8 2> $(DEV_NULL) ; \
else \
echo "128"; \
fi)
else
MB_OF_MEMORY := unknown
LOW_MEMORY_MACHINE := true
MAX_VM_MEMORY := 384
MIN_VM_MEMORY := 128
endif
# If blanks in the username, use the first 4 words and pack them together
_USER1:=$(subst ', ,$(_USER))
_USER2:=$(subst ", ,$(_USER1))

View File

@ -105,13 +105,21 @@ ZIP_VER :=$(call GetVersion,"$(_ZIP_VER)")
UNZIP_VER :=$(call GetVersion,"$(_UNZIP_VER)")
BOOT_VER :=$(call GetVersion,"$(_BOOT_VER)")
REQUIRED_ANT_VER := 1.6.3
_ANT_VER :=$(shell $(ANT) -version 2>&1 )
ANT_VER :=$(call GetVersion,"$(_ANT_VER)")
REQUIRED_ANT_VER := 1.6.3
ifeq ($(ANT_HOME),)
_ANT_VER:=$(shell JAVACMD="$(BOOTDIR)/bin/java" $(ANT) -version 2>&1 )
else
_ANT_VER:=$(shell JAVACMD="$(BOOTDIR)/bin/java" ANT_HOME="$(ANT_HOME)" $(ANT) -version 2>&1 )
endif
ANT_VER:=$(call GetVersion,"$(_ANT_VER)")
REQUIRED_FINDBUGS_VER := 1.1
_FINDBUGS_VER :=$(shell $(FINDBUGS) -version 2>&1 )
FINDBUGS_VER :=$(call GetVersion,"$(_FINDBUGS_VER)")
REQUIRED_FINDBUGS_VER := 1.2
ifeq ($(FINDBUGS_HOME),)
_FINDBUGS_VER:=$(shell $(FINDBUGS) -javahome "$(BOOTDIR)" -textui -version 2>&1 )
else
_FINDBUGS_VER:=$(shell FINDBUGS_HOME="$(FINDBUGS_HOME)" $(FINDBUGS) -javahome "$(BOOTDIR)" -textui -version 2>&1 )
endif
FINDBUGS_VER:=$(call GetVersion,"$(_FINDBUGS_VER)")
ifdef ALT_BINDIR
ALT_BINDIR_VERSION := $(shell $(ALT_BINDIR)/java$(EXE_SUFFIX) -version 2>&1 | $(NAWK) -F'"' '{ print $$2 }')
@ -1564,31 +1572,31 @@ ifeq ($(ARCH_DATA_MODEL), 32)
endif
######################################################
# SECURITY_BASELINE_142 test
######################################################
security_baseline_142:
ifeq ($(PLATFORM), windows)
@if [ -z "$(SECURITY_BASELINE_142)" ]; then \
$(ECHO) "WARNING: Your SECURITY_BASELINE_142 setting is empty.\n" \
" Setting it to the default value of 1.4.2_10.\n" \
" It is recommended to set SECURITY_BASELINE_142.\n" \
"" >> $(WARNING_FILE) ; \
fi
endif
######################################################
# SECURITY_BASELINE_150 test
######################################################
security_baseline_150:
ifeq ($(PLATFORM), windows)
@if [ -z "$(SECURITY_BASELINE_150)" ]; then \
$(ECHO) "WARNING: Your SECURITY_BASELINE_150 setting is empty.\n" \
" Setting it to the default value of 1.5.0_07.\n" \
" It is recommended to set SECURITY_BASELINE_150.\n" \
"" >> $(WARNING_FILE) ; \
fi
endif
######################################################
# SECURITY_BASELINE_142 test
######################################################
security_baseline_142:
ifeq ($(PLATFORM), windows)
@if [ -z "$(SECURITY_BASELINE_142)" ]; then \
$(ECHO) "WARNING: Your SECURITY_BASELINE_142 setting is empty.\n" \
" Setting it to the default value of 1.4.2_10.\n" \
" It is recommended to set SECURITY_BASELINE_142.\n" \
"" >> $(WARNING_FILE) ; \
fi
endif
######################################################
# SECURITY_BASELINE_150 test
######################################################
security_baseline_150:
ifeq ($(PLATFORM), windows)
@if [ -z "$(SECURITY_BASELINE_150)" ]; then \
$(ECHO) "WARNING: Your SECURITY_BASELINE_150 setting is empty.\n" \
" Setting it to the default value of 1.5.0_07.\n" \
" It is recommended to set SECURITY_BASELINE_150.\n" \
"" >> $(WARNING_FILE) ; \
fi
endif
######################################################

View File

@ -49,8 +49,8 @@ EXCLUDE_PKGS = \
# ACTIVE_JSR_PKGS are packages that are part of an active JSR process--
# one that is doing its own review. These packages are not included when
# creating diff pages for the platform's JCP process.
#
# (see /java/pubs/apisrc/jdk/6.0/beta/make/docs/active_jsr_pkgs)
#
# (see /java/pubs/apisrc/jdk/6.0/beta/make/docs/active_jsr_pkgs)
# Note:
# This is a list of regular expressions. So foo.* matches "foo" and "foo.bar".
#
@ -72,13 +72,13 @@ ACTIVE_JSR_PKGS= \
# CORE_PKGS is the list of packages that form the
# Java API Specification.
#
### ***IMPORTANT NOTE***
### There is also a "REGEXP" variable in the docs/makefile that
### determines which table the packages go in on the main page.
### Currently, there is only table ("Platform Packages") and
### everything goes in it, so REGEXP is "*". But if that policy
### changes, packages added will need to be reflected in that
### list of wildcard expressions, as well.
### ***IMPORTANT NOTE***
### There is also a "REGEXP" variable in the docs/makefile that
### determines which table the packages go in on the main page.
### Currently, there is only table ("Platform Packages") and
### everything goes in it, so REGEXP is "*". But if that policy
### changes, packages added will need to be reflected in that
### list of wildcard expressions, as well.
###
CORE_PKGS = \
java.applet \

View File

@ -272,6 +272,28 @@ SMARTCARDIO_DOCTITLE = "Java$(TRADEMARK) Smart Card I/O"
SMARTCARDIO_JAVADOCHEADER = "Java Smart Card I/O"
# SMARTCARDIO_PKGS is located in NON_CORE_PKGS.gmk
#
# Variables used by TRACING target
#
TRACING_SOURCEPATH = $(TOPDIR)/src/share/classes
TRACING_DOCDIR = $(DOCSDIR)/jre/api/tracing
TRACING_JAVADOCFLAGS = $(COMMON_JAVADOCFLAGS) \
-encoding ascii \
-nodeprecatedlist \
-d $(TRACING_DOCDIR) \
-sourcepath $(TRACING_SOURCEPATH) \
-windowtitle $(TRACING_WINDOWTITLE) \
-doctitle $(TRACING_DOCTITLE) \
-header $(TRACING_JAVADOCHEADER) \
-linkoffline ../../../../../api $(DOCSDIR)/api/
TRACING_WINDOWTITLE = "Tracing"
TRACING_DOCTITLE = "Java$(TRADEMARK) Platform Tracing"
TRACING_JAVADOCHEADER = "Platform Tracing"
# TRACING_PKGS is located in NON_CORE_PKGS.gmk
#
# Variables used by HTTPSERVER target
#
@ -420,6 +442,7 @@ ALL_OTHER_TARGETS = \
jaasdocs \
jgssdocs \
smartcardiodocs \
tracingdocs \
httpserverdocs \
mgmtdocs \
attachdocs \
@ -585,6 +608,14 @@ smartcardiodocs:
$(JAVADOC_CMD) $(SMARTCARDIO_JAVADOCFLAGS) \
$(SMARTCARDIO_PKGS)
.PHONY: tracingdocs
tracingdocs:
@# ######## api-tracing ############################
$(RM) -r $(TRACING_DOCDIR)
$(MKDIR) -p $(TRACING_DOCDIR)
$(JAVADOC) $(TRACING_JAVADOCFLAGS) \
$(TRACING_PKGS)
.PHONY: httpserverdocs
httpserverdocs:
@# ######## api-httpserver #######################

View File

@ -84,6 +84,9 @@ TREEAPI_PKGS = com.sun.source.tree \
SMARTCARDIO_PKGS = javax.smartcardio
TRACING_PKGS = com.sun.tracing \
com.sun.tracing.dtrace
# non-core packages in rt.jar
NON_CORE_PKGS = $(DOMAPI_PKGS) \
$(MGMT_PKGS) \
@ -91,4 +94,5 @@ NON_CORE_PKGS = $(DOMAPI_PKGS) \
$(JGSS_PKGS) \
$(OLD_JSSE_PKGS) \
$(HTTPSERVER_PKGS) \
$(SMARTCARDIO_PKGS)
$(SMARTCARDIO_PKGS) \
$(TRACING_PKGS)

View File

@ -33,6 +33,7 @@ FILES_java = \
sun/nio/cs/AbstractCharsetProvider.java \
sun/nio/cs/HistoricallyNamedCharset.java \
sun/nio/cs/Surrogate.java \
sun/nio/cs/CharsetMapping.java \
sun/nio/cs/SingleByteEncoder.java \
sun/nio/cs/SingleByteDecoder.java \
sun/nio/cs/UnicodeEncoder.java \

View File

@ -63,7 +63,7 @@ SUBDIRS = jar security javazic misc net audio $(RENDER_SUBDIR) image \
$(HEADLESS_SUBDIR) $(DGA_SUBDIR) \
font jpeg cmm applet rmi beans $(JDBC_SUBDIR) \
jawt text nio launcher management $(ORG_SUBDIR) \
native2ascii serialver tools jconsole
native2ascii serialver tools jconsole tracing
all build clean clobber::
$(SUBDIRS-loop)

View File

@ -1,5 +1,5 @@
#
# Copyright 1996-2006 Sun Microsystems, Inc. All Rights Reserved.
# Copyright 1996-2008 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
@ -73,11 +73,21 @@ build: $(CHARSETS_JAR)
SERVICE_DESCRIPTION = java.nio.charset.spi.CharsetProvider
SERVICE_DESCRIPTION_PATH = META-INF/services/$(SERVICE_DESCRIPTION)
GENCSDATASRC = $(BUILDDIR)/tools/CharsetMapping
FILES_MAP = $(GENCSDATASRC)/sjis0213.map
FILES_DAT = $(CLASSDESTDIR)/sun/nio/cs/ext/sjis0213.dat
CHARSETMAPPING_JARFILE = $(BUILDTOOLJARDIR)/charsetmapping.jar
$(FILES_DAT): $(FILES_MAP)
@$(prep-target)
$(BOOT_JAVA_CMD) -jar $(CHARSETMAPPING_JARFILE) \
$(FILES_MAP) $(FILES_DAT)
$(CLASSDESTDIR)/$(SERVICE_DESCRIPTION_PATH): \
$(SHARE_SRC)/classes/sun/nio/cs/ext/$(SERVICE_DESCRIPTION_PATH)
$(install-file)
$(CHARSETS_JAR): $(FILES_class) $(CLASSDESTDIR)/$(SERVICE_DESCRIPTION_PATH)
$(CHARSETS_JAR): $(FILES_class) $(CLASSDESTDIR)/$(SERVICE_DESCRIPTION_PATH) $(FILES_DAT)
$(BOOT_JAR_CMD) cf $(CHARSETS_JAR) \
-C $(CLASSDESTDIR) sun \
-C $(CLASSDESTDIR) $(SERVICE_DESCRIPTION_PATH) \

View File

@ -0,0 +1,26 @@
#
# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
# SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
#
#
# Makefile for building tracing package implementation classes
#
BUILDDIR = ../..
PACKAGE = sun.tracing
PRODUCT = sun
include $(BUILDDIR)/common/Defs.gmk
SUBDIRS = dtrace
all build:
$(SUBDIRS-loop)
clean clobber::
$(SUBDIRS-loop)
AUTO_FILES_JAVA_DIRS = sun/tracing
#
# Rules.
#
include $(BUILDDIR)/common/Classes.gmk

View File

@ -0,0 +1,59 @@
#
# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
# SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
#
#
# Makefile for building dtrace extension
#
BUILDDIR = ../../..
PACKAGE = sun.tracing.dtrace
LIBRARY = jsdt
PRODUCT = sun
include $(BUILDDIR)/common/Defs.gmk
#
# Use mapfile
#
FILES_m = mapfile-vers
include $(BUILDDIR)/common/Mapfile-vers.gmk
NATIVE_DTRACE_DIR=native/sun/tracing/dtrace
SRCDIR=$(SHARE_SRC)/$(NATIVE_DTRACE_DIR)
PSRCDIR=$(PLATFORM_SRC)/$(NATIVE_DTRACE_DIR)
FILES_c = JVM.c jvm_symbols_md.c
FILES_java = \
sun/tracing/dtrace/Activation.java \
sun/tracing/dtrace/DTraceProvider.java \
sun/tracing/dtrace/DTraceProbe.java \
sun/tracing/dtrace/DTraceProviderFactory.java \
sun/tracing/dtrace/JVM.java
FILES_export = $(FILES_java)
ifeq ($(PLATFORM), linux)
OTHER_LDLIBS += -ldl
endif
#
# Use JNI for generating header files
#
JAVAHFLAGS += -jni
#
# Don't need to link against -ljava
#
JAVALIB=
#
# Rules.
#
include $(BUILDDIR)/common/Library.gmk
#
# Add to ambient vpath so we pick up the library files
#
vpath %.c $(SRCDIR):$(PSRCDIR)

View File

@ -0,0 +1,19 @@
#
#ident "@(#)mapfile-vers 1.1 07/08/14"
#
# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
# SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
#
# Define library interface.
SUNWprivate_1.1 {
global:
Java_sun_tracing_dtrace_JVM_isSupported0;
Java_sun_tracing_dtrace_JVM_activate0;
Java_sun_tracing_dtrace_JVM_dispose0;
Java_sun_tracing_dtrace_JVM_isEnabled0;
Java_sun_tracing_dtrace_JVM_defineClass0;
local:
*;
};

View File

@ -1,7 +1,5 @@
#!/bin/sh
#
# Copyright 2006 Sun Microsystems, Inc. All Rights Reserved.
# Copyright 2008 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
@ -25,6 +23,21 @@
# have any questions.
#
mydir="`dirname $0`"
#
# Makefile for building the charsetmapping tool
#
BUILDDIR = ../..
PACKAGE = build.tools.charsetmapping
PRODUCT = tools
PROGRAM = charsetmapping
include $(BUILDDIR)/common/Defs.gmk
BUILDTOOL_SOURCE_ROOT = $(BUILDDIR)/tools/src
BUILDTOOL_MAIN = $(PKGDIR)/GenerateMapping.java
#
# Build tool jar rules.
#
include $(BUILDDIR)/common/BuildToolJar.gmk
java -jar "${mydir}"/../lib/javac.jar "$@"

File diff suppressed because it is too large Load Diff

View File

@ -50,7 +50,8 @@ SUBDIRS = \
jdwpgen \
makeclasslist \
strip_properties \
winver
winver \
CharsetMapping
all build clean clobber::
$(SUBDIRS-loop)

View File

@ -26,13 +26,16 @@
/* Test program for freetype sanity check.
Prints "Failed" messages to STDOUT if check fails. */
#include <stdio.h>
#include <string.h>
#include "ft2build.h"
#include FT_FREETYPE_H
#define QUOTEMACRO(x) QUOTEME(x)
#define QUOTEME(x) #x
int main(char** argv, int argc) {
int main(int argc, char** argv) {
char v[50];
FT_Int major, minor, patch;
FT_Library library;

View File

@ -0,0 +1,271 @@
/*
* Copyright 2008 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 build.tools.charsetmapping;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.BufferedReader;
import java.io.IOException;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.util.*;
public class CharsetMapping {
public final static char UNMAPPABLE_DECODING = '\uFFFD';
public final static int UNMAPPABLE_ENCODING = -1;
public static class Entry {
public int bs; //byte sequence reps
public int cp; //Unicode codepoint
public int cp2; //CC of composite
public Entry () {}
public Entry (int bytes, int cp, int cp2) {
this.bs = bytes;
this.cp = cp;
this.cp2 = cp2;
}
}
static Comparator<Entry> comparatorCP =
new Comparator<Entry>() {
public int compare(Entry m1, Entry m2) {
return m1.cp - m2.cp;
}
public boolean equals(Object obj) {
return this == obj;
}
};
public static class Parser {
static final Pattern basic = Pattern.compile("(?:0x)?(\\p{XDigit}++)\\s++(?:0x)?(\\p{XDigit}++)?\\s*+.*");
static final int gBS = 1;
static final int gCP = 2;
static final int gCP2 = 3;
BufferedReader reader;
boolean closed;
Matcher matcher;
int gbs, gcp, gcp2;
public Parser (InputStream in, Pattern p, int gbs, int gcp, int gcp2)
throws IOException
{
this.reader = new BufferedReader(new InputStreamReader(in));
this.closed = false;
this.matcher = p.matcher("");
this.gbs = gbs;
this.gcp = gcp;
this.gcp2 = gcp2;
}
public Parser (InputStream in, Pattern p) throws IOException {
this(in, p, gBS, gCP, gCP2);
}
public Parser (InputStream in) throws IOException {
this(in, basic, gBS, gCP, gCP2);
}
protected boolean isDirective(String line) {
return line.startsWith("#");
}
protected Entry parse(Matcher matcher, Entry mapping) {
mapping.bs = Integer.parseInt(matcher.group(gbs), 16);
mapping.cp = Integer.parseInt(matcher.group(gcp), 16);
if (gcp2 <= matcher.groupCount() &&
matcher.group(gcp2) != null)
mapping.cp2 = Integer.parseInt(matcher.group(gcp2), 16);
else
mapping.cp2 = 0;
return mapping;
}
public Entry next() throws Exception {
return next(new Entry());
}
// returns null and closes the input stream if the eof has beenreached.
public Entry next(Entry mapping) throws Exception {
if (closed)
return null;
String line;
while ((line = reader.readLine()) != null) {
if (isDirective(line))
continue;
matcher.reset(line);
if (!matcher.lookingAt()) {
//System.out.println("Missed: " + line);
continue;
}
return parse(matcher, mapping);
}
reader.close();
closed = true;
return null;
}
}
// tags of different charset mapping tables
private final static int MAP_SINGLEBYTE = 0x1; // 0..256 : c
private final static int MAP_DOUBLEBYTE1 = 0x2; // min..max: c
private final static int MAP_DOUBLEBYTE2 = 0x3; // min..max: c [DB2]
private final static int MAP_SUPPLEMENT = 0x5; // db,c
private final static int MAP_SUPPLEMENT_C2B = 0x6; // c,db
private final static int MAP_COMPOSITE = 0x7; // db,base,cc
private final static int MAP_INDEXC2B = 0x8; // index table of c->bb
private static final void writeShort(OutputStream out, int data)
throws IOException
{
out.write((data >>> 8) & 0xFF);
out.write((data ) & 0xFF);
}
private static final void writeShortArray(OutputStream out,
int type,
int[] array,
int off,
int size) // exclusive
throws IOException
{
writeShort(out, type);
writeShort(out, size);
for (int i = off; i < size; i++) {
writeShort(out, array[off+i]);
}
}
public static final void writeSIZE(OutputStream out, int data)
throws IOException
{
out.write((data >>> 24) & 0xFF);
out.write((data >>> 16) & 0xFF);
out.write((data >>> 8) & 0xFF);
out.write((data ) & 0xFF);
}
public static void writeINDEXC2B(OutputStream out, int[] indexC2B)
throws IOException
{
writeShort(out, MAP_INDEXC2B);
writeShort(out, indexC2B.length);
int off = 0;
for (int i = 0; i < indexC2B.length; i++) {
if (indexC2B[i] != 0) {
writeShort(out, off);
off += 256;
} else {
writeShort(out, -1);
}
}
}
public static void writeSINGLEBYTE(OutputStream out, int[] sb)
throws IOException
{
writeShortArray(out, MAP_SINGLEBYTE, sb, 0, 256);
}
private static void writeDOUBLEBYTE(OutputStream out,
int type,
int[] db,
int b1Min, int b1Max,
int b2Min, int b2Max)
throws IOException
{
writeShort(out, type);
writeShort(out, b1Min);
writeShort(out, b1Max);
writeShort(out, b2Min);
writeShort(out, b2Max);
writeShort(out, (b1Max - b1Min + 1) * (b2Max - b2Min + 1));
for (int b1 = b1Min; b1 <= b1Max; b1++) {
for (int b2 = b2Min; b2 <= b2Max; b2++) {
writeShort(out, db[b1 * 256 + b2]);
}
}
}
public static void writeDOUBLEBYTE1(OutputStream out,
int[] db,
int b1Min, int b1Max,
int b2Min, int b2Max)
throws IOException
{
writeDOUBLEBYTE(out, MAP_DOUBLEBYTE1, db, b1Min, b1Max, b2Min, b2Max);
}
public static void writeDOUBLEBYTE2(OutputStream out,
int[] db,
int b1Min, int b1Max,
int b2Min, int b2Max)
throws IOException
{
writeDOUBLEBYTE(out, MAP_DOUBLEBYTE2, db, b1Min, b1Max, b2Min, b2Max);
}
// the c2b table is output as well
public static void writeSUPPLEMENT(OutputStream out, Entry[] supp, int size)
throws IOException
{
writeShort(out, MAP_SUPPLEMENT);
writeShort(out, size * 2);
// db at first half, cc at the low half
for (int i = 0; i < size; i++) {
writeShort(out, supp[i].bs);
}
for (int i = 0; i < size; i++) {
writeShort(out, supp[i].cp);
}
//c2b
writeShort(out, MAP_SUPPLEMENT_C2B);
writeShort(out, size*2);
Arrays.sort(supp, 0, size, comparatorCP);
for (int i = 0; i < size; i++) {
writeShort(out, supp[i].cp);
}
for (int i = 0; i < size; i++) {
writeShort(out, supp[i].bs);
}
}
public static void writeCOMPOSITE(OutputStream out, Entry[] comp, int size)
throws IOException
{
writeShort(out, MAP_COMPOSITE);
writeShort(out, size*3);
// comp is sorted already
for (int i = 0; i < size; i++) {
writeShort(out, (char)comp[i].bs);
writeShort(out, (char)comp[i].cp);
writeShort(out, (char)comp[i].cp2);
}
}
}

View File

@ -0,0 +1,98 @@
/*
* Copyright 2008 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 build.tools.charsetmapping;
import java.io.*;
import java.util.regex.*;
import static build.tools.charsetmapping.CharsetMapping.*;
public class GenerateMapping {
public static void main(String argv[]) throws IOException {
if (argv.length < 2) {
System.out.println("Usage: java GenCSData fMap fDat");
System.exit(1);
}
genDataJIS0213(new FileInputStream(argv[0]),
new FileOutputStream(argv[1]));
}
// regex pattern to parse the "jis0213.map" file
static Pattern sjis0213 = Pattern.compile("0x(\\p{XDigit}++)\\s++U\\+(\\p{XDigit}++)(?:\\+(\\p{XDigit}++))?\\s++#.*");
private static void genDataJIS0213(InputStream in, OutputStream out)
{
int[] sb = new int[0x100]; // singlebyte
int[] db = new int[0x10000]; // doublebyte
int[] indexC2B = new int[256];
Entry[] supp = new Entry[0x10000];
Entry[] comp = new Entry[0x100];
int suppTotal = 0;
int compTotal = 0;
int b1Min1 = 0x81;
int b1Max1 = 0x9f;
int b1Min2 = 0xe0;
int b1Max2 = 0xfc;
int b2Min = 0x40;
int b2Max = 0xfe;
//init
for (int i = 0; i < 0x80; i++) sb[i] = i;
for (int i = 0x80; i < 0x100; i++) sb[i] = UNMAPPABLE_DECODING;
for (int i = 0; i < 0x10000; i++) db[i] = UNMAPPABLE_DECODING;
try {
Parser p = new Parser(in, sjis0213);
Entry e = null;
while ((e = p.next()) != null) {
if (e.cp2 != 0) {
comp[compTotal++] = e;
} else {
if (e.cp <= 0xffff) {
if (e.bs <= 0xff)
sb[e.bs] = e.cp;
else
db[e.bs] = e.cp;
indexC2B[e.cp>>8] = 1;
} else {
supp[suppTotal++] = e;
}
}
}
ByteArrayOutputStream baos = new ByteArrayOutputStream();
// c2b Index Table, always the first one
writeINDEXC2B(baos, indexC2B);
writeSINGLEBYTE(baos, sb);
writeDOUBLEBYTE1(baos, db, b1Min1, b1Max1, b2Min, b2Max);
writeDOUBLEBYTE2(baos, db, b1Min2, b1Max2, b2Min, b2Max);
writeSUPPLEMENT(baos, supp, suppTotal);
writeCOMPOSITE(baos, comp, compTotal);
writeSIZE(out, baos.size());
baos.writeTo(out);
out.close();
} catch (Exception x) {
x.printStackTrace();
}
}
}

0
jdk/make/tools/winver/bin/winver.exe Normal file → Executable file
View File

View File

@ -1,5 +1,5 @@
/*
* Copyright 2005-2006 Sun Microsystems, Inc. All Rights Reserved.
* Copyright 2005-2008 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
@ -50,7 +50,7 @@
#define JAR_ERROR2 "Error: Unable to access jarfile %s"
#define JAR_ERROR3 "Error: Invalid or corrupt jarfile %s"
#define CLS_ERROR1 "Error: Could not find the main class.\n" JNI_ERROR
#define CLS_ERROR1 "Error: Could not find the main class %s.\n" JNI_ERROR
#define CLS_ERROR2 "Error: Failed to load Main Class: %s\n%s"
#define CLS_ERROR3 "Error: No main method found in specified class.\n" GEN_ERROR
#define CLS_ERROR4 "Error: Main method not public\n" GEN_ERROR

View File

@ -1,5 +1,5 @@
/*
* Copyright 1995-2007 Sun Microsystems, Inc. All Rights Reserved.
* Copyright 1995-2008 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
@ -414,7 +414,7 @@ JavaMain(void * _args)
mainClass = LoadClass(env, classname);
if(mainClass == NULL) { /* exception occured */
ReportExceptionDescription(env);
ReportErrorMessage(CLS_ERROR1);
ReportErrorMessage(CLS_ERROR1, classname);
goto leave;
}
(*env)->ReleaseStringUTFChars(env, mainClassName, classname);
@ -433,7 +433,7 @@ JavaMain(void * _args)
mainClass = LoadClass(env, classname);
if(mainClass == NULL) { /* exception occured */
ReportExceptionDescription(env);
ReportErrorMessage(CLS_ERROR1);
ReportErrorMessage(CLS_ERROR1, classname);
goto leave;
}
(*env)->ReleaseStringUTFChars(env, mainClassName, classname);

View File

@ -1,5 +1,6 @@
#
# Default Input method display names for Indic input methods
#
DisplayName.Devanagari = Devanagari Input Method
#
# Default Input method display names for Indic input methods
#
DisplayName.Devanagari = Devanagari Input Method

View File

@ -1,5 +1,6 @@
#
# Default Input method display names for Thai input methods
#
DisplayName.Thai = Thai Input Method
#
# Default Input method display names for Thai input methods
#
DisplayName.Thai = Thai Input Method

View File

@ -34,8 +34,6 @@ import java.util.Set;
import java.util.HashSet;
import java.util.WeakHashMap;
import java.lang.ref.WeakReference;
import java.io.PrintWriter;
import java.io.StringWriter;
import java.security.AccessControlContext;
import java.security.Permission;
import java.security.ProtectionDomain;
@ -51,7 +49,6 @@ import javax.management.InstanceAlreadyExistsException;
import javax.management.InstanceNotFoundException;
import javax.management.IntrospectionException;
import javax.management.InvalidAttributeValueException;
import javax.management.JMException;
import javax.management.JMRuntimeException;
import javax.management.ListenerNotFoundException;
import javax.management.MalformedObjectNameException;
@ -84,11 +81,10 @@ import static com.sun.jmx.defaults.JmxProperties.MBEANSERVER_LOGGER;
import com.sun.jmx.mbeanserver.DynamicMBean2;
import com.sun.jmx.mbeanserver.ModifiableClassLoaderRepository;
import com.sun.jmx.mbeanserver.MBeanInstantiator;
import com.sun.jmx.mbeanserver.MXBeanSupport;
import com.sun.jmx.mbeanserver.Repository;
import com.sun.jmx.mbeanserver.NamedObject;
import com.sun.jmx.defaults.ServiceName;
import com.sun.jmx.mbeanserver.Introspector;
import com.sun.jmx.mbeanserver.Util;
import com.sun.jmx.remote.util.EnvHelp;
/**
@ -623,18 +619,9 @@ public class DefaultMBeanServerInterceptor implements MBeanServerInterceptor {
List<String> result = new ArrayList<String>(domains.length);
for (int i = 0; i < domains.length; i++) {
try {
ObjectName domain = new ObjectName(domains[i] + ":x=x");
ObjectName domain = Util.newObjectName(domains[i] + ":x=x");
checkMBeanPermission((String) null, null, domain, "getDomains");
result.add(domains[i]);
} catch (MalformedObjectNameException e) {
// Should never occur... But let's log it just in case.
if (MBEANSERVER_LOGGER.isLoggable(Level.SEVERE)) {
MBEANSERVER_LOGGER.logp(Level.SEVERE,
DefaultMBeanServerInterceptor.class.getName(),
"getDomains",
"Failed to check permission for domain = " +
domains[i], e);
}
} catch (SecurityException e) {
// OK: Do not add this domain to the list
}

View File

@ -107,10 +107,7 @@ class MBeanAnalyzer<M> {
private MBeanAnalyzer(Class<?> mbeanInterface,
MBeanIntrospector<M> introspector)
throws NotCompliantMBeanException {
if (!mbeanInterface.isInterface()) {
throw new NotCompliantMBeanException("Not an interface: " +
mbeanInterface.getName());
}
introspector.checkCompliance(mbeanInterface);
try {
initMaps(mbeanInterface, introspector);
@ -121,11 +118,10 @@ class MBeanAnalyzer<M> {
// Introspect the mbeanInterface and initialize this object's maps.
//
private void initMaps(Class<?> mbeanInterface,
private void initMaps(Class<?> mbeanType,
MBeanIntrospector<M> introspector) throws Exception {
final Method[] methodArray = mbeanInterface.getMethods();
final List<Method> methods = eliminateCovariantMethods(methodArray);
final List<Method> methods1 = introspector.getMethods(mbeanType);
final List<Method> methods = eliminateCovariantMethods(methods1);
/* Run through the methods to detect inconsistencies and to enable
us to give getter and setter together to visitAttribute. */
@ -234,13 +230,13 @@ class MBeanAnalyzer<M> {
but existing code may depend on it and users may be used to seeing
operations or attributes appear in a particular order. */
static List<Method>
eliminateCovariantMethods(Method[] methodArray) {
eliminateCovariantMethods(List<Method> startMethods) {
// We are assuming that you never have very many methods with the
// same name, so it is OK to use algorithms that are quadratic
// in the number of methods with the same name.
final int len = methodArray.length;
final Method[] sorted = methodArray.clone();
final int len = startMethods.size();
final Method[] sorted = startMethods.toArray(new Method[len]);
Arrays.sort(sorted,MethodOrder.instance);
final Set<Method> overridden = newSet();
for (int i=1;i<len;i++) {
@ -259,7 +255,7 @@ class MBeanAnalyzer<M> {
}
}
final List<Method> methods = newList(Arrays.asList(methodArray));
final List<Method> methods = newList(startMethods);
methods.removeAll(overridden);
return methods;
}

View File

@ -34,6 +34,7 @@ import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.lang.reflect.Type;
import java.util.Arrays;
import java.util.List;
import java.util.WeakHashMap;
@ -169,6 +170,19 @@ abstract class MBeanIntrospector<M> {
*/
abstract Descriptor getMBeanDescriptor(Class<?> resourceClass);
void checkCompliance(Class<?> mbeanType) throws NotCompliantMBeanException {
if (!mbeanType.isInterface()) {
throw new NotCompliantMBeanException("Not an interface: " +
mbeanType.getName());
}
}
/**
* Get the methods to be analyzed to build the MBean interface.
*/
List<Method> getMethods(final Class<?> mbeanType) throws Exception {
return Arrays.asList(mbeanType.getMethods());
}
final PerInterface<M> getPerInterface(Class<?> mbeanInterface)
throws NotCompliantMBeanException {

View File

@ -0,0 +1,81 @@
/*
* Copyright 2007 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 com.sun.jmx.mbeanserver;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.List;
import javax.management.NotCompliantMBeanException;
import javax.management.Notification;
/**
* <p>A variant of {@code StandardMBeanSupport} where the only
* methods included are public getters. This is used by
* {@code QueryNotificationFilter} to pretend that a Notification is
* an MBean so it can have a query evaluated on it. Standard queries
* never set attributes or invoke methods but custom queries could and
* we don't want to allow that. Also we don't want to fail if a
* Notification happens to have inconsistent types in a pair of getX and
* setX methods, and we want to include the Object.getClass() method.
*/
public class NotificationMBeanSupport extends StandardMBeanSupport {
public <T extends Notification> NotificationMBeanSupport(T n)
throws NotCompliantMBeanException {
super(n, Util.<Class<T>>cast(n.getClass()));
}
@Override
MBeanIntrospector<Method> getMBeanIntrospector() {
return introspector;
}
private static class Introspector extends StandardMBeanIntrospector {
@Override
void checkCompliance(Class<?> mbeanType) {}
@Override
List<Method> getMethods(final Class<?> mbeanType)
throws Exception {
List<Method> methods = new ArrayList<Method>();
for (Method m : mbeanType.getMethods()) {
String name = m.getName();
Class<?> ret = m.getReturnType();
if (m.getParameterTypes().length == 0) {
if ((name.startsWith("is") && name.length() > 2 &&
ret == boolean.class) ||
(name.startsWith("get") && name.length() > 3 &&
ret != void.class)) {
methods.add(m);
}
}
}
return methods;
}
}
private static final MBeanIntrospector<Method> introspector =
new Introspector();
}

View File

@ -438,7 +438,7 @@ public abstract class OpenConverter {
c.getClassLoader() == null);
final List<Method> methods =
MBeanAnalyzer.eliminateCovariantMethods(c.getMethods());
MBeanAnalyzer.eliminateCovariantMethods(Arrays.asList(c.getMethods()));
final SortedMap<String,Method> getterMap = newSortedMap();
/* Select public methods that look like "T getX()" or "boolean

View File

@ -415,17 +415,8 @@ public class Repository {
boolean to_default_domain = false;
// Set domain to default if domain is empty and not already set
if (dom.length() == 0) {
try {
name = new ObjectName(domain + name.toString());
} catch (MalformedObjectNameException e) {
if (MBEANSERVER_LOGGER.isLoggable(Level.FINEST)) {
MBEANSERVER_LOGGER.logp(Level.FINEST,
Repository.class.getName(), "addMBean",
"Unexpected MalformedObjectNameException", e);
}
}
}
if (dom.length() == 0)
name = Util.newObjectName(domain + name.toString());
// Do we have default domain ?
if (dom == domain) {

View File

@ -38,6 +38,8 @@ import java.util.Map;
import java.util.Set;
import java.util.SortedMap;
import java.util.TreeMap;
import javax.management.MalformedObjectNameException;
import javax.management.ObjectName;
public class Util {
static <K, V> Map<K, V> newMap() {
@ -85,6 +87,14 @@ public class Util {
return new ArrayList<E>(c);
}
public static ObjectName newObjectName(String s) {
try {
return new ObjectName(s);
} catch (MalformedObjectNameException e) {
throw new IllegalArgumentException(e);
}
}
/* This method can be used by code that is deliberately violating the
* allowed checked casts. Rather than marking the whole method containing
* the code with @SuppressWarnings, you can use a call to this method for

View File

@ -25,6 +25,8 @@
package com.sun.management;
import java.lang.management.PlatformManagedObject;
/**
* Diagnostic management interface for the HotSpot Virtual Machine.
* The diagnostic MBean is registered to the platform MBeanServer
@ -35,8 +37,13 @@ package com.sun.management;
* <blockquote>
* <tt>com.sun.management:type=HotSpotDiagnostic</tt>
* </blockquote>
.*
* It can be obtained by calling the
* {@link PlatformManagedObject#getObjectName} method.
*
* @see ManagementFactory#getPlatformMXBeans(Class)
*/
public interface HotSpotDiagnosticMXBean {
public interface HotSpotDiagnosticMXBean extends PlatformManagedObject {
/**
* Dumps the heap to the <tt>outputFile</tt> file in the same
* format as the hprof heap dump.

View File

@ -1,73 +1,73 @@
<?xml version='1.0' encoding='UTF-8' ?>
<!ELEMENT Configuration (CanonicalizationMethods , TransformAlgorithms , JCEAlgorithmMappings , Log4J , ResourceBundles , UnitTests , ResourceResolvers , KeyResolvers)>
<!ATTLIST Configuration xmlns CDATA #FIXED 'http://www.xmlsecurity.org/NS/#configuration'
target CDATA #IMPLIED>
<!ELEMENT CanonicalizationMethods (CanonicalizationMethod+)>
<!ATTLIST CanonicalizationMethods JAVACLASS CDATA #FIXED 'com.sun.org.apache.xml.internal.security.c14n.Canonicalizer' >
<!ELEMENT CanonicalizationMethod EMPTY>
<!ATTLIST CanonicalizationMethod URI CDATA #REQUIRED
JAVACLASS CDATA #REQUIRED >
<!ELEMENT TransformAlgorithms (TransformAlgorithm+)>
<!ATTLIST TransformAlgorithms JAVACLASS CDATA #FIXED 'com.sun.org.apache.xml.internal.security.transforms.Transform' >
<!ELEMENT TransformAlgorithm EMPTY>
<!ATTLIST TransformAlgorithm URI CDATA #REQUIRED
JAVACLASS CDATA #REQUIRED >
<!ELEMENT JCEAlgorithmMappings (Providers , Algorithms)>
<!ELEMENT Providers (Provider+)>
<!ELEMENT Provider EMPTY>
<!ATTLIST Provider Id ID #REQUIRED
Class CDATA #REQUIRED
Info CDATA #IMPLIED
ProviderURL CDATA #IMPLIED >
<!ELEMENT Algorithms (Algorithm+)>
<!ELEMENT Algorithm (ProviderAlgo+)>
<!ATTLIST Algorithm URI CDATA #REQUIRED
Description CDATA #IMPLIED
AlgorithmClass CDATA #IMPLIED >
<!ELEMENT ProviderAlgo EMPTY>
<!ATTLIST ProviderAlgo ProviderId IDREF #REQUIRED
JCEName CDATA #REQUIRED
JCEAlias CDATA #IMPLIED >
<!ELEMENT Log4J EMPTY>
<!ATTLIST Log4J configFile CDATA 'data/log4j.xml' >
<!ELEMENT ResourceBundles (ResourceBundle+)>
<!ATTLIST ResourceBundles defaultLanguageCode CDATA 'de'
defaultCountryCode CDATA 'DE' >
<!ELEMENT ResourceBundle EMPTY>
<!ATTLIST ResourceBundle LanguageCode CDATA #REQUIRED
CountryCode CDATA #REQUIRED
LOCATION CDATA #REQUIRED >
<!ELEMENT UnitTests (UnitTest+)>
<!ATTLIST UnitTests JAVACLASS CDATA #FIXED 'com.sun.org.apache.xml.internal.security.test.AllTests' >
<!ELEMENT ResourceResolvers (Resolver+)>
<!ELEMENT Resolver EMPTY>
<!ATTLIST Resolver JAVACLASS CDATA #REQUIRED
DESCRIPTION CDATA #IMPLIED >
<!ELEMENT KeyResolvers (KeyResolver+)>
<!ATTLIST KeyResolvers JAVACLASS CDATA #FIXED 'com.sun.org.apache.xml.internal.security.keys.KeyResolver' >
<!ELEMENT KeyResolver EMPTY>
<!ATTLIST KeyResolver URI CDATA #REQUIRED
JAVACLASS CDATA #REQUIRED >
<!ELEMENT UnitTest (#PCDATA)>
<!ATTLIST UnitTest JAVACLASS CDATA #REQUIRED >
<?xml version='1.0' encoding='UTF-8' ?>
<!ELEMENT Configuration (CanonicalizationMethods , TransformAlgorithms , JCEAlgorithmMappings , Log4J , ResourceBundles , UnitTests , ResourceResolvers , KeyResolvers)>
<!ATTLIST Configuration xmlns CDATA #FIXED 'http://www.xmlsecurity.org/NS/#configuration'
target CDATA #IMPLIED>
<!ELEMENT CanonicalizationMethods (CanonicalizationMethod+)>
<!ATTLIST CanonicalizationMethods JAVACLASS CDATA #FIXED 'com.sun.org.apache.xml.internal.security.c14n.Canonicalizer' >
<!ELEMENT CanonicalizationMethod EMPTY>
<!ATTLIST CanonicalizationMethod URI CDATA #REQUIRED
JAVACLASS CDATA #REQUIRED >
<!ELEMENT TransformAlgorithms (TransformAlgorithm+)>
<!ATTLIST TransformAlgorithms JAVACLASS CDATA #FIXED 'com.sun.org.apache.xml.internal.security.transforms.Transform' >
<!ELEMENT TransformAlgorithm EMPTY>
<!ATTLIST TransformAlgorithm URI CDATA #REQUIRED
JAVACLASS CDATA #REQUIRED >
<!ELEMENT JCEAlgorithmMappings (Providers , Algorithms)>
<!ELEMENT Providers (Provider+)>
<!ELEMENT Provider EMPTY>
<!ATTLIST Provider Id ID #REQUIRED
Class CDATA #REQUIRED
Info CDATA #IMPLIED
ProviderURL CDATA #IMPLIED >
<!ELEMENT Algorithms (Algorithm+)>
<!ELEMENT Algorithm (ProviderAlgo+)>
<!ATTLIST Algorithm URI CDATA #REQUIRED
Description CDATA #IMPLIED
AlgorithmClass CDATA #IMPLIED >
<!ELEMENT ProviderAlgo EMPTY>
<!ATTLIST ProviderAlgo ProviderId IDREF #REQUIRED
JCEName CDATA #REQUIRED
JCEAlias CDATA #IMPLIED >
<!ELEMENT Log4J EMPTY>
<!ATTLIST Log4J configFile CDATA 'data/log4j.xml' >
<!ELEMENT ResourceBundles (ResourceBundle+)>
<!ATTLIST ResourceBundles defaultLanguageCode CDATA 'de'
defaultCountryCode CDATA 'DE' >
<!ELEMENT ResourceBundle EMPTY>
<!ATTLIST ResourceBundle LanguageCode CDATA #REQUIRED
CountryCode CDATA #REQUIRED
LOCATION CDATA #REQUIRED >
<!ELEMENT UnitTests (UnitTest+)>
<!ATTLIST UnitTests JAVACLASS CDATA #FIXED 'com.sun.org.apache.xml.internal.security.test.AllTests' >
<!ELEMENT ResourceResolvers (Resolver+)>
<!ELEMENT Resolver EMPTY>
<!ATTLIST Resolver JAVACLASS CDATA #REQUIRED
DESCRIPTION CDATA #IMPLIED >
<!ELEMENT KeyResolvers (KeyResolver+)>
<!ATTLIST KeyResolvers JAVACLASS CDATA #FIXED 'com.sun.org.apache.xml.internal.security.keys.KeyResolver' >
<!ELEMENT KeyResolver EMPTY>
<!ATTLIST KeyResolver URI CDATA #REQUIRED
JAVACLASS CDATA #REQUIRED >
<!ELEMENT UnitTest (#PCDATA)>
<!ATTLIST UnitTest JAVACLASS CDATA #REQUIRED >

View File

@ -1,380 +1,380 @@
<?xml version="1.0"?>
<!--
<!DOCTYPE Configuration SYSTEM "config.dtd">
-->
<!-- This configuration file is used for configuration of the com.sun.org.apache.xml.internal.security package -->
<Configuration target="com.sun.org.apache.xml.internal.security" xmlns="http://www.xmlsecurity.org/NS/#configuration">
<CanonicalizationMethods>
<CanonicalizationMethod URI="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"
JAVACLASS="com.sun.org.apache.xml.internal.security.c14n.implementations.Canonicalizer20010315OmitComments" />
<CanonicalizationMethod URI="http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments"
JAVACLASS="com.sun.org.apache.xml.internal.security.c14n.implementations.Canonicalizer20010315WithComments" />
<CanonicalizationMethod URI="http://www.w3.org/2001/10/xml-exc-c14n#"
JAVACLASS="com.sun.org.apache.xml.internal.security.c14n.implementations.Canonicalizer20010315ExclOmitComments"/>
<CanonicalizationMethod URI="http://www.w3.org/2001/10/xml-exc-c14n#WithComments"
JAVACLASS="com.sun.org.apache.xml.internal.security.c14n.implementations.Canonicalizer20010315ExclWithComments"/>
</CanonicalizationMethods>
<TransformAlgorithms>
<!-- Base64 -->
<TransformAlgorithm URI="http://www.w3.org/2000/09/xmldsig#base64"
JAVACLASS="com.sun.org.apache.xml.internal.security.transforms.implementations.TransformBase64Decode" />
<!-- c14n omitting comments -->
<TransformAlgorithm URI="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"
JAVACLASS="com.sun.org.apache.xml.internal.security.transforms.implementations.TransformC14N" />
<!-- c14n with comments -->
<TransformAlgorithm URI="http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments"
JAVACLASS="com.sun.org.apache.xml.internal.security.transforms.implementations.TransformC14NWithComments" />
<!-- exclusive c14n omitting comments -->
<TransformAlgorithm URI="http://www.w3.org/2001/10/xml-exc-c14n#"
JAVACLASS="com.sun.org.apache.xml.internal.security.transforms.implementations.TransformC14NExclusive" />
<!-- exclusive c14n with comments -->
<TransformAlgorithm URI="http://www.w3.org/2001/10/xml-exc-c14n#WithComments"
JAVACLASS="com.sun.org.apache.xml.internal.security.transforms.implementations.TransformC14NExclusiveWithComments" />
<!-- XPath transform -->
<TransformAlgorithm URI="http://www.w3.org/TR/1999/REC-xpath-19991116"
JAVACLASS="com.sun.org.apache.xml.internal.security.transforms.implementations.TransformXPath" />
<!-- enveloped signature -->
<TransformAlgorithm URI="http://www.w3.org/2000/09/xmldsig#enveloped-signature"
JAVACLASS="com.sun.org.apache.xml.internal.security.transforms.implementations.TransformEnvelopedSignature" />
<!-- XSLT -->
<TransformAlgorithm URI="http://www.w3.org/TR/1999/REC-xslt-19991116"
JAVACLASS="com.sun.org.apache.xml.internal.security.transforms.implementations.TransformXSLT" />
<!-- XPath version 2 -->
<TransformAlgorithm URI="http://www.w3.org/2002/04/xmldsig-filter2"
JAVACLASS="com.sun.org.apache.xml.internal.security.transforms.implementations.TransformXPath2Filter" />
<!-- XPath version 2b -->
<TransformAlgorithm URI="http://www.w3.org/2002/06/xmldsig-filter2"
JAVACLASS="com.sun.org.apache.xml.internal.security.transforms.implementations.TransformXPath2Filter" />
</TransformAlgorithms>
<SignatureAlgorithms>
<SignatureAlgorithm URI="http://www.w3.org/2000/09/xmldsig#dsa-sha1"
JAVACLASS="com.sun.org.apache.xml.internal.security.algorithms.implementations.SignatureDSA" />
<SignatureAlgorithm URI="http://www.w3.org/2000/09/xmldsig#rsa-sha1"
JAVACLASS="com.sun.org.apache.xml.internal.security.algorithms.implementations.SignatureBaseRSA$SignatureRSASHA1" />
<SignatureAlgorithm URI="http://www.w3.org/2000/09/xmldsig#hmac-sha1"
JAVACLASS="com.sun.org.apache.xml.internal.security.algorithms.implementations.IntegrityHmac$IntegrityHmacSHA1" />
<SignatureAlgorithm URI="http://www.w3.org/2001/04/xmldsig-more#rsa-md5"
JAVACLASS="com.sun.org.apache.xml.internal.security.algorithms.implementations.SignatureBaseRSA$SignatureRSAMD5" />
<SignatureAlgorithm URI="http://www.w3.org/2001/04/xmldsig-more#rsa-ripemd160"
JAVACLASS="com.sun.org.apache.xml.internal.security.algorithms.implementations.SignatureBaseRSA$SignatureRSARIPEMD160" />
<SignatureAlgorithm URI="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"
JAVACLASS="com.sun.org.apache.xml.internal.security.algorithms.implementations.SignatureBaseRSA$SignatureRSASHA256" />
<SignatureAlgorithm URI="http://www.w3.org/2001/04/xmldsig-more#rsa-sha384"
JAVACLASS="com.sun.org.apache.xml.internal.security.algorithms.implementations.SignatureBaseRSA$SignatureRSASHA384" />
<SignatureAlgorithm URI="http://www.w3.org/2001/04/xmldsig-more#rsa-sha512"
JAVACLASS="com.sun.org.apache.xml.internal.security.algorithms.implementations.SignatureBaseRSA$SignatureRSASHA512" />
<SignatureAlgorithm URI="http://www.w3.org/2001/04/xmldsig-more#hmac-md5"
JAVACLASS="com.sun.org.apache.xml.internal.security.algorithms.implementations.IntegrityHmac$IntegrityHmacMD5" />
<SignatureAlgorithm URI="http://www.w3.org/2001/04/xmldsig-more#hmac-ripemd160"
JAVACLASS="com.sun.org.apache.xml.internal.security.algorithms.implementations.IntegrityHmac$IntegrityHmacRIPEMD160" />
<SignatureAlgorithm URI="http://www.w3.org/2001/04/xmldsig-more#hmac-sha256"
JAVACLASS="com.sun.org.apache.xml.internal.security.algorithms.implementations.IntegrityHmac$IntegrityHmacSHA256" />
<SignatureAlgorithm URI="http://www.w3.org/2001/04/xmldsig-more#hmac-sha384"
JAVACLASS="com.sun.org.apache.xml.internal.security.algorithms.implementations.IntegrityHmac$IntegrityHmacSHA384" />
<SignatureAlgorithm URI="http://www.w3.org/2001/04/xmldsig-more#hmac-sha512"
JAVACLASS="com.sun.org.apache.xml.internal.security.algorithms.implementations.IntegrityHmac$IntegrityHmacSHA512" />
</SignatureAlgorithms>
<JCEAlgorithmMappings>
<Algorithms>
<!-- MessageDigest Algorithms -->
<Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#md5"
Description="MD5 message digest from RFC 1321"
AlgorithmClass="MessageDigest"
RequirementLevel="NOT RECOMMENDED"
SpecificationURL="http://www.ietf.org/internet-drafts/draft-eastlake-xmldsig-uri-02.txt"
JCEName="MD5"/>
<Algorithm URI="http://www.w3.org/2001/04/xmlenc#ripemd160"
Description="RIPEMD-160 message digest"
AlgorithmClass="MessageDigest"
RequirementLevel="OPTIONAL"
JCEName="RIPEMD160"/>
<Algorithm URI="http://www.w3.org/2000/09/xmldsig#sha1"
Description="SHA-1 message digest"
AlgorithmClass="MessageDigest"
RequirementLevel="REQUIRED"
JCEName="SHA-1"/>
<Algorithm URI="http://www.w3.org/2001/04/xmlenc#sha256"
Description="SHA-1 message digest with 256 bit"
AlgorithmClass="MessageDigest"
RequirementLevel="RECOMMENDED"
JCEName="SHA-256"/>
<Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#sha384"
Description="SHA message digest with 384 bit"
AlgorithmClass="MessageDigest"
RequirementLevel="OPTIONAL"
SpecificationURL="http://www.ietf.org/internet-drafts/draft-eastlake-xmldsig-uri-02.txt"
JCEName="SHA-384"/>
<Algorithm URI="http://www.w3.org/2001/04/xmlenc#sha512"
Description="SHA-1 message digest with 512 bit"
AlgorithmClass="MessageDigest"
RequirementLevel="OPTIONAL"
JCEName="SHA-512"/>
<!-- Signature Algorithms -->
<Algorithm URI="http://www.w3.org/2000/09/xmldsig#dsa-sha1"
Description="Digital Signature Algorithm with SHA-1 message digest"
AlgorithmClass="Signature"
RequirementLevel="REQUIRED"
JCEName="SHA1withDSA"/>
<Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#rsa-md5"
Description="RSA Signature with MD5 message digest"
AlgorithmClass="Signature"
RequirementLevel="NOT RECOMMENDED"
SpecificationURL="http://www.ietf.org/internet-drafts/draft-eastlake-xmldsig-uri-02.txt"
JCEName="MD5withRSA"/>
<Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#rsa-ripemd160"
Description="RSA Signature with RIPEMD-160 message digest"
AlgorithmClass="Signature"
RequirementLevel="OPTIONAL"
SpecificationURL="http://www.ietf.org/internet-drafts/draft-eastlake-xmldsig-uri-02.txt"
JCEName="RIPEMD160withRSA"/>
<Algorithm URI="http://www.w3.org/2000/09/xmldsig#rsa-sha1"
Description="RSA Signature with SHA-1 message digest"
AlgorithmClass="Signature"
RequirementLevel="RECOMMENDED"
JCEName="SHA1withRSA"/>
<Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"
Description="RSA Signature with SHA-256 message digest"
AlgorithmClass="Signature"
RequirementLevel="OPTIONAL"
SpecificationURL="http://www.ietf.org/internet-drafts/draft-eastlake-xmldsig-uri-02.txt"
JCEName="SHA256withRSA"/>
<Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#rsa-sha384"
Description="RSA Signature with SHA-384 message digest"
AlgorithmClass="Signature"
RequirementLevel="OPTIONAL"
SpecificationURL="http://www.ietf.org/internet-drafts/draft-eastlake-xmldsig-uri-02.txt"
JCEName="SHA384withRSA"/>
<Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#rsa-sha512"
Description="RSA Signature with SHA-512 message digest"
AlgorithmClass="Signature"
RequirementLevel="OPTIONAL"
SpecificationURL="http://www.ietf.org/internet-drafts/draft-eastlake-xmldsig-uri-02.txt"
JCEName="SHA512withRSA"/>
<!-- MAC Algorithms -->
<Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#hmac-md5"
Description="Message Authentication code using MD5"
AlgorithmClass="Mac"
RequirementLevel="NOT RECOMMENDED"
SpecificationURL="http://www.ietf.org/internet-drafts/draft-eastlake-xmldsig-uri-02.txt"
JCEName="HmacMD5"/>
<Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#hmac-ripemd160"
Description="Message Authentication code using RIPEMD-160"
AlgorithmClass="Mac"
RequirementLevel="OPTIONAL"
SpecificationURL="http://www.ietf.org/internet-drafts/draft-eastlake-xmldsig-uri-02.txt"
JCEName="HMACRIPEMD160"/>
<Algorithm URI="http://www.w3.org/2000/09/xmldsig#hmac-sha1"
Description="Message Authentication code using SHA1"
AlgorithmClass="Mac"
RequirementLevel="REQUIRED"
JCEName="HmacSHA1"/>
<Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#hmac-sha256"
Description="Message Authentication code using SHA-256"
AlgorithmClass="Mac"
RequirementLevel="OPTIONAL"
SpecificationURL="http://www.ietf.org/internet-drafts/draft-eastlake-xmldsig-uri-02.txt"
JCEName="HmacSHA256"/>
<Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#hmac-sha384"
Description="Message Authentication code using SHA-384"
AlgorithmClass="Mac"
RequirementLevel="OPTIONAL"
SpecificationURL="http://www.ietf.org/internet-drafts/draft-eastlake-xmldsig-uri-02.txt"
JCEName="HmacSHA384"/>
<Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#hmac-sha512"
Description="Message Authentication code using SHA-512"
AlgorithmClass="Mac"
RequirementLevel="OPTIONAL"
SpecificationURL="http://www.ietf.org/internet-drafts/draft-eastlake-xmldsig-uri-02.txt"
JCEName="HmacSHA512"/>
<!-- Block encryption Algorithms -->
<Algorithm URI="http://www.w3.org/2001/04/xmlenc#tripledes-cbc"
Description="Block encryption using Triple-DES"
AlgorithmClass="BlockEncryption"
RequirementLevel="REQUIRED"
KeyLength="192"
RequiredKey="DESede"
JCEName="DESede/CBC/ISO10126Padding"/>
<Algorithm URI="http://www.w3.org/2001/04/xmlenc#aes128-cbc"
Description="Block encryption using AES with a key length of 128 bit"
AlgorithmClass="BlockEncryption"
RequirementLevel="REQUIRED"
KeyLength="128"
RequiredKey="AES"
JCEName="AES/CBC/ISO10126Padding"/>
<Algorithm URI="http://www.w3.org/2001/04/xmlenc#aes192-cbc"
Description="Block encryption using AES with a key length of 192 bit"
AlgorithmClass="BlockEncryption"
RequirementLevel="OPTIONAL"
KeyLength="192"
RequiredKey="AES"
JCEName="AES/CBC/ISO10126Padding"/>
<Algorithm URI="http://www.w3.org/2001/04/xmlenc#aes256-cbc"
Description="Block encryption using AES with a key length of 256 bit"
AlgorithmClass="BlockEncryption"
RequirementLevel="REQUIRED"
KeyLength="256"
RequiredKey="AES"
JCEName="AES/CBC/ISO10126Padding"/>
<Algorithm URI="http://www.w3.org/2001/04/xmlenc#rsa-1_5"
Description="Key Transport RSA-v1.5"
AlgorithmClass="KeyTransport"
RequirementLevel="REQUIRED"
RequiredKey="RSA"
JCEName="RSA/ECB/PKCS1Padding"/>
<Algorithm URI="http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p"
Description="Key Transport RSA-OAEP"
AlgorithmClass="KeyTransport"
RequirementLevel="REQUIRED"
RequiredKey="RSA"
JCEName="RSA/ECB/OAEPWithSHA1AndMGF1Padding"/>
<Algorithm URI="http://www.w3.org/2001/04/xmlenc#dh"
Description="Key Agreement Diffie-Hellman"
AlgorithmClass="KeyAgreement"
RequirementLevel="OPTIONAL"/>
<Algorithm URI="http://www.w3.org/2001/04/xmlenc#kw-tripledes"
Description="Symmetric Key Wrap using Triple DES"
AlgorithmClass="SymmetricKeyWrap"
RequirementLevel="REQUIRED"
KeyLength="192"
RequiredKey="DESede"
JCEName="DESedeWrap"/>
<Algorithm URI="http://www.w3.org/2001/04/xmlenc#kw-aes128"
Description="Symmetric Key Wrap using AES with a key length of 128 bit"
AlgorithmClass="SymmetricKeyWrap"
RequirementLevel="REQUIRED"
KeyLength="128"
RequiredKey="AES"
JCEName="AESWrap"/>
<Algorithm URI="http://www.w3.org/2001/04/xmlenc#kw-aes192"
Description="Symmetric Key Wrap using AES with a key length of 192 bit"
AlgorithmClass="SymmetricKeyWrap"
RequirementLevel="OPTIONAL"
KeyLength="192"
RequiredKey="AES"
JCEName="AESWrap"/>
<Algorithm URI="http://www.w3.org/2001/04/xmlenc#kw-aes256"
Description="Symmetric Key Wrap using AES with a key length of 256 bit"
AlgorithmClass="SymmetricKeyWrap"
RequirementLevel="REQUIRED"
KeyLength="256"
RequiredKey="AES"
JCEName="AESWrap"/>
</Algorithms>
</JCEAlgorithmMappings>
<ResourceBundles defaultLanguageCode="en" defaultCountryCode="US">
<ResourceBundle LanguageCode="en"
CountryCode="US"
LOCATION="com.sun.org.apache.xml.internal.security/resource/xmlsecurity_en.properties" />
<ResourceBundle LanguageCode="de"
CountryCode="DE"
LOCATION="com.sun.org.apache.xml.internal.security/resource/xmlsecurity_de.properties" />
</ResourceBundles>
<ResourceResolvers>
<Resolver JAVACLASS="com.sun.org.apache.xml.internal.security.utils.resolver.implementations.ResolverDirectHTTP"
DESCRIPTION="A simple resolver for requests to HTTP space" />
<Resolver JAVACLASS="com.sun.org.apache.xml.internal.security.utils.resolver.implementations.ResolverLocalFilesystem"
DESCRIPTION="A simple resolver for requests to the local file system" />
<Resolver JAVACLASS="com.sun.org.apache.xml.internal.security.utils.resolver.implementations.ResolverFragment"
DESCRIPTION="A simple resolver for requests of same-document URIs" />
<Resolver JAVACLASS="com.sun.org.apache.xml.internal.security.utils.resolver.implementations.ResolverXPointer"
DESCRIPTION="A simple resolver for requests of XPointer fragents" />
</ResourceResolvers>
<!-- <defaultLocale languageCode="en" countryCode="US" /> -->
<KeyInfo>
<ContentHandler LOCALNAME="KeyName"
NAMESPACE="http://www.w3.org/2000/09/xmldsig#"
JAVACLASS="com.sun.org.apache.xml.internal.security.keys.content.KeyName" />
<ContentHandler LOCALNAME="KeyValue"
NAMESPACE="http://www.w3.org/2000/09/xmldsig#"
JAVACLASS="com.sun.org.apache.xml.internal.security.keys.content.KeyValue" />
<ContentHandler LOCALNAME="RetrievalMethod"
NAMESPACE="http://www.w3.org/2000/09/xmldsig#"
JAVACLASS="com.sun.org.apache.xml.internal.security.keys.content.RetrievalMethod" />
<ContentHandler LOCALNAME="X509Data"
NAMESPACE="http://www.w3.org/2000/09/xmldsig#"
JAVACLASS="com.sun.org.apache.xml.internal.security.keys.content.X509Data" />
<ContentHandler LOCALNAME="PGPData"
NAMESPACE="http://www.w3.org/2000/09/xmldsig#"
JAVACLASS="com.sun.org.apache.xml.internal.security.keys.content.PGPData" />
<ContentHandler LOCALNAME="SPKIData"
NAMESPACE="http://www.w3.org/2000/09/xmldsig#"
JAVACLASS="com.sun.org.apache.xml.internal.security.keys.content.SPKIData" />
<ContentHandler LOCALNAME="MgmtData"
NAMESPACE="http://www.w3.org/2000/09/xmldsig#"
JAVACLASS="com.sun.org.apache.xml.internal.security.keys.content.MgmtData" />
</KeyInfo>
<KeyResolver>
<!-- This section contains a list of KeyResolvers that are available in
every KeyInfo object -->
<Resolver JAVACLASS="com.sun.org.apache.xml.internal.security.keys.keyresolver.implementations.RSAKeyValueResolver"
DESCRIPTION="Can extract RSA public keys" />
<Resolver JAVACLASS="com.sun.org.apache.xml.internal.security.keys.keyresolver.implementations.DSAKeyValueResolver"
DESCRIPTION="Can extract DSA public keys" />
<Resolver JAVACLASS="com.sun.org.apache.xml.internal.security.keys.keyresolver.implementations.X509CertificateResolver"
DESCRIPTION="Can extract public keys from X509 certificates" />
<Resolver JAVACLASS="com.sun.org.apache.xml.internal.security.keys.keyresolver.implementations.X509SKIResolver"
DESCRIPTION="Uses an X509v3 SubjectKeyIdentifier extension to retrieve a certificate from the storages" />
<Resolver JAVACLASS="com.sun.org.apache.xml.internal.security.keys.keyresolver.implementations.RetrievalMethodResolver"
DESCRIPTION="Resolves keys and certificates using ResourceResolvers" />
<Resolver JAVACLASS="com.sun.org.apache.xml.internal.security.keys.keyresolver.implementations.X509SubjectNameResolver"
DESCRIPTION="Uses an X509 SubjectName to retrieve a certificate from the storages" />
<Resolver JAVACLASS="com.sun.org.apache.xml.internal.security.keys.keyresolver.implementations.X509IssuerSerialResolver"
DESCRIPTION="Uses an X509 IssuerName and IssuerSerial to retrieve a certificate from the storages" />
</KeyResolver>
<PrefixMappings>
<!-- Many classes create Elements which are in a specific namespace;
here, the prefixes for these namespaces are defined. But this
can also be overwritten using the ElementProxy#setDefaultPrefix()
method. You can even set all prefixes to "" so that the corresponding
elements are created using the default namespace -->
<PrefixMapping namespace="http://www.w3.org/2000/09/xmldsig#"
prefix="ds" />
<PrefixMapping namespace="http://www.w3.org/2001/04/xmlenc#"
prefix="xenc" />
<PrefixMapping namespace="http://www.xmlsecurity.org/experimental#"
prefix="experimental" />
<PrefixMapping namespace="http://www.w3.org/2002/04/xmldsig-filter2"
prefix="dsig-xpath-old" />
<PrefixMapping namespace="http://www.w3.org/2002/06/xmldsig-filter2"
prefix="dsig-xpath" />
<PrefixMapping namespace="http://www.w3.org/2001/10/xml-exc-c14n#"
prefix="ec" />
<PrefixMapping namespace="http://www.nue.et-inf.uni-siegen.de/~geuer-pollmann/#xpathFilter"
prefix="xx" />
</PrefixMappings>
</Configuration>
<?xml version="1.0"?>
<!--
<!DOCTYPE Configuration SYSTEM "config.dtd">
-->
<!-- This configuration file is used for configuration of the com.sun.org.apache.xml.internal.security package -->
<Configuration target="com.sun.org.apache.xml.internal.security" xmlns="http://www.xmlsecurity.org/NS/#configuration">
<CanonicalizationMethods>
<CanonicalizationMethod URI="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"
JAVACLASS="com.sun.org.apache.xml.internal.security.c14n.implementations.Canonicalizer20010315OmitComments" />
<CanonicalizationMethod URI="http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments"
JAVACLASS="com.sun.org.apache.xml.internal.security.c14n.implementations.Canonicalizer20010315WithComments" />
<CanonicalizationMethod URI="http://www.w3.org/2001/10/xml-exc-c14n#"
JAVACLASS="com.sun.org.apache.xml.internal.security.c14n.implementations.Canonicalizer20010315ExclOmitComments"/>
<CanonicalizationMethod URI="http://www.w3.org/2001/10/xml-exc-c14n#WithComments"
JAVACLASS="com.sun.org.apache.xml.internal.security.c14n.implementations.Canonicalizer20010315ExclWithComments"/>
</CanonicalizationMethods>
<TransformAlgorithms>
<!-- Base64 -->
<TransformAlgorithm URI="http://www.w3.org/2000/09/xmldsig#base64"
JAVACLASS="com.sun.org.apache.xml.internal.security.transforms.implementations.TransformBase64Decode" />
<!-- c14n omitting comments -->
<TransformAlgorithm URI="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"
JAVACLASS="com.sun.org.apache.xml.internal.security.transforms.implementations.TransformC14N" />
<!-- c14n with comments -->
<TransformAlgorithm URI="http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments"
JAVACLASS="com.sun.org.apache.xml.internal.security.transforms.implementations.TransformC14NWithComments" />
<!-- exclusive c14n omitting comments -->
<TransformAlgorithm URI="http://www.w3.org/2001/10/xml-exc-c14n#"
JAVACLASS="com.sun.org.apache.xml.internal.security.transforms.implementations.TransformC14NExclusive" />
<!-- exclusive c14n with comments -->
<TransformAlgorithm URI="http://www.w3.org/2001/10/xml-exc-c14n#WithComments"
JAVACLASS="com.sun.org.apache.xml.internal.security.transforms.implementations.TransformC14NExclusiveWithComments" />
<!-- XPath transform -->
<TransformAlgorithm URI="http://www.w3.org/TR/1999/REC-xpath-19991116"
JAVACLASS="com.sun.org.apache.xml.internal.security.transforms.implementations.TransformXPath" />
<!-- enveloped signature -->
<TransformAlgorithm URI="http://www.w3.org/2000/09/xmldsig#enveloped-signature"
JAVACLASS="com.sun.org.apache.xml.internal.security.transforms.implementations.TransformEnvelopedSignature" />
<!-- XSLT -->
<TransformAlgorithm URI="http://www.w3.org/TR/1999/REC-xslt-19991116"
JAVACLASS="com.sun.org.apache.xml.internal.security.transforms.implementations.TransformXSLT" />
<!-- XPath version 2 -->
<TransformAlgorithm URI="http://www.w3.org/2002/04/xmldsig-filter2"
JAVACLASS="com.sun.org.apache.xml.internal.security.transforms.implementations.TransformXPath2Filter" />
<!-- XPath version 2b -->
<TransformAlgorithm URI="http://www.w3.org/2002/06/xmldsig-filter2"
JAVACLASS="com.sun.org.apache.xml.internal.security.transforms.implementations.TransformXPath2Filter" />
</TransformAlgorithms>
<SignatureAlgorithms>
<SignatureAlgorithm URI="http://www.w3.org/2000/09/xmldsig#dsa-sha1"
JAVACLASS="com.sun.org.apache.xml.internal.security.algorithms.implementations.SignatureDSA" />
<SignatureAlgorithm URI="http://www.w3.org/2000/09/xmldsig#rsa-sha1"
JAVACLASS="com.sun.org.apache.xml.internal.security.algorithms.implementations.SignatureBaseRSA$SignatureRSASHA1" />
<SignatureAlgorithm URI="http://www.w3.org/2000/09/xmldsig#hmac-sha1"
JAVACLASS="com.sun.org.apache.xml.internal.security.algorithms.implementations.IntegrityHmac$IntegrityHmacSHA1" />
<SignatureAlgorithm URI="http://www.w3.org/2001/04/xmldsig-more#rsa-md5"
JAVACLASS="com.sun.org.apache.xml.internal.security.algorithms.implementations.SignatureBaseRSA$SignatureRSAMD5" />
<SignatureAlgorithm URI="http://www.w3.org/2001/04/xmldsig-more#rsa-ripemd160"
JAVACLASS="com.sun.org.apache.xml.internal.security.algorithms.implementations.SignatureBaseRSA$SignatureRSARIPEMD160" />
<SignatureAlgorithm URI="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"
JAVACLASS="com.sun.org.apache.xml.internal.security.algorithms.implementations.SignatureBaseRSA$SignatureRSASHA256" />
<SignatureAlgorithm URI="http://www.w3.org/2001/04/xmldsig-more#rsa-sha384"
JAVACLASS="com.sun.org.apache.xml.internal.security.algorithms.implementations.SignatureBaseRSA$SignatureRSASHA384" />
<SignatureAlgorithm URI="http://www.w3.org/2001/04/xmldsig-more#rsa-sha512"
JAVACLASS="com.sun.org.apache.xml.internal.security.algorithms.implementations.SignatureBaseRSA$SignatureRSASHA512" />
<SignatureAlgorithm URI="http://www.w3.org/2001/04/xmldsig-more#hmac-md5"
JAVACLASS="com.sun.org.apache.xml.internal.security.algorithms.implementations.IntegrityHmac$IntegrityHmacMD5" />
<SignatureAlgorithm URI="http://www.w3.org/2001/04/xmldsig-more#hmac-ripemd160"
JAVACLASS="com.sun.org.apache.xml.internal.security.algorithms.implementations.IntegrityHmac$IntegrityHmacRIPEMD160" />
<SignatureAlgorithm URI="http://www.w3.org/2001/04/xmldsig-more#hmac-sha256"
JAVACLASS="com.sun.org.apache.xml.internal.security.algorithms.implementations.IntegrityHmac$IntegrityHmacSHA256" />
<SignatureAlgorithm URI="http://www.w3.org/2001/04/xmldsig-more#hmac-sha384"
JAVACLASS="com.sun.org.apache.xml.internal.security.algorithms.implementations.IntegrityHmac$IntegrityHmacSHA384" />
<SignatureAlgorithm URI="http://www.w3.org/2001/04/xmldsig-more#hmac-sha512"
JAVACLASS="com.sun.org.apache.xml.internal.security.algorithms.implementations.IntegrityHmac$IntegrityHmacSHA512" />
</SignatureAlgorithms>
<JCEAlgorithmMappings>
<Algorithms>
<!-- MessageDigest Algorithms -->
<Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#md5"
Description="MD5 message digest from RFC 1321"
AlgorithmClass="MessageDigest"
RequirementLevel="NOT RECOMMENDED"
SpecificationURL="http://www.ietf.org/internet-drafts/draft-eastlake-xmldsig-uri-02.txt"
JCEName="MD5"/>
<Algorithm URI="http://www.w3.org/2001/04/xmlenc#ripemd160"
Description="RIPEMD-160 message digest"
AlgorithmClass="MessageDigest"
RequirementLevel="OPTIONAL"
JCEName="RIPEMD160"/>
<Algorithm URI="http://www.w3.org/2000/09/xmldsig#sha1"
Description="SHA-1 message digest"
AlgorithmClass="MessageDigest"
RequirementLevel="REQUIRED"
JCEName="SHA-1"/>
<Algorithm URI="http://www.w3.org/2001/04/xmlenc#sha256"
Description="SHA-1 message digest with 256 bit"
AlgorithmClass="MessageDigest"
RequirementLevel="RECOMMENDED"
JCEName="SHA-256"/>
<Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#sha384"
Description="SHA message digest with 384 bit"
AlgorithmClass="MessageDigest"
RequirementLevel="OPTIONAL"
SpecificationURL="http://www.ietf.org/internet-drafts/draft-eastlake-xmldsig-uri-02.txt"
JCEName="SHA-384"/>
<Algorithm URI="http://www.w3.org/2001/04/xmlenc#sha512"
Description="SHA-1 message digest with 512 bit"
AlgorithmClass="MessageDigest"
RequirementLevel="OPTIONAL"
JCEName="SHA-512"/>
<!-- Signature Algorithms -->
<Algorithm URI="http://www.w3.org/2000/09/xmldsig#dsa-sha1"
Description="Digital Signature Algorithm with SHA-1 message digest"
AlgorithmClass="Signature"
RequirementLevel="REQUIRED"
JCEName="SHA1withDSA"/>
<Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#rsa-md5"
Description="RSA Signature with MD5 message digest"
AlgorithmClass="Signature"
RequirementLevel="NOT RECOMMENDED"
SpecificationURL="http://www.ietf.org/internet-drafts/draft-eastlake-xmldsig-uri-02.txt"
JCEName="MD5withRSA"/>
<Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#rsa-ripemd160"
Description="RSA Signature with RIPEMD-160 message digest"
AlgorithmClass="Signature"
RequirementLevel="OPTIONAL"
SpecificationURL="http://www.ietf.org/internet-drafts/draft-eastlake-xmldsig-uri-02.txt"
JCEName="RIPEMD160withRSA"/>
<Algorithm URI="http://www.w3.org/2000/09/xmldsig#rsa-sha1"
Description="RSA Signature with SHA-1 message digest"
AlgorithmClass="Signature"
RequirementLevel="RECOMMENDED"
JCEName="SHA1withRSA"/>
<Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"
Description="RSA Signature with SHA-256 message digest"
AlgorithmClass="Signature"
RequirementLevel="OPTIONAL"
SpecificationURL="http://www.ietf.org/internet-drafts/draft-eastlake-xmldsig-uri-02.txt"
JCEName="SHA256withRSA"/>
<Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#rsa-sha384"
Description="RSA Signature with SHA-384 message digest"
AlgorithmClass="Signature"
RequirementLevel="OPTIONAL"
SpecificationURL="http://www.ietf.org/internet-drafts/draft-eastlake-xmldsig-uri-02.txt"
JCEName="SHA384withRSA"/>
<Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#rsa-sha512"
Description="RSA Signature with SHA-512 message digest"
AlgorithmClass="Signature"
RequirementLevel="OPTIONAL"
SpecificationURL="http://www.ietf.org/internet-drafts/draft-eastlake-xmldsig-uri-02.txt"
JCEName="SHA512withRSA"/>
<!-- MAC Algorithms -->
<Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#hmac-md5"
Description="Message Authentication code using MD5"
AlgorithmClass="Mac"
RequirementLevel="NOT RECOMMENDED"
SpecificationURL="http://www.ietf.org/internet-drafts/draft-eastlake-xmldsig-uri-02.txt"
JCEName="HmacMD5"/>
<Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#hmac-ripemd160"
Description="Message Authentication code using RIPEMD-160"
AlgorithmClass="Mac"
RequirementLevel="OPTIONAL"
SpecificationURL="http://www.ietf.org/internet-drafts/draft-eastlake-xmldsig-uri-02.txt"
JCEName="HMACRIPEMD160"/>
<Algorithm URI="http://www.w3.org/2000/09/xmldsig#hmac-sha1"
Description="Message Authentication code using SHA1"
AlgorithmClass="Mac"
RequirementLevel="REQUIRED"
JCEName="HmacSHA1"/>
<Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#hmac-sha256"
Description="Message Authentication code using SHA-256"
AlgorithmClass="Mac"
RequirementLevel="OPTIONAL"
SpecificationURL="http://www.ietf.org/internet-drafts/draft-eastlake-xmldsig-uri-02.txt"
JCEName="HmacSHA256"/>
<Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#hmac-sha384"
Description="Message Authentication code using SHA-384"
AlgorithmClass="Mac"
RequirementLevel="OPTIONAL"
SpecificationURL="http://www.ietf.org/internet-drafts/draft-eastlake-xmldsig-uri-02.txt"
JCEName="HmacSHA384"/>
<Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#hmac-sha512"
Description="Message Authentication code using SHA-512"
AlgorithmClass="Mac"
RequirementLevel="OPTIONAL"
SpecificationURL="http://www.ietf.org/internet-drafts/draft-eastlake-xmldsig-uri-02.txt"
JCEName="HmacSHA512"/>
<!-- Block encryption Algorithms -->
<Algorithm URI="http://www.w3.org/2001/04/xmlenc#tripledes-cbc"
Description="Block encryption using Triple-DES"
AlgorithmClass="BlockEncryption"
RequirementLevel="REQUIRED"
KeyLength="192"
RequiredKey="DESede"
JCEName="DESede/CBC/ISO10126Padding"/>
<Algorithm URI="http://www.w3.org/2001/04/xmlenc#aes128-cbc"
Description="Block encryption using AES with a key length of 128 bit"
AlgorithmClass="BlockEncryption"
RequirementLevel="REQUIRED"
KeyLength="128"
RequiredKey="AES"
JCEName="AES/CBC/ISO10126Padding"/>
<Algorithm URI="http://www.w3.org/2001/04/xmlenc#aes192-cbc"
Description="Block encryption using AES with a key length of 192 bit"
AlgorithmClass="BlockEncryption"
RequirementLevel="OPTIONAL"
KeyLength="192"
RequiredKey="AES"
JCEName="AES/CBC/ISO10126Padding"/>
<Algorithm URI="http://www.w3.org/2001/04/xmlenc#aes256-cbc"
Description="Block encryption using AES with a key length of 256 bit"
AlgorithmClass="BlockEncryption"
RequirementLevel="REQUIRED"
KeyLength="256"
RequiredKey="AES"
JCEName="AES/CBC/ISO10126Padding"/>
<Algorithm URI="http://www.w3.org/2001/04/xmlenc#rsa-1_5"
Description="Key Transport RSA-v1.5"
AlgorithmClass="KeyTransport"
RequirementLevel="REQUIRED"
RequiredKey="RSA"
JCEName="RSA/ECB/PKCS1Padding"/>
<Algorithm URI="http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p"
Description="Key Transport RSA-OAEP"
AlgorithmClass="KeyTransport"
RequirementLevel="REQUIRED"
RequiredKey="RSA"
JCEName="RSA/ECB/OAEPWithSHA1AndMGF1Padding"/>
<Algorithm URI="http://www.w3.org/2001/04/xmlenc#dh"
Description="Key Agreement Diffie-Hellman"
AlgorithmClass="KeyAgreement"
RequirementLevel="OPTIONAL"/>
<Algorithm URI="http://www.w3.org/2001/04/xmlenc#kw-tripledes"
Description="Symmetric Key Wrap using Triple DES"
AlgorithmClass="SymmetricKeyWrap"
RequirementLevel="REQUIRED"
KeyLength="192"
RequiredKey="DESede"
JCEName="DESedeWrap"/>
<Algorithm URI="http://www.w3.org/2001/04/xmlenc#kw-aes128"
Description="Symmetric Key Wrap using AES with a key length of 128 bit"
AlgorithmClass="SymmetricKeyWrap"
RequirementLevel="REQUIRED"
KeyLength="128"
RequiredKey="AES"
JCEName="AESWrap"/>
<Algorithm URI="http://www.w3.org/2001/04/xmlenc#kw-aes192"
Description="Symmetric Key Wrap using AES with a key length of 192 bit"
AlgorithmClass="SymmetricKeyWrap"
RequirementLevel="OPTIONAL"
KeyLength="192"
RequiredKey="AES"
JCEName="AESWrap"/>
<Algorithm URI="http://www.w3.org/2001/04/xmlenc#kw-aes256"
Description="Symmetric Key Wrap using AES with a key length of 256 bit"
AlgorithmClass="SymmetricKeyWrap"
RequirementLevel="REQUIRED"
KeyLength="256"
RequiredKey="AES"
JCEName="AESWrap"/>
</Algorithms>
</JCEAlgorithmMappings>
<ResourceBundles defaultLanguageCode="en" defaultCountryCode="US">
<ResourceBundle LanguageCode="en"
CountryCode="US"
LOCATION="com.sun.org.apache.xml.internal.security/resource/xmlsecurity_en.properties" />
<ResourceBundle LanguageCode="de"
CountryCode="DE"
LOCATION="com.sun.org.apache.xml.internal.security/resource/xmlsecurity_de.properties" />
</ResourceBundles>
<ResourceResolvers>
<Resolver JAVACLASS="com.sun.org.apache.xml.internal.security.utils.resolver.implementations.ResolverDirectHTTP"
DESCRIPTION="A simple resolver for requests to HTTP space" />
<Resolver JAVACLASS="com.sun.org.apache.xml.internal.security.utils.resolver.implementations.ResolverLocalFilesystem"
DESCRIPTION="A simple resolver for requests to the local file system" />
<Resolver JAVACLASS="com.sun.org.apache.xml.internal.security.utils.resolver.implementations.ResolverFragment"
DESCRIPTION="A simple resolver for requests of same-document URIs" />
<Resolver JAVACLASS="com.sun.org.apache.xml.internal.security.utils.resolver.implementations.ResolverXPointer"
DESCRIPTION="A simple resolver for requests of XPointer fragents" />
</ResourceResolvers>
<!-- <defaultLocale languageCode="en" countryCode="US" /> -->
<KeyInfo>
<ContentHandler LOCALNAME="KeyName"
NAMESPACE="http://www.w3.org/2000/09/xmldsig#"
JAVACLASS="com.sun.org.apache.xml.internal.security.keys.content.KeyName" />
<ContentHandler LOCALNAME="KeyValue"
NAMESPACE="http://www.w3.org/2000/09/xmldsig#"
JAVACLASS="com.sun.org.apache.xml.internal.security.keys.content.KeyValue" />
<ContentHandler LOCALNAME="RetrievalMethod"
NAMESPACE="http://www.w3.org/2000/09/xmldsig#"
JAVACLASS="com.sun.org.apache.xml.internal.security.keys.content.RetrievalMethod" />
<ContentHandler LOCALNAME="X509Data"
NAMESPACE="http://www.w3.org/2000/09/xmldsig#"
JAVACLASS="com.sun.org.apache.xml.internal.security.keys.content.X509Data" />
<ContentHandler LOCALNAME="PGPData"
NAMESPACE="http://www.w3.org/2000/09/xmldsig#"
JAVACLASS="com.sun.org.apache.xml.internal.security.keys.content.PGPData" />
<ContentHandler LOCALNAME="SPKIData"
NAMESPACE="http://www.w3.org/2000/09/xmldsig#"
JAVACLASS="com.sun.org.apache.xml.internal.security.keys.content.SPKIData" />
<ContentHandler LOCALNAME="MgmtData"
NAMESPACE="http://www.w3.org/2000/09/xmldsig#"
JAVACLASS="com.sun.org.apache.xml.internal.security.keys.content.MgmtData" />
</KeyInfo>
<KeyResolver>
<!-- This section contains a list of KeyResolvers that are available in
every KeyInfo object -->
<Resolver JAVACLASS="com.sun.org.apache.xml.internal.security.keys.keyresolver.implementations.RSAKeyValueResolver"
DESCRIPTION="Can extract RSA public keys" />
<Resolver JAVACLASS="com.sun.org.apache.xml.internal.security.keys.keyresolver.implementations.DSAKeyValueResolver"
DESCRIPTION="Can extract DSA public keys" />
<Resolver JAVACLASS="com.sun.org.apache.xml.internal.security.keys.keyresolver.implementations.X509CertificateResolver"
DESCRIPTION="Can extract public keys from X509 certificates" />
<Resolver JAVACLASS="com.sun.org.apache.xml.internal.security.keys.keyresolver.implementations.X509SKIResolver"
DESCRIPTION="Uses an X509v3 SubjectKeyIdentifier extension to retrieve a certificate from the storages" />
<Resolver JAVACLASS="com.sun.org.apache.xml.internal.security.keys.keyresolver.implementations.RetrievalMethodResolver"
DESCRIPTION="Resolves keys and certificates using ResourceResolvers" />
<Resolver JAVACLASS="com.sun.org.apache.xml.internal.security.keys.keyresolver.implementations.X509SubjectNameResolver"
DESCRIPTION="Uses an X509 SubjectName to retrieve a certificate from the storages" />
<Resolver JAVACLASS="com.sun.org.apache.xml.internal.security.keys.keyresolver.implementations.X509IssuerSerialResolver"
DESCRIPTION="Uses an X509 IssuerName and IssuerSerial to retrieve a certificate from the storages" />
</KeyResolver>
<PrefixMappings>
<!-- Many classes create Elements which are in a specific namespace;
here, the prefixes for these namespaces are defined. But this
can also be overwritten using the ElementProxy#setDefaultPrefix()
method. You can even set all prefixes to "" so that the corresponding
elements are created using the default namespace -->
<PrefixMapping namespace="http://www.w3.org/2000/09/xmldsig#"
prefix="ds" />
<PrefixMapping namespace="http://www.w3.org/2001/04/xmlenc#"
prefix="xenc" />
<PrefixMapping namespace="http://www.xmlsecurity.org/experimental#"
prefix="experimental" />
<PrefixMapping namespace="http://www.w3.org/2002/04/xmldsig-filter2"
prefix="dsig-xpath-old" />
<PrefixMapping namespace="http://www.w3.org/2002/06/xmldsig-filter2"
prefix="dsig-xpath" />
<PrefixMapping namespace="http://www.w3.org/2001/10/xml-exc-c14n#"
prefix="ec" />
<PrefixMapping namespace="http://www.nue.et-inf.uni-siegen.de/~geuer-pollmann/#xpathFilter"
prefix="xx" />
</PrefixMappings>
</Configuration>

View File

@ -1,347 +1,347 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XML Spy v4.3 U (http://www.xmlspy.com) by XMLSpy v4 (Altova) -->
<xsd:schema targetNamespace="http://uri.etsi.org/01903/v1.1.1#" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://uri.etsi.org/01903/v1.1.1#" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" elementFormDefault="qualified" xsi:schemaLocation="http://www.w3.org/2000/09/xmldsig# xmldsig-core-schema.xsd">
<xsd:element name="Any" type="AnyType"/>
<xsd:complexType name="AnyType" mixed="true">
<xsd:sequence>
<xsd:any namespace="##any"/>
</xsd:sequence>
<xsd:anyAttribute namespace="##any"/>
</xsd:complexType>
<xsd:element name="ObjectIdentifier" type="ObjectIdentifierType"/>
<xsd:complexType name="ObjectIdentifierType">
<xsd:sequence>
<xsd:element name="Identifier" type="IdentifierType"/>
<xsd:element name="Description" type="xsd:string" minOccurs="0"/>
<xsd:element name="DocumentationReferences" type="DocumentationReferencesType" minOccurs="0"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="IdentifierType">
<xsd:simpleContent>
<xsd:extension base="xsd:anyURI">
<xsd:attribute name="Qualifier" type="QualifierType" use="optional"/>
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
<xsd:simpleType name="QualifierType">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="OIDAsURI"/>
<xsd:enumeration value="OIDAsURN"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:complexType name="DocumentationReferencesType">
<xsd:sequence maxOccurs="unbounded">
<xsd:element name="DocumentationReference" type="xsd:anyURI"/>
</xsd:sequence>
</xsd:complexType>
<xsd:element name="EncapsulatedPKIData" type="EncapsulatedPKIDataType"/>
<xsd:complexType name="EncapsulatedPKIDataType">
<xsd:simpleContent>
<xsd:extension base="xsd:base64Binary">
<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
<xsd:element name="TimeStamp" type="TimeStampType"/>
<xsd:complexType name="TimeStampType">
<xsd:sequence>
<xsd:element name="HashDataInfo" type="HashDataInfoType" maxOccurs="unbounded"/>
<xsd:choice>
<xsd:element name="EncapsulatedTimeStamp" type="EncapsulatedPKIDataType"/>
<xsd:element name="XMLTimeStamp" type="AnyType"/>
</xsd:choice>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="HashDataInfoType">
<xsd:sequence>
<xsd:element name="Transforms" type="ds:TransformsType" minOccurs="0"/>
</xsd:sequence>
<xsd:attribute name="uri" type="xsd:anyURI" use="required"/>
</xsd:complexType>
<xsd:element name="QualifyingProperties" type="QualifyingPropertiesType"/>
<xsd:complexType name="QualifyingPropertiesType">
<xsd:sequence>
<xsd:element name="SignedProperties" type="SignedPropertiesType" minOccurs="0"/>
<xsd:element name="UnsignedProperties" type="UnsignedPropertiesType" minOccurs="0"/>
</xsd:sequence>
<xsd:attribute name="Target" type="xsd:anyURI" use="required"/>
<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
</xsd:complexType>
<xsd:element name="SignedProperties" type="SignedPropertiesType"/>
<xsd:complexType name="SignedPropertiesType">
<xsd:sequence>
<xsd:element name="SignedSignatureProperties" type="SignedSignaturePropertiesType"/>
<xsd:element name="SignedDataObjectProperties" type="SignedDataObjectPropertiesType" minOccurs="0"/>
</xsd:sequence>
<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
</xsd:complexType>
<xsd:element name="UnsignedProperties" type="UnsignedPropertiesType"/>
<xsd:complexType name="UnsignedPropertiesType">
<xsd:sequence>
<xsd:element name="UnsignedSignatureProperties" type="UnsignedSignaturePropertiesType" minOccurs="0"/>
<xsd:element name="UnsignedDataObjectProperties" type="UnsignedDataObjectPropertiesType" minOccurs="0"/>
</xsd:sequence>
<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
</xsd:complexType>
<xsd:element name="SignedSignatureProperties" type="SignedSignaturePropertiesType"/>
<xsd:complexType name="SignedSignaturePropertiesType">
<xsd:sequence>
<xsd:element name="SigningTime" type="xsd:dateTime"/>
<xsd:element name="SigningCertificate" type="CertIDListType"/>
<xsd:element name="SignaturePolicyIdentifier" type="SignaturePolicyIdentifierType"/>
<xsd:element name="SignatureProductionPlace" type="SignatureProductionPlaceType" minOccurs="0"/>
<xsd:element name="SignerRole" type="SignerRoleType" minOccurs="0"/>
</xsd:sequence>
</xsd:complexType>
<xsd:element name="SignedDataObjectProperties" type="SignedDataObjectPropertiesType"/>
<xsd:complexType name="SignedDataObjectPropertiesType">
<xsd:sequence>
<xsd:element name="DataObjectFormat" type="DataObjectFormatType" minOccurs="0" maxOccurs="unbounded"/>
<xsd:element name="CommitmentTypeIndication" type="CommitmentTypeIndicationType" minOccurs="0" maxOccurs="unbounded"/>
<xsd:element name="AllDataObjectsTimeStamp" type="TimeStampType" minOccurs="0" maxOccurs="unbounded"/>
<xsd:element name="IndividualDataObjectsTimeStamp" type="TimeStampType" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
<xsd:element name="UnsignedSignatureProperties" type="UnsignedSignaturePropertiesType"/>
<xsd:complexType name="UnsignedSignaturePropertiesType">
<xsd:sequence>
<xsd:element name="CounterSignature" type="CounterSignatureType" minOccurs="0" maxOccurs="unbounded"/>
<xsd:element name="SignatureTimeStamp" type="TimeStampType" minOccurs="0" maxOccurs="unbounded"/>
<xsd:element name="CompleteCertificateRefs" type="CompleteCertificateRefsType" minOccurs="0"/>
<xsd:element name="CompleteRevocationRefs" type="CompleteRevocationRefsType" minOccurs="0"/>
<xsd:choice>
<xsd:element name="SigAndRefsTimeStamp" type="TimeStampType" minOccurs="0" maxOccurs="unbounded"/>
<xsd:element name="RefsOnlyTimeStamp" type="TimeStampType" minOccurs="0" maxOccurs="unbounded"/>
</xsd:choice>
<xsd:element name="CertificateValues" type="CertificateValuesType" minOccurs="0"/>
<xsd:element name="RevocationValues" type="RevocationValuesType" minOccurs="0"/>
<xsd:element name="ArchiveTimeStamp" type="TimeStampType" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
<xsd:element name="UnsignedDataObjectProperties" type="UnsignedDataObjectPropertiesType"/>
<xsd:complexType name="UnsignedDataObjectPropertiesType">
<xsd:sequence>
<xsd:element name="UnsignedDataObjectProperty" type="AnyType" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
<xsd:element name="QualifyingPropertiesReference" type="QualifyingPropertiesReferenceType"/>
<xsd:complexType name="QualifyingPropertiesReferenceType">
<xsd:sequence>
<xsd:element name="Transforms" type="ds:TransformsType" minOccurs="0"/>
</xsd:sequence>
<xsd:attribute name="URI" type="xsd:anyURI" use="required"/>
<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
</xsd:complexType>
<xsd:element name="SigningTime" type="xsd:dateTime"/>
<xsd:element name="SigningCertificate" type="CertIDListType"/>
<xsd:complexType name="CertIDListType">
<xsd:sequence>
<xsd:element name="Cert" type="CertIDType" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="CertIDType">
<xsd:sequence>
<xsd:element name="CertDigest" type="DigestAlgAndValueType"/>
<xsd:element name="IssuerSerial" type="ds:X509IssuerSerialType"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="DigestAlgAndValueType">
<xsd:sequence>
<xsd:element name="DigestMethod" type="ds:DigestMethodType"/>
<xsd:element name="DigestValue" type="ds:DigestValueType"/>
</xsd:sequence>
</xsd:complexType>
<xsd:element name="SignaturePolicyIdentifier" type="SignaturePolicyIdentifierType"/>
<xsd:complexType name="SignaturePolicyIdentifierType">
<xsd:choice>
<xsd:element name="SignaturePolicyId" type="SignaturePolicyIdType"/>
<xsd:element name="SignaturePolicyImplied"/>
</xsd:choice>
</xsd:complexType>
<xsd:complexType name="SignaturePolicyIdType">
<xsd:sequence>
<xsd:element name="SigPolicyId" type="ObjectIdentifierType"/>
<xsd:element ref="ds:Transforms" minOccurs="0"/>
<xsd:element name="SigPolicyHash" type="DigestAlgAndValueType"/>
<xsd:element name="SigPolicyQualifiers" type="SigPolicyQualifiersListType" minOccurs="0"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="SigPolicyQualifiersListType">
<xsd:sequence>
<xsd:element name="SigPolicyQualifier" type="AnyType" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
<xsd:element name="SPURI" type="xsd:anyURI"/>
<xsd:element name="SPUserNotice" type="SPUserNoticeType"/>
<xsd:complexType name="SPUserNoticeType">
<xsd:sequence>
<xsd:element name="NoticeRef" type="NoticeReferenceType" minOccurs="0"/>
<xsd:element name="ExplicitText" type="xsd:string" minOccurs="0"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="NoticeReferenceType">
<xsd:sequence>
<xsd:element name="Organization" type="xsd:string"/>
<xsd:element name="NoticeNumbers" type="IntegerListType"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="IntegerListType">
<xsd:sequence>
<xsd:element name="int" type="xsd:integer" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
<xsd:element name="CounterSignature" type="CounterSignatureType"/>
<xsd:complexType name="CounterSignatureType">
<xsd:sequence>
<xsd:element ref="ds:Signature"/>
</xsd:sequence>
</xsd:complexType>
<xsd:element name="DataObjectFormat" type="DataObjectFormatType"/>
<xsd:complexType name="DataObjectFormatType">
<xsd:sequence>
<xsd:element name="Description" type="xsd:string" minOccurs="0"/>
<xsd:element name="ObjectIdentifier" type="ObjectIdentifierType" minOccurs="0"/>
<xsd:element name="MimeType" type="xsd:string" minOccurs="0"/>
<xsd:element name="Encoding" type="xsd:anyURI" minOccurs="0"/>
</xsd:sequence>
<xsd:attribute name="ObjectReference" type="xsd:anyURI" use="required"/>
</xsd:complexType>
<xsd:element name="CommitmentTypeIndication" type="CommitmentTypeIndicationType"/>
<xsd:complexType name="CommitmentTypeIndicationType">
<xsd:sequence>
<xsd:element name="CommitmentTypeId" type="ObjectIdentifierType"/>
<xsd:choice>
<xsd:element name="ObjectReference" type="xsd:anyURI" minOccurs="0" maxOccurs="unbounded"/>
<xsd:element name="AllSignedDataObjects"/>
</xsd:choice>
<xsd:element name="CommitmentTypeQualifiers" type="CommitmentTypeQualifiersListType" minOccurs="0"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="CommitmentTypeQualifiersListType">
<xsd:sequence>
<xsd:element name="CommitmentTypeQualifier" type="AnyType" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
<xsd:element name="SignatureProductionPlace" type="SignatureProductionPlaceType"/>
<xsd:complexType name="SignatureProductionPlaceType">
<xsd:sequence>
<xsd:element name="City" type="xsd:string" minOccurs="0"/>
<xsd:element name="StateOrProvince" type="xsd:string" minOccurs="0"/>
<xsd:element name="PostalCode" type="xsd:string" minOccurs="0"/>
<xsd:element name="CountryName" type="xsd:string" minOccurs="0"/>
</xsd:sequence>
</xsd:complexType>
<xsd:element name="SignerRole" type="SignerRoleType"/>
<xsd:complexType name="SignerRoleType">
<xsd:sequence>
<xsd:element name="ClaimedRoles" type="ClaimedRolesListType" minOccurs="0"/>
<xsd:element name="CertifiedRoles" type="CertifiedRolesListType" minOccurs="0"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="ClaimedRolesListType">
<xsd:sequence>
<xsd:element name="ClaimedRole" type="AnyType" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="CertifiedRolesListType">
<xsd:sequence>
<xsd:element name="CertifiedRole" type="EncapsulatedPKIDataType" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
<xsd:element name="AllDataObjectsTimeStamp" type="TimeStampType"/>
<xsd:element name="IndividualDataObjectsTimeStamp" type="TimeStampType"/>
<xsd:element name="SignatureTimeStamp" type="TimeStampType"/>
<xsd:element name="CompleteCertificateRefs" type="CompleteCertificateRefsType"/>
<xsd:complexType name="CompleteCertificateRefsType">
<xsd:sequence>
<xsd:element name="CertRefs" type="CertIDListType"/>
</xsd:sequence>
<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
</xsd:complexType>
<xsd:element name="CompleteRevocationRefs" type="CompleteRevocationRefsType"/>
<xsd:complexType name="CompleteRevocationRefsType">
<xsd:sequence>
<xsd:element name="CRLRefs" type="CRLRefsType" minOccurs="0"/>
<xsd:element name="OCSPRefs" type="OCSPRefsType" minOccurs="0"/>
<xsd:element name="OtherRefs" type="OtherCertStatusRefsType" minOccurs="0"/>
</xsd:sequence>
<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
</xsd:complexType>
<xsd:complexType name="CRLRefsType">
<xsd:sequence>
<xsd:element name="CRLRef" type="CRLRefType" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="CRLRefType">
<xsd:sequence>
<xsd:element name="DigestAlgAndValue" type="DigestAlgAndValueType"/>
<xsd:element name="CRLIdentifier" type="CRLIdentifierType" minOccurs="0"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="CRLIdentifierType">
<xsd:sequence>
<xsd:element name="Issuer" type="xsd:string"/>
<xsd:element name="IssueTime" type="xsd:dateTime"/>
<xsd:element name="Number" type="xsd:integer" minOccurs="0"/>
</xsd:sequence>
<xsd:attribute name="URI" type="xsd:anyURI" use="optional"/>
</xsd:complexType>
<xsd:complexType name="OCSPRefsType">
<xsd:sequence>
<xsd:element name="OCSPRef" type="OCSPRefType" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="OCSPRefType">
<xsd:sequence>
<xsd:element name="OCSPIdentifier" type="OCSPIdentifierType"/>
<xsd:element name="DigestAlgAndValue" type="DigestAlgAndValueType" minOccurs="0"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="OCSPIdentifierType">
<xsd:sequence>
<xsd:element name="ResponderID" type="xsd:string"/>
<xsd:element name="ProducedAt" type="xsd:dateTime"/>
</xsd:sequence>
<xsd:attribute name="URI" type="xsd:anyURI" use="optional"/>
</xsd:complexType>
<xsd:complexType name="OtherCertStatusRefsType">
<xsd:sequence>
<xsd:element name="OtherRef" type="AnyType" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
<xsd:element name="SigAndRefsTimeStamp" type="TimeStampType"/>
<xsd:element name="RefsOnlyTimeStamp" type="TimeStampType"/>
<xsd:element name="CertificateValues" type="CertificateValuesType"/>
<xsd:complexType name="CertificateValuesType">
<xsd:choice minOccurs="0" maxOccurs="unbounded">
<xsd:element name="EncapsulatedX509Certificate" type="EncapsulatedPKIDataType"/>
<xsd:element name="OtherCertificate" type="AnyType"/>
</xsd:choice>
<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
</xsd:complexType>
<xsd:element name="RevocationValues" type="RevocationValuesType"/>
<xsd:complexType name="RevocationValuesType">
<xsd:sequence>
<xsd:element name="CRLValues" type="CRLValuesType" minOccurs="0"/>
<xsd:element name="OCSPValues" type="OCSPValuesType" minOccurs="0"/>
<xsd:element name="OtherValues" type="OtherCertStatusValuesType" minOccurs="0"/>
</xsd:sequence>
<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
</xsd:complexType>
<xsd:complexType name="CRLValuesType">
<xsd:sequence>
<xsd:element name="EncapsulatedCRLValue" type="EncapsulatedPKIDataType" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="OCSPValuesType">
<xsd:sequence>
<xsd:element name="EncapsulatedOCSPValue" type="EncapsulatedPKIDataType" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="OtherCertStatusValuesType">
<xsd:sequence>
<xsd:element name="OtherValue" type="AnyType" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
<xsd:element name="ArchiveTimeStamp" type="TimeStampType"/>
</xsd:schema>
<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XML Spy v4.3 U (http://www.xmlspy.com) by XMLSpy v4 (Altova) -->
<xsd:schema targetNamespace="http://uri.etsi.org/01903/v1.1.1#" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://uri.etsi.org/01903/v1.1.1#" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" elementFormDefault="qualified" xsi:schemaLocation="http://www.w3.org/2000/09/xmldsig# xmldsig-core-schema.xsd">
<xsd:element name="Any" type="AnyType"/>
<xsd:complexType name="AnyType" mixed="true">
<xsd:sequence>
<xsd:any namespace="##any"/>
</xsd:sequence>
<xsd:anyAttribute namespace="##any"/>
</xsd:complexType>
<xsd:element name="ObjectIdentifier" type="ObjectIdentifierType"/>
<xsd:complexType name="ObjectIdentifierType">
<xsd:sequence>
<xsd:element name="Identifier" type="IdentifierType"/>
<xsd:element name="Description" type="xsd:string" minOccurs="0"/>
<xsd:element name="DocumentationReferences" type="DocumentationReferencesType" minOccurs="0"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="IdentifierType">
<xsd:simpleContent>
<xsd:extension base="xsd:anyURI">
<xsd:attribute name="Qualifier" type="QualifierType" use="optional"/>
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
<xsd:simpleType name="QualifierType">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="OIDAsURI"/>
<xsd:enumeration value="OIDAsURN"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:complexType name="DocumentationReferencesType">
<xsd:sequence maxOccurs="unbounded">
<xsd:element name="DocumentationReference" type="xsd:anyURI"/>
</xsd:sequence>
</xsd:complexType>
<xsd:element name="EncapsulatedPKIData" type="EncapsulatedPKIDataType"/>
<xsd:complexType name="EncapsulatedPKIDataType">
<xsd:simpleContent>
<xsd:extension base="xsd:base64Binary">
<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
<xsd:element name="TimeStamp" type="TimeStampType"/>
<xsd:complexType name="TimeStampType">
<xsd:sequence>
<xsd:element name="HashDataInfo" type="HashDataInfoType" maxOccurs="unbounded"/>
<xsd:choice>
<xsd:element name="EncapsulatedTimeStamp" type="EncapsulatedPKIDataType"/>
<xsd:element name="XMLTimeStamp" type="AnyType"/>
</xsd:choice>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="HashDataInfoType">
<xsd:sequence>
<xsd:element name="Transforms" type="ds:TransformsType" minOccurs="0"/>
</xsd:sequence>
<xsd:attribute name="uri" type="xsd:anyURI" use="required"/>
</xsd:complexType>
<xsd:element name="QualifyingProperties" type="QualifyingPropertiesType"/>
<xsd:complexType name="QualifyingPropertiesType">
<xsd:sequence>
<xsd:element name="SignedProperties" type="SignedPropertiesType" minOccurs="0"/>
<xsd:element name="UnsignedProperties" type="UnsignedPropertiesType" minOccurs="0"/>
</xsd:sequence>
<xsd:attribute name="Target" type="xsd:anyURI" use="required"/>
<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
</xsd:complexType>
<xsd:element name="SignedProperties" type="SignedPropertiesType"/>
<xsd:complexType name="SignedPropertiesType">
<xsd:sequence>
<xsd:element name="SignedSignatureProperties" type="SignedSignaturePropertiesType"/>
<xsd:element name="SignedDataObjectProperties" type="SignedDataObjectPropertiesType" minOccurs="0"/>
</xsd:sequence>
<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
</xsd:complexType>
<xsd:element name="UnsignedProperties" type="UnsignedPropertiesType"/>
<xsd:complexType name="UnsignedPropertiesType">
<xsd:sequence>
<xsd:element name="UnsignedSignatureProperties" type="UnsignedSignaturePropertiesType" minOccurs="0"/>
<xsd:element name="UnsignedDataObjectProperties" type="UnsignedDataObjectPropertiesType" minOccurs="0"/>
</xsd:sequence>
<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
</xsd:complexType>
<xsd:element name="SignedSignatureProperties" type="SignedSignaturePropertiesType"/>
<xsd:complexType name="SignedSignaturePropertiesType">
<xsd:sequence>
<xsd:element name="SigningTime" type="xsd:dateTime"/>
<xsd:element name="SigningCertificate" type="CertIDListType"/>
<xsd:element name="SignaturePolicyIdentifier" type="SignaturePolicyIdentifierType"/>
<xsd:element name="SignatureProductionPlace" type="SignatureProductionPlaceType" minOccurs="0"/>
<xsd:element name="SignerRole" type="SignerRoleType" minOccurs="0"/>
</xsd:sequence>
</xsd:complexType>
<xsd:element name="SignedDataObjectProperties" type="SignedDataObjectPropertiesType"/>
<xsd:complexType name="SignedDataObjectPropertiesType">
<xsd:sequence>
<xsd:element name="DataObjectFormat" type="DataObjectFormatType" minOccurs="0" maxOccurs="unbounded"/>
<xsd:element name="CommitmentTypeIndication" type="CommitmentTypeIndicationType" minOccurs="0" maxOccurs="unbounded"/>
<xsd:element name="AllDataObjectsTimeStamp" type="TimeStampType" minOccurs="0" maxOccurs="unbounded"/>
<xsd:element name="IndividualDataObjectsTimeStamp" type="TimeStampType" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
<xsd:element name="UnsignedSignatureProperties" type="UnsignedSignaturePropertiesType"/>
<xsd:complexType name="UnsignedSignaturePropertiesType">
<xsd:sequence>
<xsd:element name="CounterSignature" type="CounterSignatureType" minOccurs="0" maxOccurs="unbounded"/>
<xsd:element name="SignatureTimeStamp" type="TimeStampType" minOccurs="0" maxOccurs="unbounded"/>
<xsd:element name="CompleteCertificateRefs" type="CompleteCertificateRefsType" minOccurs="0"/>
<xsd:element name="CompleteRevocationRefs" type="CompleteRevocationRefsType" minOccurs="0"/>
<xsd:choice>
<xsd:element name="SigAndRefsTimeStamp" type="TimeStampType" minOccurs="0" maxOccurs="unbounded"/>
<xsd:element name="RefsOnlyTimeStamp" type="TimeStampType" minOccurs="0" maxOccurs="unbounded"/>
</xsd:choice>
<xsd:element name="CertificateValues" type="CertificateValuesType" minOccurs="0"/>
<xsd:element name="RevocationValues" type="RevocationValuesType" minOccurs="0"/>
<xsd:element name="ArchiveTimeStamp" type="TimeStampType" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
<xsd:element name="UnsignedDataObjectProperties" type="UnsignedDataObjectPropertiesType"/>
<xsd:complexType name="UnsignedDataObjectPropertiesType">
<xsd:sequence>
<xsd:element name="UnsignedDataObjectProperty" type="AnyType" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
<xsd:element name="QualifyingPropertiesReference" type="QualifyingPropertiesReferenceType"/>
<xsd:complexType name="QualifyingPropertiesReferenceType">
<xsd:sequence>
<xsd:element name="Transforms" type="ds:TransformsType" minOccurs="0"/>
</xsd:sequence>
<xsd:attribute name="URI" type="xsd:anyURI" use="required"/>
<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
</xsd:complexType>
<xsd:element name="SigningTime" type="xsd:dateTime"/>
<xsd:element name="SigningCertificate" type="CertIDListType"/>
<xsd:complexType name="CertIDListType">
<xsd:sequence>
<xsd:element name="Cert" type="CertIDType" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="CertIDType">
<xsd:sequence>
<xsd:element name="CertDigest" type="DigestAlgAndValueType"/>
<xsd:element name="IssuerSerial" type="ds:X509IssuerSerialType"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="DigestAlgAndValueType">
<xsd:sequence>
<xsd:element name="DigestMethod" type="ds:DigestMethodType"/>
<xsd:element name="DigestValue" type="ds:DigestValueType"/>
</xsd:sequence>
</xsd:complexType>
<xsd:element name="SignaturePolicyIdentifier" type="SignaturePolicyIdentifierType"/>
<xsd:complexType name="SignaturePolicyIdentifierType">
<xsd:choice>
<xsd:element name="SignaturePolicyId" type="SignaturePolicyIdType"/>
<xsd:element name="SignaturePolicyImplied"/>
</xsd:choice>
</xsd:complexType>
<xsd:complexType name="SignaturePolicyIdType">
<xsd:sequence>
<xsd:element name="SigPolicyId" type="ObjectIdentifierType"/>
<xsd:element ref="ds:Transforms" minOccurs="0"/>
<xsd:element name="SigPolicyHash" type="DigestAlgAndValueType"/>
<xsd:element name="SigPolicyQualifiers" type="SigPolicyQualifiersListType" minOccurs="0"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="SigPolicyQualifiersListType">
<xsd:sequence>
<xsd:element name="SigPolicyQualifier" type="AnyType" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
<xsd:element name="SPURI" type="xsd:anyURI"/>
<xsd:element name="SPUserNotice" type="SPUserNoticeType"/>
<xsd:complexType name="SPUserNoticeType">
<xsd:sequence>
<xsd:element name="NoticeRef" type="NoticeReferenceType" minOccurs="0"/>
<xsd:element name="ExplicitText" type="xsd:string" minOccurs="0"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="NoticeReferenceType">
<xsd:sequence>
<xsd:element name="Organization" type="xsd:string"/>
<xsd:element name="NoticeNumbers" type="IntegerListType"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="IntegerListType">
<xsd:sequence>
<xsd:element name="int" type="xsd:integer" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
<xsd:element name="CounterSignature" type="CounterSignatureType"/>
<xsd:complexType name="CounterSignatureType">
<xsd:sequence>
<xsd:element ref="ds:Signature"/>
</xsd:sequence>
</xsd:complexType>
<xsd:element name="DataObjectFormat" type="DataObjectFormatType"/>
<xsd:complexType name="DataObjectFormatType">
<xsd:sequence>
<xsd:element name="Description" type="xsd:string" minOccurs="0"/>
<xsd:element name="ObjectIdentifier" type="ObjectIdentifierType" minOccurs="0"/>
<xsd:element name="MimeType" type="xsd:string" minOccurs="0"/>
<xsd:element name="Encoding" type="xsd:anyURI" minOccurs="0"/>
</xsd:sequence>
<xsd:attribute name="ObjectReference" type="xsd:anyURI" use="required"/>
</xsd:complexType>
<xsd:element name="CommitmentTypeIndication" type="CommitmentTypeIndicationType"/>
<xsd:complexType name="CommitmentTypeIndicationType">
<xsd:sequence>
<xsd:element name="CommitmentTypeId" type="ObjectIdentifierType"/>
<xsd:choice>
<xsd:element name="ObjectReference" type="xsd:anyURI" minOccurs="0" maxOccurs="unbounded"/>
<xsd:element name="AllSignedDataObjects"/>
</xsd:choice>
<xsd:element name="CommitmentTypeQualifiers" type="CommitmentTypeQualifiersListType" minOccurs="0"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="CommitmentTypeQualifiersListType">
<xsd:sequence>
<xsd:element name="CommitmentTypeQualifier" type="AnyType" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
<xsd:element name="SignatureProductionPlace" type="SignatureProductionPlaceType"/>
<xsd:complexType name="SignatureProductionPlaceType">
<xsd:sequence>
<xsd:element name="City" type="xsd:string" minOccurs="0"/>
<xsd:element name="StateOrProvince" type="xsd:string" minOccurs="0"/>
<xsd:element name="PostalCode" type="xsd:string" minOccurs="0"/>
<xsd:element name="CountryName" type="xsd:string" minOccurs="0"/>
</xsd:sequence>
</xsd:complexType>
<xsd:element name="SignerRole" type="SignerRoleType"/>
<xsd:complexType name="SignerRoleType">
<xsd:sequence>
<xsd:element name="ClaimedRoles" type="ClaimedRolesListType" minOccurs="0"/>
<xsd:element name="CertifiedRoles" type="CertifiedRolesListType" minOccurs="0"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="ClaimedRolesListType">
<xsd:sequence>
<xsd:element name="ClaimedRole" type="AnyType" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="CertifiedRolesListType">
<xsd:sequence>
<xsd:element name="CertifiedRole" type="EncapsulatedPKIDataType" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
<xsd:element name="AllDataObjectsTimeStamp" type="TimeStampType"/>
<xsd:element name="IndividualDataObjectsTimeStamp" type="TimeStampType"/>
<xsd:element name="SignatureTimeStamp" type="TimeStampType"/>
<xsd:element name="CompleteCertificateRefs" type="CompleteCertificateRefsType"/>
<xsd:complexType name="CompleteCertificateRefsType">
<xsd:sequence>
<xsd:element name="CertRefs" type="CertIDListType"/>
</xsd:sequence>
<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
</xsd:complexType>
<xsd:element name="CompleteRevocationRefs" type="CompleteRevocationRefsType"/>
<xsd:complexType name="CompleteRevocationRefsType">
<xsd:sequence>
<xsd:element name="CRLRefs" type="CRLRefsType" minOccurs="0"/>
<xsd:element name="OCSPRefs" type="OCSPRefsType" minOccurs="0"/>
<xsd:element name="OtherRefs" type="OtherCertStatusRefsType" minOccurs="0"/>
</xsd:sequence>
<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
</xsd:complexType>
<xsd:complexType name="CRLRefsType">
<xsd:sequence>
<xsd:element name="CRLRef" type="CRLRefType" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="CRLRefType">
<xsd:sequence>
<xsd:element name="DigestAlgAndValue" type="DigestAlgAndValueType"/>
<xsd:element name="CRLIdentifier" type="CRLIdentifierType" minOccurs="0"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="CRLIdentifierType">
<xsd:sequence>
<xsd:element name="Issuer" type="xsd:string"/>
<xsd:element name="IssueTime" type="xsd:dateTime"/>
<xsd:element name="Number" type="xsd:integer" minOccurs="0"/>
</xsd:sequence>
<xsd:attribute name="URI" type="xsd:anyURI" use="optional"/>
</xsd:complexType>
<xsd:complexType name="OCSPRefsType">
<xsd:sequence>
<xsd:element name="OCSPRef" type="OCSPRefType" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="OCSPRefType">
<xsd:sequence>
<xsd:element name="OCSPIdentifier" type="OCSPIdentifierType"/>
<xsd:element name="DigestAlgAndValue" type="DigestAlgAndValueType" minOccurs="0"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="OCSPIdentifierType">
<xsd:sequence>
<xsd:element name="ResponderID" type="xsd:string"/>
<xsd:element name="ProducedAt" type="xsd:dateTime"/>
</xsd:sequence>
<xsd:attribute name="URI" type="xsd:anyURI" use="optional"/>
</xsd:complexType>
<xsd:complexType name="OtherCertStatusRefsType">
<xsd:sequence>
<xsd:element name="OtherRef" type="AnyType" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
<xsd:element name="SigAndRefsTimeStamp" type="TimeStampType"/>
<xsd:element name="RefsOnlyTimeStamp" type="TimeStampType"/>
<xsd:element name="CertificateValues" type="CertificateValuesType"/>
<xsd:complexType name="CertificateValuesType">
<xsd:choice minOccurs="0" maxOccurs="unbounded">
<xsd:element name="EncapsulatedX509Certificate" type="EncapsulatedPKIDataType"/>
<xsd:element name="OtherCertificate" type="AnyType"/>
</xsd:choice>
<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
</xsd:complexType>
<xsd:element name="RevocationValues" type="RevocationValuesType"/>
<xsd:complexType name="RevocationValuesType">
<xsd:sequence>
<xsd:element name="CRLValues" type="CRLValuesType" minOccurs="0"/>
<xsd:element name="OCSPValues" type="OCSPValuesType" minOccurs="0"/>
<xsd:element name="OtherValues" type="OtherCertStatusValuesType" minOccurs="0"/>
</xsd:sequence>
<xsd:attribute name="Id" type="xsd:ID" use="optional"/>
</xsd:complexType>
<xsd:complexType name="CRLValuesType">
<xsd:sequence>
<xsd:element name="EncapsulatedCRLValue" type="EncapsulatedPKIDataType" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="OCSPValuesType">
<xsd:sequence>
<xsd:element name="EncapsulatedOCSPValue" type="EncapsulatedPKIDataType" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="OtherCertStatusValuesType">
<xsd:sequence>
<xsd:element name="OtherValue" type="AnyType" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
<xsd:element name="ArchiveTimeStamp" type="TimeStampType"/>
</xsd:schema>

View File

@ -1,123 +1,123 @@
algorithm.alreadyRegistered = URI {0} already assigned to class {1}
algorithm.classDoesNotExist = Cannot register URI {0} to class {1} because this class does not exist in CLASSPATH
algorithm.ClassDoesNotExist = Class {0} does not exist
algorithm.extendsWrongClass = Cannot register URI {0} to class {1} because it does not extend {2}
algorithms.CannotUseAlgorithmParameterSpecOnDSA = Sorry, but you cannot use a AlgorithmParameterSpec object for creating DSA signatures.
algorithms.CannotUseAlgorithmParameterSpecOnRSA = Sorry, but you cannot use a AlgorithmParameterSpec object for creating RSA signatures.
algorithms.CannotUseSecureRandomOnMAC = Sorry, but you cannot use a SecureRandom object for creating MACs.
algorithms.HMACOutputLengthOnlyForHMAC = A HMACOutputLength can only be specified for HMAC integrity algorithms
algorithms.NoSuchAlgorithm = The requested algorithm {0} does not exist. Original Message was: {1}
algorithms.NoSuchMap = The algorithm URI "{0}" could not be mapped to a JCE algorithm
algorithms.NoSuchProvider = The specified Provider {0} does not exist. Original Message was: {1}
algorithms.operationOnlyVerification = A public key can only used for verification of a signature.
algorithms.WrongKeyForThisOperation = Sorry, you supplied the wrong key type for this operation! You supplied a {0} but a {1} is needed.
attributeValueIllegal = The attribute {0} has value {1} but must be {2}
c14n.Canonicalizer.Exception = Exception during Canonicalization: Original Message was {0}
c14n.Canonicalizer.IllegalNode = Illegal node type {0}, node name was {1}
c14n.Canonicalizer.NoSuchCanonicalizer = No canonicalizer found with URI {0}
c14n.Canonicalizer.ParserConfigurationException = ParserConfigurationException during Canonicalization: Original Message was {0}
c14n.Canonicalizer.RelativeNamespace = Element {0} has a relative namespace: {1}="{2}"
c14n.Canonicalizer.SAXException = SAXException during Canonicalization: Original Message was {0}
c14n.Canonicalizer.TraversalNotSupported = This DOM document does not support Traversal {0}
c14n.Canonicalizer.UnsupportedEncoding = Unsupported encoding {0}
c14n.Canonicalizer.UnsupportedOperation = This canonicalizer does not support this operation
c14n.XMLUtils.circumventBug2650forgotten = The tree has not been prepared for canonicalization using XMLUtils#circumventBug2650(Document)
certificate.noSki.lowVersion = Certificate cannot contain a SubjectKeyIdentifier because it is only X509v{0}
certificate.noSki.notOctetString = Certificates SubjectKeyIdentifier is not a OctetString
certificate.noSki.null = Certificate does not contain a SubjectKeyIdentifier
defaultNamespaceCannotBeSetHere = Default namespace cannot be set here
ElementProxy.nullElement = Cannot create an ElementProxy from a null argument
empty = {0}
encryption.algorithmCannotBeUsedForEncryptedData = encryption.algorithmCannotBeUsedForEncryptedData {0}
encryption.algorithmCannotEatInitParams = encryption.algorithmCannotEatInitParams
encryption.algorithmCannotEncryptDecrypt = encryption.algorithmCannotEncryptDecrypt
encryption.algorithmCannotWrapUnWrap = encryption.algorithmCannotWrapUnWrap
encryption.ExplicitKeySizeMismatch = The xenc:KeySize element requests a key size of {0} bit but the algorithm implements {1} bit
encryption.nonceLongerThanDecryptedPlaintext = The given nonce is longer than the available plaintext. I Cannot strip away this.
encryption.RSAOAEP.dataHashWrong = data hash wrong
encryption.RSAOAEP.dataStartWrong = data wrong start {0}
encryption.RSAOAEP.dataTooShort = data too short
encryption.RSAPKCS15.blockTruncated = block truncated
encryption.RSAPKCS15.noDataInBlock = no data in block
encryption.RSAPKCS15.unknownBlockType = unknown block type
encryption.nokey = No Key Encryption Key loaded and cannot determine using key resolvers
endorsed.jdk1.4.0 = Since it seems that nobody reads our installation notes, we must do it in the exception messages. Hope you read them. You did NOT use the endorsed mechanism from JDK 1.4 properly; look at <http://xml.apache.org/security/Java/installation.html> how to solve this problem.
errorMessages.InvalidDigestValueException = INVALID signature -- check reference resolution.
errorMessages.InvalidSignatureValueException = INVALID signature -- core validation failed.
errorMessages.IOException = Other file I/O and similar exceptions.
errorMessages.MissingKeyFailureException = Cannot verify because of missing public key. Provide it via addResource and try again.
errorMessages.MissingResourceFailureException = Cannot verify because of unresolved references. Provide it via addResource and try again.
errorMessages.NoSuchAlgorithmException = Unknown Algorithm {0}
errorMessages.NotYetImplementedException = Functionality not yet there.
errorMessages.XMLSignatureException = Verification failed for some other reason.
decoding.divisible.four = It should be divisible by four
decoding.general = Error while decoding
FileKeyStorageImpl.addToDefaultFromRemoteNotImplemented = Method addToDefaultFromRemote() not yet implemented.
FileKeyStorageImpl.NoCert.Context = Not found such a X509Certificate including context {0}
FileKeyStorageImpl.NoCert.IssNameSerNo = Not found such a X509Certificate with IssuerName {0} and serial number {1}
FileKeyStorageImpl.NoCert.SubjName = Not found such a X509Certificate including SubjectName {0}
generic.dontHaveConstructionElement = I do not have a construction Element
generic.EmptyMessage = {0}
generic.NotYetImplemented = {0} Not YET implemented ;-((
java.security.InvalidKeyException = Invalid key
java.security.NoSuchProviderException = Unknown or unsupported provider
java.security.UnknownKeyType = Unknown or unsupported key type {0}
KeyInfo.needKeyResolver = More than one keyResovler have to be registered
KeyInfo.nokey = Cannot get key from {0}
KeyInfo.noKey = Cannot get the public key
KeyInfo.wrongNumberOfObject = Need {0} keyObjects
KeyInfo.wrongUse = This object was made for getting {0}
keyResolver.alreadyRegistered = {1} class has already been registered for {0}
KeyResolver.needStorageResolver = Need a StorageResolver to retrieve a Certificate from a {0}
KeyResoverSpiImpl.cannotGetCert = Cannot get the Certificate that include or in {1} in implement class {0}
KeyResoverSpiImpl.elementGeneration = Cannot make {1} element in implement class {0}
KeyResoverSpiImpl.getPoublicKey = Cannot get the public key from implement class {0}
KeyResoverSpiImpl.InvalidElement = Cannot set (2) Element in implement class {0}
KeyResoverSpiImpl.keyStore = KeyStorage error in implement class {0}
KeyResoverSpiImpl.need.Element = {1} type of Element is needed in implement class {0}
KeyResoverSpiImpl.wrongCRLElement = Cannot make CRL from {1} in implement class {0}
KeyResoverSpiImpl.wrongKeyObject = Need {1} type of KeyObject for generation Element in implement class{0}
KeyResoverSpiImpl.wrongNumberOfObject = Need {1} keyObject in implement class {0}
KeyStore.alreadyRegistered = {0} Class has already been registered for {1}
KeyStore.register = {1} type class register error in class {0}
KeyStore.registerStore.register = Registeration error for type {0}
KeyValue.IllegalArgument = Cannot create a {0} from {1}
namespacePrefixAlreadyUsedByOtherURI = Namespace prefix {0} already used by other URI {1}
notYetInitialized = The module {0} is not yet initialized
prefix.AlreadyAssigned = You want to assign {0} as prefix for namespace {1} but it is already assigned for {2}
signature.Canonicalizer.UnknownCanonicalizer = Unknown canonicalizer. No handler installed for URI {0}
signature.DSA.invalidFormat = Invalid ASN.1 encoding of the DSA signature
signature.Generation.signBeforeGetValue = You have to XMLSignature.sign(java.security.PrivateKey) first
signature.signaturePropertyHasNoTarget = The Target attribute of the SignatureProperty must be set
signature.Transform.ErrorDuringTransform = A {1} was thrown during the {0} transform
signature.Transform.NotYetImplemented = Transform {0} not yet implemented
signature.Transform.NullPointerTransform = Null pointer as URI. Programming bug?
signature.Transform.UnknownTransform = Unknown transformation. No handler installed for URI {0}
signature.Transform.node = Current Node: {0}
signature.Transform.nodeAndType = Current Node: {0}, type: {1}
signature.Util.BignumNonPositive = bigInteger.signum() must be positive
signature.Util.NonTextNode = Not a text node
signature.Util.TooManyChilds = Too many childs of Type {0} in {1}
signature.Verification.certificateError = Certificate error
signature.Verification.IndexOutOfBounds = Index {0} illegal. We only have {1} References
signature.Verification.internalError = Internal error
signature.Verification.InvalidDigestOrReference = Invalid digest of reference {0}
signature.Verification.keyStore = KeyStore error
signature.Verification.MissingID = Cannot resolve element with ID {0}
signature.Verification.MissingResources = Cannot resolve external resource {0}
signature.Verification.NoSignatureElement = Input document contains no {0} Element in namespace {1}
signature.Verification.Reference.NoInput = The Reference for URI {0} has no XMLSignatureInput
signature.Verification.SignatureError = Signature error
signature.XMLSignatureInput.MissingConstuctor = Cannot construct a XMLSignatureInput from class {0}
signature.XMLSignatureInput.SerializeDOM = Input initialized with DOM Element. Use Canonicalization to serialize it
signature.XMLSignatureInput.nodesetReference = Unable to convert to nodeset the reference
transform.Init.IllegalContextArgument = Invalid context argument of class {0}. Must be String, org.w3c.dom.NodeList or java.io.InputStream.
transform.init.NotInitialized =
transform.init.wrongURI = Initialized with wrong URI. How could this happen? We implement {0} but {1} was used during initialization
utils.Base64.IllegalBitlength = Illegal byte length; Data to be decoded must be a multiple of 4
Base64Decoding = Error while decoding
utils.resolver.noClass = Could not find a resolver for URI {0} and Base {1}
xml.WrongContent = Cannot find {0} in {1}
xml.WrongElement = Cannot create a {0} from a {1} element
xpath.funcHere.documentsDiffer = The XPath is not in the same document as the context node
xpath.funcHere.noXPathContext = Try to evaluate an XPath which uses the here() function but XPath is not inside an ds:XPath Element. XPath was : {0}
algorithm.alreadyRegistered = URI {0} already assigned to class {1}
algorithm.classDoesNotExist = Cannot register URI {0} to class {1} because this class does not exist in CLASSPATH
algorithm.ClassDoesNotExist = Class {0} does not exist
algorithm.extendsWrongClass = Cannot register URI {0} to class {1} because it does not extend {2}
algorithms.CannotUseAlgorithmParameterSpecOnDSA = Sorry, but you cannot use a AlgorithmParameterSpec object for creating DSA signatures.
algorithms.CannotUseAlgorithmParameterSpecOnRSA = Sorry, but you cannot use a AlgorithmParameterSpec object for creating RSA signatures.
algorithms.CannotUseSecureRandomOnMAC = Sorry, but you cannot use a SecureRandom object for creating MACs.
algorithms.HMACOutputLengthOnlyForHMAC = A HMACOutputLength can only be specified for HMAC integrity algorithms
algorithms.NoSuchAlgorithm = The requested algorithm {0} does not exist. Original Message was: {1}
algorithms.NoSuchMap = The algorithm URI "{0}" could not be mapped to a JCE algorithm
algorithms.NoSuchProvider = The specified Provider {0} does not exist. Original Message was: {1}
algorithms.operationOnlyVerification = A public key can only used for verification of a signature.
algorithms.WrongKeyForThisOperation = Sorry, you supplied the wrong key type for this operation! You supplied a {0} but a {1} is needed.
attributeValueIllegal = The attribute {0} has value {1} but must be {2}
c14n.Canonicalizer.Exception = Exception during Canonicalization: Original Message was {0}
c14n.Canonicalizer.IllegalNode = Illegal node type {0}, node name was {1}
c14n.Canonicalizer.NoSuchCanonicalizer = No canonicalizer found with URI {0}
c14n.Canonicalizer.ParserConfigurationException = ParserConfigurationException during Canonicalization: Original Message was {0}
c14n.Canonicalizer.RelativeNamespace = Element {0} has a relative namespace: {1}="{2}"
c14n.Canonicalizer.SAXException = SAXException during Canonicalization: Original Message was {0}
c14n.Canonicalizer.TraversalNotSupported = This DOM document does not support Traversal {0}
c14n.Canonicalizer.UnsupportedEncoding = Unsupported encoding {0}
c14n.Canonicalizer.UnsupportedOperation = This canonicalizer does not support this operation
c14n.XMLUtils.circumventBug2650forgotten = The tree has not been prepared for canonicalization using XMLUtils#circumventBug2650(Document)
certificate.noSki.lowVersion = Certificate cannot contain a SubjectKeyIdentifier because it is only X509v{0}
certificate.noSki.notOctetString = Certificates SubjectKeyIdentifier is not a OctetString
certificate.noSki.null = Certificate does not contain a SubjectKeyIdentifier
defaultNamespaceCannotBeSetHere = Default namespace cannot be set here
ElementProxy.nullElement = Cannot create an ElementProxy from a null argument
empty = {0}
encryption.algorithmCannotBeUsedForEncryptedData = encryption.algorithmCannotBeUsedForEncryptedData {0}
encryption.algorithmCannotEatInitParams = encryption.algorithmCannotEatInitParams
encryption.algorithmCannotEncryptDecrypt = encryption.algorithmCannotEncryptDecrypt
encryption.algorithmCannotWrapUnWrap = encryption.algorithmCannotWrapUnWrap
encryption.ExplicitKeySizeMismatch = The xenc:KeySize element requests a key size of {0} bit but the algorithm implements {1} bit
encryption.nonceLongerThanDecryptedPlaintext = The given nonce is longer than the available plaintext. I Cannot strip away this.
encryption.RSAOAEP.dataHashWrong = data hash wrong
encryption.RSAOAEP.dataStartWrong = data wrong start {0}
encryption.RSAOAEP.dataTooShort = data too short
encryption.RSAPKCS15.blockTruncated = block truncated
encryption.RSAPKCS15.noDataInBlock = no data in block
encryption.RSAPKCS15.unknownBlockType = unknown block type
encryption.nokey = No Key Encryption Key loaded and cannot determine using key resolvers
endorsed.jdk1.4.0 = Since it seems that nobody reads our installation notes, we must do it in the exception messages. Hope you read them. You did NOT use the endorsed mechanism from JDK 1.4 properly; look at <http://xml.apache.org/security/Java/installation.html> how to solve this problem.
errorMessages.InvalidDigestValueException = INVALID signature -- check reference resolution.
errorMessages.InvalidSignatureValueException = INVALID signature -- core validation failed.
errorMessages.IOException = Other file I/O and similar exceptions.
errorMessages.MissingKeyFailureException = Cannot verify because of missing public key. Provide it via addResource and try again.
errorMessages.MissingResourceFailureException = Cannot verify because of unresolved references. Provide it via addResource and try again.
errorMessages.NoSuchAlgorithmException = Unknown Algorithm {0}
errorMessages.NotYetImplementedException = Functionality not yet there.
errorMessages.XMLSignatureException = Verification failed for some other reason.
decoding.divisible.four = It should be divisible by four
decoding.general = Error while decoding
FileKeyStorageImpl.addToDefaultFromRemoteNotImplemented = Method addToDefaultFromRemote() not yet implemented.
FileKeyStorageImpl.NoCert.Context = Not found such a X509Certificate including context {0}
FileKeyStorageImpl.NoCert.IssNameSerNo = Not found such a X509Certificate with IssuerName {0} and serial number {1}
FileKeyStorageImpl.NoCert.SubjName = Not found such a X509Certificate including SubjectName {0}
generic.dontHaveConstructionElement = I do not have a construction Element
generic.EmptyMessage = {0}
generic.NotYetImplemented = {0} Not YET implemented ;-((
java.security.InvalidKeyException = Invalid key
java.security.NoSuchProviderException = Unknown or unsupported provider
java.security.UnknownKeyType = Unknown or unsupported key type {0}
KeyInfo.needKeyResolver = More than one keyResovler have to be registered
KeyInfo.nokey = Cannot get key from {0}
KeyInfo.noKey = Cannot get the public key
KeyInfo.wrongNumberOfObject = Need {0} keyObjects
KeyInfo.wrongUse = This object was made for getting {0}
keyResolver.alreadyRegistered = {1} class has already been registered for {0}
KeyResolver.needStorageResolver = Need a StorageResolver to retrieve a Certificate from a {0}
KeyResoverSpiImpl.cannotGetCert = Cannot get the Certificate that include or in {1} in implement class {0}
KeyResoverSpiImpl.elementGeneration = Cannot make {1} element in implement class {0}
KeyResoverSpiImpl.getPoublicKey = Cannot get the public key from implement class {0}
KeyResoverSpiImpl.InvalidElement = Cannot set (2) Element in implement class {0}
KeyResoverSpiImpl.keyStore = KeyStorage error in implement class {0}
KeyResoverSpiImpl.need.Element = {1} type of Element is needed in implement class {0}
KeyResoverSpiImpl.wrongCRLElement = Cannot make CRL from {1} in implement class {0}
KeyResoverSpiImpl.wrongKeyObject = Need {1} type of KeyObject for generation Element in implement class{0}
KeyResoverSpiImpl.wrongNumberOfObject = Need {1} keyObject in implement class {0}
KeyStore.alreadyRegistered = {0} Class has already been registered for {1}
KeyStore.register = {1} type class register error in class {0}
KeyStore.registerStore.register = Registeration error for type {0}
KeyValue.IllegalArgument = Cannot create a {0} from {1}
namespacePrefixAlreadyUsedByOtherURI = Namespace prefix {0} already used by other URI {1}
notYetInitialized = The module {0} is not yet initialized
prefix.AlreadyAssigned = You want to assign {0} as prefix for namespace {1} but it is already assigned for {2}
signature.Canonicalizer.UnknownCanonicalizer = Unknown canonicalizer. No handler installed for URI {0}
signature.DSA.invalidFormat = Invalid ASN.1 encoding of the DSA signature
signature.Generation.signBeforeGetValue = You have to XMLSignature.sign(java.security.PrivateKey) first
signature.signaturePropertyHasNoTarget = The Target attribute of the SignatureProperty must be set
signature.Transform.ErrorDuringTransform = A {1} was thrown during the {0} transform
signature.Transform.NotYetImplemented = Transform {0} not yet implemented
signature.Transform.NullPointerTransform = Null pointer as URI. Programming bug?
signature.Transform.UnknownTransform = Unknown transformation. No handler installed for URI {0}
signature.Transform.node = Current Node: {0}
signature.Transform.nodeAndType = Current Node: {0}, type: {1}
signature.Util.BignumNonPositive = bigInteger.signum() must be positive
signature.Util.NonTextNode = Not a text node
signature.Util.TooManyChilds = Too many childs of Type {0} in {1}
signature.Verification.certificateError = Certificate error
signature.Verification.IndexOutOfBounds = Index {0} illegal. We only have {1} References
signature.Verification.internalError = Internal error
signature.Verification.InvalidDigestOrReference = Invalid digest of reference {0}
signature.Verification.keyStore = KeyStore error
signature.Verification.MissingID = Cannot resolve element with ID {0}
signature.Verification.MissingResources = Cannot resolve external resource {0}
signature.Verification.NoSignatureElement = Input document contains no {0} Element in namespace {1}
signature.Verification.Reference.NoInput = The Reference for URI {0} has no XMLSignatureInput
signature.Verification.SignatureError = Signature error
signature.XMLSignatureInput.MissingConstuctor = Cannot construct a XMLSignatureInput from class {0}
signature.XMLSignatureInput.SerializeDOM = Input initialized with DOM Element. Use Canonicalization to serialize it
signature.XMLSignatureInput.nodesetReference = Unable to convert to nodeset the reference
transform.Init.IllegalContextArgument = Invalid context argument of class {0}. Must be String, org.w3c.dom.NodeList or java.io.InputStream.
transform.init.NotInitialized =
transform.init.wrongURI = Initialized with wrong URI. How could this happen? We implement {0} but {1} was used during initialization
utils.Base64.IllegalBitlength = Illegal byte length; Data to be decoded must be a multiple of 4
Base64Decoding = Error while decoding
utils.resolver.noClass = Could not find a resolver for URI {0} and Base {1}
xml.WrongContent = Cannot find {0} in {1}
xml.WrongElement = Cannot create a {0} from a {1} element
xpath.funcHere.documentsDiffer = The XPath is not in the same document as the context node
xpath.funcHere.noXPathContext = Try to evaluate an XPath which uses the here() function but XPath is not inside an ds:XPath Element. XPath was : {0}

View File

@ -620,14 +620,34 @@ public class ConfigFile extends javax.security.auth.login.Configuration {
* start up time noticeably for the new launcher. -- DAC
*/
private InputStream getInputStream(URL url) throws IOException {
if ("file".equals(url.getProtocol())) {
if ("file".equalsIgnoreCase(url.getProtocol())) {
// Compatibility notes:
//
// Code changed from
// String path = url.getFile().replace('/', File.separatorChar);
// return new FileInputStream(path);
//
// The original implementation would search for "/tmp/a%20b"
// when url is "file:///tmp/a%20b". This is incorrect. The
// current codes fix this bug and searches for "/tmp/a b".
// For compatibility reasons, when the file "/tmp/a b" does
// not exist, the file named "/tmp/a%20b" will be tried.
//
// This also means that if both file exists, the behavior of
// this method is changed, and the current codes choose the
// correct one.
try {
File path = new File(url.toURI());
return new FileInputStream(path);
} catch (IOException ioe) {
throw ioe;
} catch (Exception ex) {
throw new IOException(ex.getMessage(), ex);
return url.openStream();
} catch (Exception e) {
String file = url.getPath();
if (url.getHost().length() > 0) { // For Windows UNC
file = "//" + url.getHost() + file;
}
if (debugConfig != null) {
debugConfig.println("cannot read " + url +
", try " + file);
}
return new FileInputStream(file);
}
} else {
return url.openStream();

View File

@ -0,0 +1,51 @@
/*
* Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*/
package com.sun.tracing;
/**
* The {@code Probe} interface represents a tracepoint.
*
* A {@code Probe} instance is obtained by calling the
* {@code Provider.getProbe()} method of a provider instance created by
* {@code ProviderFactory.createProvider()}. A {@code Probe} can be used to
* trigger a probe manually (provided the correct arguments are passed to
* it), or to check a probe to see if anything is currently tracing it.
* <p>
* A tracing check can be used to avoid lengthy work that might be
* needed to set up the probe's arguments. However, checking
* whether the probe is enabled generally takes the same amount of time
* as actually triggering the probe. So, you should only check a probe's status
* without triggering it if setting up the arguments is very expensive.
* <p>
* Users do not need to implement this interface: instances are
* created automatically by the system when a {@code Provider)} instance is
* created.
* <p>
* @since 1.7
*/
public interface Probe {
/**
* Checks whether there is an active trace of this probe.
*
* @return true if an active trace is detected.
*/
boolean isEnabled();
/**
* Determines whether a tracepoint is enabled.
*
* Typically, users do not need to use this method. It is called
* automatically when a Provider's instance method is called. Calls to
* this method expect the arguments to match the declared parameters for
* the method associated with the probe.
*
* @param args the parameters to pass to the method.
* @throws IllegalArgumentException if the provided parameters do not
* match the method declaration for this probe.
*/
void trigger(Object ... args);
}

View File

@ -0,0 +1,28 @@
/*
* Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*/
package com.sun.tracing;
import java.lang.annotation.Target;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.ElementType;
/**
* An annotation used to override the name of a probe.
* <p>
* This annotation can be added to a method in a user-defined {@code Provider}
* interface, to set the name that will be used for the generated probe
* associated with that method. Without this annotation, the name will be the
* name of the method.
* <p>
* @since 1.7
*/
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
public @interface ProbeName {
String value();
}

View File

@ -0,0 +1,56 @@
/*
* Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*/
package com.sun.tracing;
/**
* {@code Provider} is a superinterface for user-defined tracing providers.
* <p>
* To define tracepoints, users must extend this interface
* and then use a {@code ProviderFactory} to create an instance of the
* newly-defined interface. Each method in the defined interface represents a
* tracepoint (or probe), which can be triggered by calling the associated
* method on the returned instance.
* <p>
* This interface also contains a {@code getProbe()} method, which can be
* used to get direct handles to the {@code Probe} objects themselves.
* {@code Probe} objects can be triggered manually, or they can be queried to
* check their state.
* <p>
* When an application has finished triggering probes, it should call
* {@code dispose()} to free up any system resources associated with the
* Provider.
* <p>
* All methods declared in a subclass of this interface should have a
* {@code void} return type. Methods can have parameters, and when called the
* values of the arguments will be passed to the tracing implementation.
* If any methods do not have a {@code void} return type, an
* {@code java.lang.IllegalArgumentException} will be thrown when the
* provider is registered.
* @since 1.7
*/
public interface Provider {
/**
* Retrieves a reference to a Probe object, which is used to check status
* or to trigger the probe manually.
*
* If the provided method parameter is not a method of the provider
* interface, or if the provider interface has been disposed, then
* this returns null
*
* @param method a method declared in the provider.
* @return the specified probe represented by that method, or null.
*/
Probe getProbe(java.lang.reflect.Method method);
/**
* Disposes system resources associated with this provider.
*
* After calling this method, triggering the probes will have no effect.
* Additional calls to this method after the first call are ignored.
*/
void dispose();
}

View File

@ -0,0 +1,110 @@
package com.sun.tracing;
import java.util.HashSet;
import java.io.PrintStream;
import java.lang.reflect.Field;
import java.util.logging.Logger;
import sun.tracing.NullProviderFactory;
import sun.tracing.PrintStreamProviderFactory;
import sun.tracing.MultiplexProviderFactory;
import sun.tracing.dtrace.DTraceProviderFactory;
/**
* {@code ProviderFactory} is a factory class used to create instances of
* providers.
*
* To enable tracing in an application, this class must be used to create
* instances of the provider interfaces defined by users.
* The system-defined factory is obtained by using the
* {@code getDefaultFactory()} static method. The resulting instance can be
* used to create any number of providers.
*
* @since 1.7
*/
public abstract class ProviderFactory {
protected ProviderFactory() {}
/**
* Creates an implementation of a Provider interface.
*
* @param cls the provider interface to be defined.
* @return an implementation of {@code cls}, whose methods, when called,
* will trigger tracepoints in the application.
* @throws NullPointerException if cls is null
* @throws IllegalArgumentException if the class definition contains
* non-void methods
*/
public abstract <T extends Provider> T createProvider(Class<T> cls);
/**
* Returns an implementation of a {@code ProviderFactory} which
* creates instances of Providers.
*
* The created Provider instances will be linked to all appropriate
* and enabled system-defined tracing mechanisms in the JDK.
*
* @return a {@code ProviderFactory} that is used to create Providers.
*/
public static ProviderFactory getDefaultFactory() {
HashSet<ProviderFactory> factories = new HashSet<ProviderFactory>();
// Try to instantiate a DTraceProviderFactory
String prop = null;
try { prop = System.getProperty("com.sun.tracing.dtrace"); }
catch (java.security.AccessControlException e) {
Logger.getAnonymousLogger().fine(
"Cannot access property com.sun.tracing.dtrace");
}
if ( (prop == null || !prop.equals("disable")) &&
DTraceProviderFactory.isSupported() ) {
factories.add(new DTraceProviderFactory());
}
// Try to instantiate an output stream factory
try { prop = System.getProperty("sun.tracing.stream"); }
catch (java.security.AccessControlException e) {
Logger.getAnonymousLogger().fine(
"Cannot access property sun.tracing.stream");
}
if (prop != null) {
for (String spec : prop.split(",")) {
PrintStream ps = getPrintStreamFromSpec(spec);
if (ps != null) {
factories.add(new PrintStreamProviderFactory(ps));
}
}
}
// See how many factories we instantiated, and return an appropriate
// factory that encapsulates that.
if (factories.size() == 0) {
return new NullProviderFactory();
} else if (factories.size() == 1) {
return factories.toArray(new ProviderFactory[1])[0];
} else {
return new MultiplexProviderFactory(factories);
}
}
private static PrintStream getPrintStreamFromSpec(String spec) {
try {
// spec is in the form of <class>.<field>, where <class> is
// a fully specified class name, and <field> is a static member
// in that class. The <field> must be a 'PrintStream' or subtype
// in order to be used.
int fieldpos = spec.lastIndexOf('.');
Class<?> cls = Class.forName(spec.substring(0, fieldpos));
Field f = cls.getField(spec.substring(fieldpos + 1));
Class<?> fieldType = f.getType();
return (PrintStream)f.get(null);
} catch (Exception e) {
Logger.getAnonymousLogger().warning(
"Could not parse sun.tracing.stream property: " + e);
}
return null;
}
}

View File

@ -0,0 +1,28 @@
/*
* Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*/
package com.sun.tracing;
import java.lang.annotation.Target;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.ElementType;
/**
* An annotation used to specify the name of a provider.
* <p>
* This annotation can be added to a user-defined {@code Provider}
* interface, to set the name that will be used
* for the provider in the generated probes. Without this annotation,
* the simple class name of the provider interface is used.
* <p>
* @since 1.7
*/
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE)
public @interface ProviderName {
String value();
}

View File

@ -0,0 +1,33 @@
/*
* Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*/
package com.sun.tracing.dtrace;
import java.lang.annotation.Target;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.ElementType;
/**
* This annotation describes the interface attributes of the probe arguments in
* a single provider.
*
* This annotation can be added to a user-defined {@code Provider} specification
* interface to set the stability attributes of the probe arguments, for
* all the probes specified in that provider.
* <p>
* If this annotation is not present, the interface attributes for the
* arguments are Private/Private/Unknown.
* <p>
* @see <a href="http://docs.sun.com/app/docs/doc/817-6223/6mlkidlnp?a=view">Solaris Dynamic Tracing Guide, Chapter 39: Stability</a>
* @since 1.7
*/
@Retention(RetentionPolicy.RUNTIME)
@Target({ ElementType.TYPE })
public @interface ArgsAttributes {
Attributes value();
}

View File

@ -0,0 +1,46 @@
/*
* Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*/
package com.sun.tracing.dtrace;
import java.lang.annotation.Target;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.ElementType;
/**
* This annotation describes the interface's field attributes
* for the probes in a provider.
*
* This annotation provides the contents of field-specific annotations
* that specify the stability attributes and dependency class of a
* particular field, for the probes in a provider.
* <p>
* The default interface attributes for unspecified fields is
* Private/Private/Unknown.
* <p>
* @see <a href="http://docs.sun.com/app/docs/doc/817-6223/6mlkidlnp?a=view">Solaris Dynamic Tracing Guide, Chapter 39: Stability</a>
* @since 1.7
*/
@Retention(RetentionPolicy.RUNTIME)
@Target({})
public @interface Attributes {
/**
* The stability level of the name.
*/
StabilityLevel name() default StabilityLevel.PRIVATE;
/**
* The stability level of the data.
*/
StabilityLevel data() default StabilityLevel.PRIVATE;
/**
* The interface attribute's dependency class.
*/
DependencyClass dependency() default DependencyClass.UNKNOWN;
}

View File

@ -0,0 +1,57 @@
/*
* Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*/
package com.sun.tracing.dtrace;
/**
* Enumeration for the DTrace dependency classes.
*
* @see <a href="http://docs.sun.com/app/docs/doc/817-6223/6mlkidlnp?a=view">Solaris Dynamic Tracing Guide for details, Chapter 39: Stability</a>
* @since 1.7
*/
public enum DependencyClass {
/**
* The interface has an unknown set of architectural dependencies.
*/
UNKNOWN (0),
/**
* The interface is specific to the CPU model of the current system.
*/
CPU (1),
/**
* The interface is specific to the hardware platform of the current
* system.
*/
PLATFORM (2),
/**
* The interface is specific to the hardware platform group of the
* current system.
*/
GROUP (3),
/**
* The interface is specific to the instruction set architecture (ISA)
* supported by the microprocessors on this system.
*/
ISA (4),
/**
* The interface is common to all Solaris systems regardless of the
* underlying hardware.
*/
COMMON (5);
public String toDisplayString() {
return toString().substring(0,1) +
toString().substring(1).toLowerCase();
}
public int getEncoding() { return encoding; }
private int encoding;
private DependencyClass(int encoding) {
this.encoding = encoding;
}
}

View File

@ -0,0 +1,31 @@
/*
* Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*/
package com.sun.tracing.dtrace;
import java.lang.annotation.Target;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.ElementType;
/**
* This annotation describes the interface attributes of the
* {@code function} field for a single provider.
*
* This annotation can be added to a user-defined {@code Provider} specification
* interface to set the stability attributes of the {@code function} field for
* all probes specified in that provider.
* <p>
* If this annotation is not present, the interface attributes for the
* {@code function} field are Private/Private/Unknown.
* <p>
* @see <a href="http://docs.sun.com/app/docs/doc/817-6223/6mlkidlnp?a=view">Solaris Dynamic Tracing Guide, Chapter 39: Stability</a>
* @since 1.7
*/
@Retention(RetentionPolicy.RUNTIME)
@Target({ ElementType.TYPE })
public @interface FunctionAttributes {
Attributes value();
}

View File

@ -0,0 +1,27 @@
/*
* Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*/
package com.sun.tracing.dtrace;
import java.lang.annotation.Target;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.ElementType;
/**
* An annotation used to specify the {@code function} field for a DTrace probe.
*
* This annotation can be added to a method in a user-defined Provider
* specification interface to set the {@code function} field that is used
* for the generated DTrace probe associated with that method.
* <p>
* @since 1.7
*/
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
public @interface FunctionName {
String value();
}

View File

@ -0,0 +1,31 @@
/*
* Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*/
package com.sun.tracing.dtrace;
import java.lang.annotation.Target;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.ElementType;
/**
* This annotation is used to describe the interface attributes of the
* {@code module} field for a single provider.
*
* This annotation can be added to a user-defined Provider specification
* interface to set the stability attributes of the {@code module} field for
* all probes specified in that provider.
* <p>
* If this annotation is not present, the interface attributes for the
* {@code module} field is Private/Private/Unknown.
* <p>
* @see <a href="http://docs.sun.com/app/docs/doc/817-6223/6mlkidlnp?a=view">Solaris Dynamic Tracing Guide, Chapter 39: Stability</a>
* @since 1.7
*/
@Retention(RetentionPolicy.RUNTIME)
@Target({ ElementType.TYPE })
public @interface ModuleAttributes {
Attributes value();
}

View File

@ -0,0 +1,27 @@
/*
* Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*/
package com.sun.tracing.dtrace;
import java.lang.annotation.Target;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.ElementType;
/**
* An annotation used to specify the {@code module} field for a DTrace probe.
*
* This annotation can be added to a method in a user-defined Provider
* specification interface to set the {@code module} field that will be used
* for the generated DTrace probe associated with that method.
* <p>
* @since 1.7
*/
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE)
public @interface ModuleName {
String value();
}

View File

@ -0,0 +1,31 @@
/*
* Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*/
package com.sun.tracing.dtrace;
import java.lang.annotation.Target;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.ElementType;
/**
* This annotation describes the interface attributes of the
* {@code name} field for a single provider.
*
* This annotation can be added to a user-defined Provider specification
* interface to set the stability attributes of the {@code name} field for
* all probes specified in that provider.
* <p>
* If this annotation is not present, the interface attributes for the
* {@code name} field will be Private/Private/Unknown.
* <p>
* @see <a href="http://docs.sun.com/app/docs/doc/817-6223/6mlkidlnp?a=view">Solaris Dynamic Tracing Guide, Chapter 39: Stability</a>
* @since 1.7
*/
@Retention(RetentionPolicy.RUNTIME)
@Target({ ElementType.TYPE })
public @interface NameAttributes {
Attributes value();
}

View File

@ -0,0 +1,31 @@
/*
* Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*/
package com.sun.tracing.dtrace;
import java.lang.annotation.Target;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.ElementType;
/**
* This annotation is used to describe the interface attributes of the
* {@code provider} field for a single provider.
*
* This annotation can be added to a user-defined Provider specification
* interface to set the stability attributes of the {@code provider} field for
* all probes specified in that provider.
* <p>
* If this annotation is not present, the interface attributes for the
* {@code provider} field will be Private/Private/Unknown.
* <p>
* @see <a href="http://docs.sun.com/app/docs/doc/817-6223/6mlkidlnp?a=view">Solaris Dynamic Tracing Guide, Chapter 39: Stability</a>
* @since 1.7
*/
@Retention(RetentionPolicy.RUNTIME)
@Target({ ElementType.TYPE })
public @interface ProviderAttributes {
Attributes value();
}

View File

@ -0,0 +1,68 @@
/*
* Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*/
package com.sun.tracing.dtrace;
/**
* Enumeration for the DTrace stability levels.
*
* @see <a href="http://docs.sun.com/app/docs/doc/817-6223/6mlkidlnp?a=view">Solaris Dynamic Tracing Guide, Chapter 39: Stability</a>
* @since 1.7
*/
public enum StabilityLevel {
/**
* The interface is private to DTrace and represents an implementation
* detail of DTrace.
*/
INTERNAL (0),
/**
* The interface is private to Sun for use by other Sun products. It is
* not yet publicly documented for use by customers and ISVs.
*/
PRIVATE (1),
/**
* The interface is supported in the current release but is scheduled
* to be removed, most likely in a future minor release.
*/
OBSOLETE (2),
/**
* The interface is controlled by an entity other than Sun.
*/
EXTERNAL (3),
/**
* The interface gives developers early access to new or
* rapidly changing technology or to an implementation artifact that is
* essential for observing or debugging system behavior. A more
* stable solution is anticipated in the future.
*/
UNSTABLE (4),
/**
* The interface might eventually become Standard or Stable but is
* still in transition.
*/
EVOLVING (5),
/**
* The interface is a mature interface under Sun's control.
*/
STABLE (6),
/**
* The interface complies with an industry standard.
*/
STANDARD (7);
String toDisplayString() {
return toString().substring(0,1) +
toString().substring(1).toLowerCase();
}
public int getEncoding() { return encoding; }
private int encoding;
private StabilityLevel(int encoding) {
this.encoding = encoding;
}
}

View File

@ -0,0 +1,62 @@
/*
* Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*/
/**
* This package contains annotations and enumerations that are used to
* add DTrace-specific information to a tracing provider.
* <p>
* The DTrace-specific annotations modify the attributes of a DTrace provider
* implementation when it is used by the tracing subsystem. The annotations are
* added to a {@code com.sun.tracing} provider specification to control
* specific attributes of the provider as it relates to DTrace.
* <p>
* Any other tracing subsystems supported by the system will ignore these
* annotations.
* <p>
* DTrace probes have additional fields and stability attributes that are
* not accounted for in the generic tracing package. If unspecified, the
* default values are used for the stability and dependency attributes of
* probes, as well as for the module and field names of the generated probes.
* The values can be specified by adding the appropriate annotations to the
* provider specification.
* <p>
* The {@code FunctionName} annotation is used to annotate the tracepoint
* methods defined in the provider specification. The value of this annotation
* is used as the {@code function} field in the generated DTrace probes. It
* is typically set to the name of the enclosing function where the
* tracepoint is triggered.
* <p>
* The {@code ModuleName} annotation is used to annotate the provider
* specification itself and applies to all the probes in the provider. It
* sets the value of the {@code module} field in the generated DTrace probes.
* <p>
* The remaining annotations, are also applied to the provider itself, and
* are used to set the stability and dependency attributes of all probes in
* that provider. Each probe field and the probe arguments can be
* independently assigned interface attributes to control the stability
* ratings of the probes.
* <p>
* Here is an example of how to declare a provider, specifying additional DTrace
* data:
<PRE>
&#064;ProviderName("my_app_provider")
&#064;ModuleName("app.jar")
&#064;ProviderAttributes(&#064;Attributes={
name=StabilityLevel.STABLE,data=StabilityLevel.STABLE,
dependency=DependencyClass.COMMON})
&#064;ProbeAttributes(&#064;Attributes={
name=StabilityLevel.STABLE,data=StabilityLevel.STABLE,
dependency=DependencyClass.COMMON})
&#064;ModuleAttributes(&#064;Attributes={name=StabilityLevel.UNSTABLE})
public class MyProvider {
&#064;FunctionName("main") void startProbe();
}
</PRE>
* <p>
* @see <a href="http://docs.sun.com/app/docs/doc/817-6223/6mlkidlms?a=view">Solaris Dynamic Tracing Guide, Chapter 34: Statically Defined Tracing for User Applications</a>
* @see <a href="http://docs.sun.com/app/docs/doc/817-6223/6mlkidlnp?a=view">Solaris Dynamic Tracing Guide, Chapter 39: Stability</a>
*/
package com.sun.tracing.dtrace;

View File

@ -0,0 +1,163 @@
/*
* Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*/
/**
* This package provides a mechanism for defining and
* inserting tracepoints into Java-technology based applications, which
* can then be monitored by the tracing tools available on the system.
* <p>
* To add tracepoints to a program, you must first decide where to place the
* tracepoints, what the logical names are for these points, what information
* will be available to the tracing mechanisms at each point, and decide upon
* any logical grouping.
* <p>
* You add instrumentation to a program in three steps:
* <ul>
* <li>First, declare tracepoints by creating interfaces to define
* them, and include these interfaces in the program definition.
* The declared interfaces are standard Java technology-based
* interfaces and are compiled with the program.</li>
* <li>Second, add code in the application to create an instance of the
* interface at some point during the initialization of the application,
* using a factory class provided by the system. The reference to the
* instance can be stored as a global static, or passed as context to all
* the places where it is needed.</li>
* <li>Finally, add the actual tracepoints to the desired locations in the
* application by inserting a call to one of the methods defined in the
* interface, via the factory-created reference.</li>
* </ul>
* <p>
* The method calls representing the tracepoints have no logical
* impact on the program. The side effect of the call is that any
* activated tracing mechanisms will be notified that the tracepoint has
* been hit, and will take whatever actions are appropriate (for example,
* logging the tracepoint, or triggering a DTrace probe, etc.). In most
* cases, the impact on performance of adding tracepoints to the application
* will be minimal.
* <p>
* Each logical grouping of tracepoints should be defined in a common
* interface, called a <i>provider</i>. An application can have one or many
* providers. Each provider is independent and can be created whenever
* it is appropriate for that provider, for example, when a subsytem is
* initialized. Providers should be disposed of when they are no longer
* needed, to free up any associated system resources. Each tracepoint
* in a provider is represented by a method in that interface. These methods
* are referred to as <i>probes</i>. The method signature determines the probe
* parameters. A call to the method with the specified parameters triggers
* the probe and makes its parameter values visible to any associated tracing
* mechanism.
* <p>
* User-defined interfaces which represent providers must extend the
* {@code Provider} interface. To activate the system-defined
* tracing mechanisms, you must obtain an instance of the
* {@code ProviderFactory} class, and pass the class of the provider to
* the {@code createProvider()} method. The returned instance is then used to
* trigger the probes later in the application.
* <p>
* In addition to triggering the probes, the provider instance can be used
* to obtain direct references to the {@code Probe} objects, which can be used
* directly for triggering, or can be queried to determine whether the probe is
* currently being traced. The {@code Provider} interface also defines a
* {@code Provider.dispose()} method which is used to free up any resources
* that might be associated with that provider.
* <p>
* When a probe is triggered, any activated tracing system will be given
* the provider name, the probe name, and the values of the probe arguments.
* The tracing system is free to consume this data is whatever way is
* appropriate.
* By default, the provider name is the same as the class name of the interface
* that defines the provider. Similarly, the probe name is
* the name of the method that defines the probe. These default values
* can be over-ridden by annotations. The provider definition can be
* annotated with the {@code @ProviderName} annotation, whose value will
* indicate the provider name that the tracing system will use. Similarly,
* the {@code @ProbeName} annotation annotates a declared method and
* indicates the probe name that should be used in the place of the
* method name. These annotations can be used to define providers and
* probes with the same name, in cases where the semantics of the Java language
* may prevent this.
* <p>
* Here is a very small and simple usage example:
* <p>
*
<PRE>
import com.sun.tracing.Provider;
import com.sun.tracing.ProviderFactory;
interface MyProvider extends Provider {
void startProbe();
void finishProbe(int value);
}
public class MyApplication {
public static void main(String argv[]) {
ProviderFactory factory = ProviderFactory.getDefaultFactory();
MyProvider trace = factory.createProvider(MyProvider.class);
trace.startProbe();
int result = foo();
trace.finishProbe(result);
trace.dispose();
}
}
</PRE>
* <p>
* The Java Development Kit (JDK) currently only includes one system-defined
* tracing framework: DTrace. DTrace is enabled automatically whenever an
* application is run on a system and a JDK release that supports it. When
* DTrace is enabled, probes are made available for listing and matching by
* DTrace scripts as soon as the provider is created. At the tracepoint, an
* associated DTrace script is informed of the creation of the provider, and
* it takes whatever action it is designed to take. Tracepoints in the
* program have the following DTrace probe names:<br>
* {@code <provider><pid>:<module>:<function>:<probe>}
* Where:
* <ul>
* <li>{@code <provider>} the provider name as specified by the application</li>
* <li>{@code <pid>} the operating system process ID</li>
* <li>{@code <module>} undefined, unless specified by the application</li>
* <li>{@code <function>} undefined, unless specified by the application</li>
* <li>{@code <probe>} the probe name as specified by the application</li>
* </ul>
* <p>
* The {@code com.sun.tracing.dtrace} package contains additional
* annotations that can be used to control the names used for the
* <code>module</code> and <code>function</code> fields, as well as annotations
* that can be added to the provider to control probe stability and dependency
* attributes.
* <p>
* Integer, float and string probe parameters are made available to DTrace
* using
* the built-in argument variables, {@code arg0 ... arg_n}. Integer-types
* are passed by value (boxed values are unboxed), floating-point types are
* passed as encoded integer
* arguments, and {@code java.lang.String} objects are converted
* to UTF8 strings, so they can be read into the DTrace script using the
* {@code copyinstr()} intrinsic. Non-string and non-boxed primitive
* reference arguments are only
* placeholders and have no value.
* <p>
* Using the example above, with a theoretical process ID of 123, these are
* the probes that can be traced from DTrace:
<PRE>
MyProvider123:::startProbe
MyProvider123:::finishProbe
</PRE>
* When {@code finishProbe} executes, {@code arg0} will contain the
* value of {@code result}.
* <p>
* The DTrace tracing mechanism is enabled for all providers, apart from in the
* following circumstances:
* <ul>
* <li>DTrace is not supported on the underlying system.</li>
* <li>The property {@code com.sun.tracing.dtrace} is set to "disable".</li>
* <li>The RuntimePermission {@code com.sun.tracing.dtrace.createProvider}
* is denied to the process.</li>
* </ul>
* <p>
*/
package com.sun.tracing;

View File

@ -35,7 +35,7 @@ package java.lang.management;
* that can be obtained by calling
* the {@link ManagementFactory#getClassLoadingMXBean} method or
* from the {@link ManagementFactory#getPlatformMBeanServer
* platform <tt>MBeanServer</tt>} method.
* platform <tt>MBeanServer</tt>}.
*
* <p>The <tt>ObjectName</tt> for uniquely identifying the MXBean for
* the class loading system within an <tt>MBeanServer</tt> is:
@ -44,6 +44,10 @@ package java.lang.management;
* <tt>java.lang:type=ClassLoading</tt>}
* </blockquote>
*
* It can be obtained by calling the
* {@link PlatformManagedObject#getObjectName} method.
*
* @see ManagementFactory#getPlatformMXBeans(Class)
* @see <a href="../../../javax/management/package-summary.html">
* JMX Specification.</a>
* @see <a href="package-summary.html#examples">
@ -52,7 +56,7 @@ package java.lang.management;
* @author Mandy Chung
* @since 1.5
*/
public interface ClassLoadingMXBean {
public interface ClassLoadingMXBean extends PlatformManagedObject {
/**
* Returns the total number of classes that have been loaded since

View File

@ -44,6 +44,10 @@ package java.lang.management;
* <tt>java.lang:type=Compilation</tt>}
* </blockquote>
*
* It can be obtained by calling the
* {@link PlatformManagedObject#getObjectName} method.
*
* @see ManagementFactory#getPlatformMXBeans(Class)
* @see <a href="../../../javax/management/package-summary.html">
* JMX Specification.</a>
* @see <a href="package-summary.html#examples">
@ -52,7 +56,7 @@ package java.lang.management;
* @author Mandy Chung
* @since 1.5
*/
public interface CompilationMXBean {
public interface CompilationMXBean extends PlatformManagedObject {
/**
* Returns the name of the Just-in-time (JIT) compiler.
*

View File

@ -48,9 +48,13 @@ package java.lang.management;
* <tt>java.lang:type=GarbageCollector</tt>}<tt>,name=</tt><i>collector's name</i>
* </blockquote>
*
* It can be obtained by calling the
* {@link PlatformManagedObject#getObjectName} method.
*
* A platform usually includes additional platform-dependent information
* specific to a garbage collection algorithm for monitoring.
*
* @see ManagementFactory#getPlatformMXBeans(Class)
* @see MemoryMXBean
*
* @see <a href="../../../javax/management/package-summary.html">

View File

@ -24,17 +24,31 @@
*/
package java.lang.management;
import javax.management.DynamicMBean;
import javax.management.MBeanServer;
import javax.management.MBeanServerConnection;
import javax.management.MBeanServerFactory;
import javax.management.MBeanServerPermission;
import javax.management.NotificationEmitter;
import javax.management.ObjectInstance;
import javax.management.ObjectName;
import javax.management.InstanceAlreadyExistsException;
import javax.management.InstanceNotFoundException;
import javax.management.MalformedObjectNameException;
import javax.management.MBeanRegistrationException;
import javax.management.NotCompliantMBeanException;
import javax.management.StandardEmitterMBean;
import javax.management.StandardMBean;
import java.util.Collections;
import java.util.ArrayList;
import java.util.List;
import java.security.AccessController;
import java.security.Permission;
import java.security.PrivilegedAction;
import java.security.PrivilegedActionException;
import java.security.PrivilegedExceptionAction;
import javax.management.JMX;
import sun.management.ManagementFactoryHelper;
/**
* The <tt>ManagementFactory</tt> class is a factory class for getting
@ -49,13 +63,16 @@ import javax.management.JMX;
* <ul>
* <li><i>Direct access to an MXBean interface</i>
* <ol type="a">
* <li>Get the MXBean instance through the static factory method
* <li>Get the MXBean instance through the static factory method,
* or the {@link #getPlatformMXBeans(Class)} method
* and access the MXBean locally of the running
* virtual machine.
* </li>
* <li>Construct an MXBean proxy instance that forwards the
* method calls to a given {@link MBeanServer MBeanServer} by calling
* {@link #newPlatformMXBeanProxy newPlatfromMXBeanProxy}.
* the {@link #newPlatformMXBeanProxy newPlatformMXBeanProxy} method
* or the {@link #getPlatformMXBeans(MBeanServerConnection, Class)}
* method.
* A proxy is typically constructed to remotely access
* an MXBean of another running virtual machine.
* </li>
@ -83,6 +100,10 @@ import javax.management.JMX;
* a set of basic data types described below.
* See <a href="../../../javax/management/MXBean.html#MXBean-spec">
* the specification of MXBeans</a> for details.
* All platform MXBean interfaces extend {@link PlatformManagedObject}s
* and new methods may be added in these interfaces
* in future Java SE releases.
* <p>
* A JMX management application and the platform <tt>MBeanServer</tt>
* can interoperate without requiring classes for MXBean specific
* data types.
@ -191,7 +212,10 @@ import javax.management.JMX;
* <h4><a name="MXBeanNames">MXBean Names</a></h4>
* Each platform MXBean for a Java virtual machine has a unique
* {@link javax.management.ObjectName ObjectName} for
* registration in the platform <tt>MBeanServer</tt>.
* registration in the platform <tt>MBeanServer</tt> that can
* be obtained by calling the {@link PlatformManagedObject#getObjectName}
* method.
*
* A Java virtual machine has a single instance of the following management
* interfaces:
*
@ -275,7 +299,7 @@ import javax.management.JMX;
* </blockquote>
*
* @see <a href="../../../javax/management/package-summary.html">
* JMX Specification.</a>
* JMX Specification</a>
* @see <a href="package-summary.html#examples">
* Ways to Access Management Metrics</a>
* @see java.util.logging.LoggingMXBean
@ -368,7 +392,7 @@ public class ManagementFactory {
* the Java virtual machine.
*/
public static ClassLoadingMXBean getClassLoadingMXBean() {
return sun.management.ManagementFactory.getClassLoadingMXBean();
return ManagementFactoryHelper.getClassLoadingMXBean();
}
/**
@ -378,7 +402,7 @@ public class ManagementFactory {
* @return a {@link MemoryMXBean} object for the Java virtual machine.
*/
public static MemoryMXBean getMemoryMXBean() {
return sun.management.ManagementFactory.getMemoryMXBean();
return ManagementFactoryHelper.getMemoryMXBean();
}
/**
@ -388,7 +412,7 @@ public class ManagementFactory {
* @return a {@link ThreadMXBean} object for the Java virtual machine.
*/
public static ThreadMXBean getThreadMXBean() {
return sun.management.ManagementFactory.getThreadMXBean();
return ManagementFactoryHelper.getThreadMXBean();
}
/**
@ -399,7 +423,7 @@ public class ManagementFactory {
*/
public static RuntimeMXBean getRuntimeMXBean() {
return sun.management.ManagementFactory.getRuntimeMXBean();
return ManagementFactoryHelper.getRuntimeMXBean();
}
/**
@ -412,7 +436,7 @@ public class ManagementFactory {
* no compilation system.
*/
public static CompilationMXBean getCompilationMXBean() {
return sun.management.ManagementFactory.getCompilationMXBean();
return ManagementFactoryHelper.getCompilationMXBean();
}
/**
@ -423,7 +447,7 @@ public class ManagementFactory {
* the Java virtual machine.
*/
public static OperatingSystemMXBean getOperatingSystemMXBean() {
return sun.management.ManagementFactory.getOperatingSystemMXBean();
return ManagementFactoryHelper.getOperatingSystemMXBean();
}
/**
@ -436,7 +460,7 @@ public class ManagementFactory {
*
*/
public static List<MemoryPoolMXBean> getMemoryPoolMXBeans() {
return sun.management.ManagementFactory.getMemoryPoolMXBeans();
return ManagementFactoryHelper.getMemoryPoolMXBeans();
}
/**
@ -449,7 +473,7 @@ public class ManagementFactory {
*
*/
public static List<MemoryManagerMXBean> getMemoryManagerMXBeans() {
return sun.management.ManagementFactory.getMemoryManagerMXBeans();
return ManagementFactoryHelper.getMemoryManagerMXBeans();
}
@ -465,7 +489,7 @@ public class ManagementFactory {
*
*/
public static List<GarbageCollectorMXBean> getGarbageCollectorMXBeans() {
return sun.management.ManagementFactory.getGarbageCollectorMXBeans();
return ManagementFactoryHelper.getGarbageCollectorMXBeans();
}
private static MBeanServer platformMBeanServer;
@ -518,8 +542,25 @@ public class ManagementFactory {
}
if (platformMBeanServer == null) {
platformMBeanServer =
sun.management.ManagementFactory.createPlatformMBeanServer();
platformMBeanServer = MBeanServerFactory.createMBeanServer();
for (PlatformComponent pc : PlatformComponent.values()) {
List<? extends PlatformManagedObject> list =
pc.getMXBeans(pc.getMXBeanInterface());
for (PlatformManagedObject o : list) {
// Each PlatformComponent represents one management
// interface. Some MXBean may extend another one.
// The MXBean instances for one platform component
// (returned by pc.getMXBeans()) might be also
// the MXBean instances for another platform component.
// e.g. com.sun.management.GarbageCollectorMXBean
//
// So need to check if an MXBean instance is registered
// before registering into the platform MBeanServer
if (!platformMBeanServer.isRegistered(o.getObjectName())) {
addMXBean(platformMBeanServer, o);
}
}
}
}
return platformMBeanServer;
}
@ -657,6 +698,136 @@ public class ManagementFactory {
}
}
/**
* Returns the list of platform MXBeans that implement
* the given {@code mxbeanInterface} in the running Java
* virtual machine.
* The returned list may contain zero, one, or more instances.
* The number of instances in the returned list is defined
* in the specification of the given management interface.
*
* @param mxbeanInterface a management interface for a platform
* MXBean
*
* @return the list of platform MXBeans that implements
* {@code mxbeanInterface}.
*
* @throws IllegalArgumentException if {@code mxbeanInterface}
* is not a management interface for the platform.
*
* @since 1.7
*/
public static <T extends PlatformManagedObject> List<T>
getPlatformMXBeans(Class<T> mxbeanInterface) {
String className = mxbeanInterface.getName();
for (PlatformComponent component: PlatformComponent.values()) {
// comparing the class name first instead of the Class instance
// to avoid causing unnecessary class loading of
// the other MXBean interfaces
if (className.equals(component.getMXBeanInterfaceName())) {
if (component.getMXBeanInterface() == mxbeanInterface) {
return component.getMXBeans(mxbeanInterface);
}
}
}
throw new IllegalArgumentException(mxbeanInterface.getName() +
" is not implemented by any of the platform MXBeans.");
}
/**
* Returns the list of the platform MXBean proxies for
* forwarding the method calls of the {@code mxbeanInterface}
* through the given {@code MBeanServerConnection}.
* The returned list may contain zero, one, or more instances.
* The number of instances in the returned list is defined
* in the specification of the given management interface.
*
* @param connection the {@code MBeanServerConnection} to forward to.
* @param mxbeanInterface a management interface for a platform
* MXBean
*
* @return the list of platform MXBean proxies for
* forwarding the method calls of the {@code mxbeanInterface}
* through the given {@code MBeanServerConnection}.
*
* @throws IllegalArgumentException if {@code mxbeanInterface}
* is not a management interface for the platform.
*
* @throws java.io.IOException if a communication problem
* occurred when accessing the {@code MBeanServerConnection}.
*
* @since 1.7
*/
public static <T extends PlatformManagedObject>
List<T> getPlatformMXBeans(MBeanServerConnection connection,
Class<T> mxbeanInterface)
throws java.io.IOException
{
String className = mxbeanInterface.getName();
for (PlatformComponent component: PlatformComponent.values()) {
// comparing the class name first instead of the Class instance
// to avoid causing unnecessary class loading of
// the other MXBean interfaces
if (className.equals(component.getMXBeanInterfaceName())) {
if (component.getMXBeanInterface() == mxbeanInterface) {
return component.getMXBeans(connection,
mxbeanInterface);
}
}
}
throw new IllegalArgumentException(mxbeanInterface.getName() +
" is not implemented by any of the platform MXBeans.");
}
/**
* Returns a list of {@code Class} objects, subinterface of
* {@link PlatformManagedObject}, representing
* all management interfaces for
* monitoring and managing the Java platform.
*
* @return a list of {@code Class} objects, subinterface of
* {@link PlatformManagedObject} representing
* the management interfaces for
* monitoring and managing the Java platform.
*
* @since 1.7
*/
public static List<Class<? extends PlatformManagedObject>> getAllPlatformMXBeanInterfaces() {
List<Class<? extends PlatformManagedObject>> result =
new ArrayList<Class<? extends PlatformManagedObject>>();
for (PlatformComponent component: PlatformComponent.values()) {
result.add(component.getMXBeanInterface());
}
return result;
}
private static final String NOTIF_EMITTER =
"javax.management.NotificationEmitter";
/**
* Registers an MXBean.
*/
private static void addMXBean(final MBeanServer mbs, final PlatformManagedObject pmo) {
// Make DynamicMBean out of MXBean by wrapping it with a StandardMBean
final DynamicMBean dmbean;
if (pmo instanceof NotificationEmitter) {
dmbean = new StandardEmitterMBean(pmo, null, true, (NotificationEmitter) pmo);
} else {
dmbean = new StandardMBean(pmo, null, true);
}
try {
AccessController.doPrivileged(new PrivilegedExceptionAction<Void>() {
public Void run() throws InstanceAlreadyExistsException,
MBeanRegistrationException,
NotCompliantMBeanException {
mbs.registerMBean(dmbean, pmo.getObjectName());
return null;
}
});
} catch (PrivilegedActionException e) {
throw new RuntimeException(e.getException());
}
}
}

View File

@ -46,6 +46,9 @@ import javax.management.openmbean.CompositeData;
* <tt>java.lang:type=Memory</tt>}
* </blockquote>
*
* It can be obtained by calling the
* {@link PlatformManagedObject#getObjectName} method.
*
* <h4> Memory </h4>
* The memory system of the Java virtual machine manages
* the following kinds of memory:
@ -190,6 +193,7 @@ import javax.management.openmbean.CompositeData;
* emitter.addNotificationListener(listener, null, null);
* </pre></blockquote>
*
* @see ManagementFactory#getPlatformMXBeans(Class)
* @see <a href="../../../javax/management/package-summary.html">
* JMX Specification.</a>
* @see <a href="package-summary.html#examples">
@ -198,7 +202,7 @@ import javax.management.openmbean.CompositeData;
* @author Mandy Chung
* @since 1.5
*/
public interface MemoryMXBean {
public interface MemoryMXBean extends PlatformManagedObject {
/**
* Returns the approximate number of objects for which
* finalization is pending.

View File

@ -45,6 +45,10 @@ package java.lang.management;
* <tt>java.lang:type=MemoryManager</tt>}<tt>,name=</tt><i>manager's name</i>
* </blockquote>
*
* It can be obtained by calling the
* {@link PlatformManagedObject#getObjectName} method.
*
* @see ManagementFactory#getPlatformMXBeans(Class)
* @see MemoryMXBean
*
* @see <a href="../../../javax/management/package-summary.html">
@ -55,7 +59,7 @@ package java.lang.management;
* @author Mandy Chung
* @since 1.5
*/
public interface MemoryManagerMXBean {
public interface MemoryManagerMXBean extends PlatformManagedObject {
/**
* Returns the name representing this memory manager.
*

View File

@ -46,6 +46,9 @@ package java.lang.management;
* <tt>java.lang:type=MemoryPool</tt>}<tt>,name=</tt><i>pool's name</i>
* </blockquote>
*
* It can be obtained by calling the
* {@link PlatformManagedObject#getObjectName} method.
*
* <h4>Memory Type</h4>
* <p>The Java virtual machine has a heap for object allocation and also
* maintains non-heap memory for the method area and the Java virtual
@ -349,6 +352,7 @@ package java.lang.management;
* described above for the <a href="#UsageThreshold">usage threshold</a>
* in a similar fashion.
*
* @see ManagementFactory#getPlatformMXBeans(Class)
* @see <a href="../../../javax/management/package-summary.html">
* JMX Specification.</a>
* @see <a href="package-summary.html#examples">
@ -357,7 +361,7 @@ package java.lang.management;
* @author Mandy Chung
* @since 1.5
*/
public interface MemoryPoolMXBean {
public interface MemoryPoolMXBean extends PlatformManagedObject {
/**
* Returns the name representing this memory pool.
*

View File

@ -44,10 +44,14 @@ package java.lang.management;
* <tt>java.lang:type=OperatingSystem</tt>}
* </blockquote>
*
* It can be obtained by calling the
* {@link PlatformManagedObject#getObjectName} method.
*
* <p> This interface defines several convenient methods for accessing
* system properties about the operating system on which the Java
* virtual machine is running.
*
* @see ManagementFactory#getPlatformMXBeans(Class)
* @see <a href="../../../javax/management/package-summary.html">
* JMX Specification.</a>
* @see <a href="package-summary.html#examples">
@ -56,7 +60,7 @@ package java.lang.management;
* @author Mandy Chung
* @since 1.5
*/
public interface OperatingSystemMXBean {
public interface OperatingSystemMXBean extends PlatformManagedObject {
/**
* Returns the operating system name.
* This method is equivalent to <tt>System.getProperty("os.name")</tt>.

View File

@ -0,0 +1,382 @@
/*
* Copyright 2008 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 java.lang.management;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.HashSet;
import java.util.Set;
import java.util.logging.LoggingMXBean;
import java.util.logging.LogManager;
import javax.management.MBeanServerConnection;
import javax.management.MalformedObjectNameException;
import javax.management.ObjectName;
import com.sun.management.HotSpotDiagnosticMXBean;
import com.sun.management.UnixOperatingSystemMXBean;
import sun.management.ManagementFactoryHelper;
/**
* This enum class defines the list of platform components
* that provides monitoring and management support.
* Each enum represents one MXBean interface. A MXBean
* instance could implement one or more MXBean interfaces.
*
* For example, com.sun.management.GarbageCollectorMXBean
* extends java.lang.management.GarbageCollectorMXBean
* and there is one set of garbage collection MXBean instances,
* each of which implements both c.s.m. and j.l.m. interfaces.
* There are two separate enums GARBAGE_COLLECTOR
* and SUN_GARBAGE_COLLECTOR so that ManagementFactory.getPlatformMXBeans(Class)
* will return the list of MXBeans of the specified type.
*
* To add a new MXBean interface for the Java platform,
* add a new enum constant and implement the MXBeanFetcher.
*/
enum PlatformComponent {
/**
* Class loading system of the Java virtual machine.
*/
CLASS_LOADING(
"java.lang.management.ClassLoadingMXBean",
"java.lang", "ClassLoading", defaultKeyProperties(),
new MXBeanFetcher<ClassLoadingMXBean>() {
public List<ClassLoadingMXBean> getMXBeans() {
return Collections.singletonList(ManagementFactoryHelper.getClassLoadingMXBean());
}
}),
/**
* Compilation system of the Java virtual machine.
*/
COMPILATION(
"java.lang.management.CompilationMXBean",
"java.lang", "Compilation", defaultKeyProperties(),
new MXBeanFetcher<CompilationMXBean>() {
public List<CompilationMXBean> getMXBeans() {
CompilationMXBean m = ManagementFactoryHelper.getCompilationMXBean();
if (m == null) {
return Collections.emptyList();
} else {
return Collections.singletonList(m);
}
}
}),
/**
* Memory system of the Java virtual machine.
*/
MEMORY(
"java.lang.management.MemoryMXBean",
"java.lang", "Memory", defaultKeyProperties(),
new MXBeanFetcher<MemoryMXBean>() {
public List<MemoryMXBean> getMXBeans() {
return Collections.singletonList(ManagementFactoryHelper.getMemoryMXBean());
}
}),
/**
* Garbage Collector in the Java virtual machine.
*/
GARBAGE_COLLECTOR(
"java.lang.management.GarbageCollectorMXBean",
"java.lang", "GarbageCollector", keyProperties("name"),
new MXBeanFetcher<GarbageCollectorMXBean>() {
public List<GarbageCollectorMXBean> getMXBeans() {
return ManagementFactoryHelper.
getGarbageCollectorMXBeans();
}
}),
/**
* Memory manager in the Java virtual machine.
*/
MEMORY_MANAGER(
"java.lang.management.MemoryManagerMXBean",
"java.lang", "MemoryManager", keyProperties("name"),
new MXBeanFetcher<MemoryManagerMXBean>() {
public List<MemoryManagerMXBean> getMXBeans() {
return ManagementFactoryHelper.getMemoryManagerMXBeans();
}
},
GARBAGE_COLLECTOR),
/**
* Memory pool in the Java virtual machine.
*/
MEMORY_POOL(
"java.lang.management.MemoryPoolMXBean",
"java.lang", "MemoryPool", keyProperties("name"),
new MXBeanFetcher<MemoryPoolMXBean>() {
public List<MemoryPoolMXBean> getMXBeans() {
return ManagementFactoryHelper.getMemoryPoolMXBeans();
}
}),
/**
* Operating system on which the Java virtual machine is running
*/
OPERATING_SYSTEM(
"java.lang.management.OperatingSystemMXBean",
"java.lang", "OperatingSystem", defaultKeyProperties(),
new MXBeanFetcher<OperatingSystemMXBean>() {
public List<OperatingSystemMXBean> getMXBeans() {
return Collections.singletonList(ManagementFactoryHelper.getOperatingSystemMXBean());
}
}),
/**
* Runtime system of the Java virtual machine.
*/
RUNTIME(
"java.lang.management.RuntimeMXBean",
"java.lang", "Runtime", defaultKeyProperties(),
new MXBeanFetcher<RuntimeMXBean>() {
public List<RuntimeMXBean> getMXBeans() {
return Collections.singletonList(ManagementFactoryHelper.getRuntimeMXBean());
}
}),
/**
* Threading system of the Java virtual machine.
*/
THREADING(
"java.lang.management.ThreadMXBean",
"java.lang", "Threading", defaultKeyProperties(),
new MXBeanFetcher<ThreadMXBean>() {
public List<ThreadMXBean> getMXBeans() {
return Collections.singletonList(ManagementFactoryHelper.getThreadMXBean());
}
}),
/**
* Logging facility.
*/
LOGGING(
"java.util.logging.LoggingMXBean",
"java.util.logging", "Logging", defaultKeyProperties(),
new MXBeanFetcher<LoggingMXBean>() {
public List<LoggingMXBean> getMXBeans() {
return Collections.singletonList(LogManager.getLoggingMXBean());
}
}),
// Sun Platform Extension
/**
* Sun extension garbage collector that performs collections in cycles.
*/
SUN_GARBAGE_COLLECTOR(
"com.sun.management.GarbageCollectorMXBean",
"java.lang", "GarbageCollector", keyProperties("name"),
new MXBeanFetcher<com.sun.management.GarbageCollectorMXBean>() {
public List<com.sun.management.GarbageCollectorMXBean> getMXBeans() {
return getGcMXBeanList(com.sun.management.GarbageCollectorMXBean.class);
}
}),
/**
* Sun extension operating system on which the Java virtual machine
* is running.
*/
SUN_OPERATING_SYSTEM(
"com.sun.management.OperatingSystemMXBean",
"java.lang", "OperatingSystem", defaultKeyProperties(),
new MXBeanFetcher<com.sun.management.OperatingSystemMXBean>() {
public List<com.sun.management.OperatingSystemMXBean> getMXBeans() {
return getOSMXBeanList(com.sun.management.OperatingSystemMXBean.class);
}
}),
/**
* Unix operating system.
*/
SUN_UNIX_OPERATING_SYSTEM(
"com.sun.management.UnixOperatingSystemMXBean",
"java.lang", "OperatingSystem", defaultKeyProperties(),
new MXBeanFetcher<UnixOperatingSystemMXBean>() {
public List<UnixOperatingSystemMXBean> getMXBeans() {
return getOSMXBeanList(com.sun.management.UnixOperatingSystemMXBean.class);
}
}),
/**
* Diagnostic support for the HotSpot Virtual Machine.
*/
HOTSPOT_DIAGNOSTIC(
"com.sun.management.HotSpotDiagnosticMXBean",
"com.sun.management", "HotSpotDiagnostic", defaultKeyProperties(),
new MXBeanFetcher<HotSpotDiagnosticMXBean>() {
public List<HotSpotDiagnosticMXBean> getMXBeans() {
return Collections.singletonList(ManagementFactoryHelper.getDiagnosticMXBean());
}
});
/**
* A task that returns the MXBeans for a component.
*/
interface MXBeanFetcher<T extends PlatformManagedObject> {
public List<T> getMXBeans();
}
/*
* Returns a list of the GC MXBeans of the given type.
*/
private static <T extends GarbageCollectorMXBean>
List<T> getGcMXBeanList(Class<T> gcMXBeanIntf) {
List<GarbageCollectorMXBean> list =
ManagementFactoryHelper.getGarbageCollectorMXBeans();
List<T> result = new ArrayList<T>(list.size());
for (GarbageCollectorMXBean m : list) {
if (gcMXBeanIntf.isInstance(m)) {
result.add(gcMXBeanIntf.cast(m));
}
}
return result;
}
/*
* Returns the OS mxbean instance of the given type.
*/
private static <T extends OperatingSystemMXBean>
List<T> getOSMXBeanList(Class<T> osMXBeanIntf) {
OperatingSystemMXBean m =
ManagementFactoryHelper.getOperatingSystemMXBean();
if (osMXBeanIntf.isInstance(m)) {
return Collections.singletonList(osMXBeanIntf.cast(m));
} else {
return Collections.emptyList();
}
}
private final String mxbeanInterfaceName;
private final String domain;
private final String type;
private final Set<String> keyProperties;
private final MXBeanFetcher fetcher;
private final PlatformComponent[] subComponents;
private PlatformComponent(String intfName,
String domain, String type,
Set<String> keyProperties,
MXBeanFetcher fetcher) {
this.mxbeanInterfaceName = intfName;
this.domain = domain;
this.type = type;
this.keyProperties = keyProperties;
this.fetcher = fetcher;
this.subComponents = new PlatformComponent[0];
}
private PlatformComponent(String intfName,
String domain, String type,
Set<String> keyProperties,
MXBeanFetcher fetcher,
PlatformComponent... subComponents) {
this.mxbeanInterfaceName = intfName;
this.domain = domain;
this.type = type;
this.keyProperties = keyProperties;
this.fetcher = fetcher;
this.subComponents = subComponents;
}
private static Set<String> defaultKeyProps;
private static Set<String> defaultKeyProperties() {
if (defaultKeyProps == null) {
defaultKeyProps = Collections.singleton("type");
}
return defaultKeyProps;
}
private static Set<String> keyProperties(String... keyNames) {
Set<String> set = new HashSet<String>();
set.add("type");
for (String s : keyNames) {
set.add(s);
}
return set;
}
String getMXBeanInterfaceName() {
return mxbeanInterfaceName;
}
@SuppressWarnings("unchecked")
Class<? extends PlatformManagedObject> getMXBeanInterface() {
try {
// Lazy loading the MXBean interface only when it is needed
return (Class<? extends PlatformManagedObject>)
Class.forName(mxbeanInterfaceName, false, null);
} catch (ClassNotFoundException x) {
throw new AssertionError(x);
}
}
@SuppressWarnings("unchecked")
<T extends PlatformManagedObject>
List<T> getMXBeans(Class<T> mxbeanInterface)
{
return fetcher.getMXBeans();
}
<T extends PlatformManagedObject>
List<T> getMXBeans(MBeanServerConnection mbs, Class<T> mxbeanInterface)
throws java.io.IOException
{
List<T> result = new ArrayList<T>();
for (ObjectName on : getObjectNames(mbs)) {
result.add(ManagementFactory.
newPlatformMXBeanProxy(mbs,
on.getCanonicalName(),
mxbeanInterface)
);
}
return result;
}
private Set<ObjectName> getObjectNames(MBeanServerConnection mbs)
throws java.io.IOException
{
String domainAndType = domain + ":type=" + type;
if (keyProperties.size() > 1) {
// if there are more than 1 key properties (i.e. other than "type")
domainAndType += ",*";
}
ObjectName on = com.sun.jmx.mbeanserver.Util.newObjectName(domainAndType);
Set<ObjectName> set = mbs.queryNames(on, null);
for (PlatformComponent pc : subComponents) {
set.addAll(pc.getObjectNames(mbs));
}
return set;
}
private static final long serialVersionUID = 6992337162326171013L;
}

View File

@ -0,0 +1,61 @@
/*
* Copyright 2008 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 java.lang.management;
import javax.management.ObjectName;
/**
* A platform managed object is a {@linkplain javax.management.MXBean JMX MXBean}
* for monitoring and managing a component in the Java platform.
* Each platform managed object has a unique
* <a href="ManagementFactory.html#MXBean">object name</a>
* for the {@linkplain ManagementFactory.getPlatformMBeanServer
* platform MBeanServer} access.
* All platform MXBeans will implement this interface.
*
* <p>
* Note:
* The platform MXBean interfaces (i.e. all subinterfaces
* of {@code PlatformManagedObject}) are implemented
* by the Java platform only. New methods may be added in these interfaces
* in future Java SE releases.
* In addition, this {@code PlatformManagedObject} interface is only
* intended for the management interfaces for the platform to extend but
* not for applications.
*
* @see <a href="ManagementFactory.html#MXBean">Platform MXBeans</a>
* @since 1.7
*/
public interface PlatformManagedObject {
/**
* Returns an {@link ObjectName ObjectName} instance representing
* the object name of this platform managed object.
*
* @return an {@link ObjectName ObjectName} instance representing
* the object name of this platform managed object.
*/
public ObjectName getObjectName();
}

View File

@ -44,9 +44,13 @@ package java.lang.management;
* <tt>java.lang:type=Runtime</tt>}
* </blockquote>
*
* It can be obtained by calling the
* {@link PlatformManagedObject#getObjectName} method.
*
* <p> This interface defines several convenient methods for accessing
* system properties about the Java virtual machine.
*
* @see ManagementFactory#getPlatformMXBeans(Class)
* @see <a href="../../../javax/management/package-summary.html">
* JMX Specification.</a>
* @see <a href="package-summary.html#examples">
@ -55,7 +59,7 @@ package java.lang.management;
* @author Mandy Chung
* @since 1.5
*/
public interface RuntimeMXBean {
public interface RuntimeMXBean extends PlatformManagedObject {
/**
* Returns the name representing the running Java virtual machine.
* The returned name string can be any arbitrary string and

View File

@ -26,6 +26,7 @@
package java.lang.management;
import javax.management.openmbean.CompositeData;
import sun.management.ManagementFactoryHelper;
import sun.management.ThreadInfoCompositeData;
import static java.lang.Thread.State.*;
@ -220,12 +221,9 @@ public class ThreadInfo {
LockInfo[] lockedSynchronizers) {
this.threadId = t.getId();
this.threadName = t.getName();
this.threadState =
sun.management.ManagementFactory.toThreadState(state);
this.suspended =
sun.management.ManagementFactory.isThreadSuspended(state);
this.inNative =
sun.management.ManagementFactory.isThreadRunningNative(state);
this.threadState = ManagementFactoryHelper.toThreadState(state);
this.suspended = ManagementFactoryHelper.isThreadSuspended(state);
this.inNative = ManagementFactoryHelper.isThreadRunningNative(state);
this.blockedCount = blockedCount;
this.blockedTime = blockedTime;
this.waitedCount = waitedCount;

View File

@ -46,6 +46,9 @@ import java.util.Map;
* <tt>java.lang:type=Threading</tt>}
* </blockquote>
*
* It can be obtained by calling the
* {@link PlatformManagedObject#getObjectName} method.
*
* <h4>Thread ID</h4>
* Thread ID is a positive long value returned by calling the
* {@link java.lang.Thread#getId} method for a thread.
@ -108,6 +111,7 @@ import java.util.Map;
* {@link #findDeadlockedThreads} methods to find deadlocks in
* the running application.
*
* @see ManagementFactory#getPlatformMXBeans(Class)
* @see <a href="../../../javax/management/package-summary.html">
* JMX Specification.</a>
* @see <a href="package-summary.html#examples">
@ -117,7 +121,7 @@ import java.util.Map;
* @since 1.5
*/
public interface ThreadMXBean {
public interface ThreadMXBean extends PlatformManagedObject {
/**
* Returns the current number of live threads including both
* daemon and non-daemon threads.

View File

@ -205,11 +205,31 @@ public class CookieManager extends CookieHandler
if (cookieJar == null)
return Collections.unmodifiableMap(cookieMap);
boolean secureLink = "https".equalsIgnoreCase(uri.getScheme());
List<HttpCookie> cookies = new java.util.ArrayList<HttpCookie>();
String path = uri.getPath();
if (path == null || path.isEmpty()) {
path = "/";
}
for (HttpCookie cookie : cookieJar.get(uri)) {
// apply path-matches rule (RFC 2965 sec. 3.3.4)
if (pathMatches(uri.getPath(), cookie.getPath())) {
cookies.add(cookie);
// and check for the possible "secure" tag (i.e. don't send
// 'secure' cookies over unsecure links)
if (pathMatches(path, cookie.getPath()) &&
(secureLink || !cookie.getSecure())) {
// Let's check the authorize port list if it exists
String ports = cookie.getPortlist();
if (ports != null && !ports.isEmpty()) {
int port = uri.getPort();
if (port == -1) {
port = "https".equals(uri.getScheme()) ? 443 : 80;
}
if (isInPortList(ports, port)) {
cookies.add(cookie);
}
} else {
cookies.add(cookie);
}
}
}
@ -251,8 +271,46 @@ public class CookieManager extends CookieHandler
try {
List<HttpCookie> cookies = HttpCookie.parse(headerValue);
for (HttpCookie cookie : cookies) {
if (shouldAcceptInternal(uri, cookie)) {
cookieJar.add(uri, cookie);
if (cookie.getPath() == null) {
// If no path is specified, then by default
// the path is the directory of the page/doc
String path = uri.getPath();
if (!path.endsWith("/")) {
int i = path.lastIndexOf("/");
if (i > 0) {
path = path.substring(0, i + 1);
} else {
path = "/";
}
}
cookie.setPath(path);
}
String ports = cookie.getPortlist();
if (ports != null) {
int port = uri.getPort();
if (port == -1) {
port = "https".equals(uri.getScheme()) ? 443 : 80;
}
if (ports.isEmpty()) {
// Empty port list means this should be restricted
// to the incoming URI port
cookie.setPortlist("" + port );
if (shouldAcceptInternal(uri, cookie)) {
cookieJar.add(uri, cookie);
}
} else {
// Only store cookies with a port list
// IF the URI port is in that list, as per
// RFC 2965 section 3.3.2
if (isInPortList(ports, port) &&
shouldAcceptInternal(uri, cookie)) {
cookieJar.add(uri, cookie);
}
}
} else {
if (shouldAcceptInternal(uri, cookie)) {
cookieJar.add(uri, cookie);
}
}
}
} catch (IllegalArgumentException e) {
@ -276,6 +334,32 @@ public class CookieManager extends CookieHandler
}
static private boolean isInPortList(String lst, int port) {
int i = lst.indexOf(",");
int val = -1;
while (i > 0) {
try {
val = Integer.parseInt(lst.substring(0, i));
if (val == port) {
return true;
}
} catch (NumberFormatException numberFormatException) {
}
lst = lst.substring(i+1);
i = lst.indexOf(",");
}
if (!lst.isEmpty()) {
try {
val = Integer.parseInt(lst);
if (val == port) {
return true;
}
} catch (NumberFormatException numberFormatException) {
}
}
return false;
}
/*
* path-matches algorithm, as defined by RFC 2965
*/

View File

@ -92,9 +92,14 @@ public final class HttpCookie implements Cloneable {
//
// date format used by Netscape's cookie draft
// date formats used by Netscape's cookie draft
// as well as formats seen on various sites
//
private final static String NETSCAPE_COOKIE_DATE_FORMAT = "EEE',' dd-MMM-yyyy HH:mm:ss 'GMT'";
private final static String[] COOKIE_DATE_FORMATS = {
"EEE',' dd-MMM-yyyy HH:mm:ss 'GMT'",
"EEE',' dd MMM yyyy HH:mm:ss 'GMT'",
"EEE MMM dd yyyy HH:mm:ss 'GMT'Z"
};
//
// constant strings represent set-cookie header token
@ -148,6 +153,7 @@ public final class HttpCookie implements Cloneable {
secure = false;
whenCreated = System.currentTimeMillis();
portlist = null;
}
@ -505,14 +511,14 @@ public final class HttpCookie implements Cloneable {
/**
* Indicates to the browser whether the cookie should only be sent
* using a secure protocol, such as HTTPS or SSL.
* Indicates whether the cookie should only be sent using a secure protocol,
* such as HTTPS or SSL.
*
* <p>The default value is <code>false</code>.
*
* @param flag if <code>true</code>, sends the cookie from the browser
* to the server using only when using a secure protocol;
* if <code>false</code>, sent on any protocol
* @param flag If <code>true</code>, the cookie can only be sent over
* a secure protocol like https.
* If <code>false</code>, it can be sent over any protocol.
*
* @see #getSecure
*
@ -526,12 +532,12 @@ public final class HttpCookie implements Cloneable {
/**
* Returns <code>true</code> if the browser is sending cookies
* only over a secure protocol, or <code>false</code> if the
* browser can send cookies using any protocol.
* Returns <code>true</code> if sending this cookie should be
* restricted to a secure protocol, or <code>false</code> if the
* it can be sent using any protocol.
*
* @return <code>true</code> if the browser can use
* any standard protocol; otherwise, <code>false</code>
* @return <code>false</code> if the cookie can be sent over
* any standard protocol; otherwise, <code>true</code>
*
* @see #setSecure
*
@ -748,6 +754,7 @@ public final class HttpCookie implements Cloneable {
*
* @return a string form of the cookie. The string has the defined format
*/
@Override
public String toString() {
if (getVersion() > 0) {
return toRFC2965HeaderString();
@ -768,6 +775,7 @@ public final class HttpCookie implements Cloneable {
* @return <tt>true</tt> if 2 http cookies equal to each other;
* otherwise, <tt>false</tt>
*/
@Override
public boolean equals(Object obj) {
if (obj == this)
return true;
@ -798,6 +806,7 @@ public final class HttpCookie implements Cloneable {
*
* @return this http cookie's hash code
*/
@Override
public int hashCode() {
int h1 = name.toLowerCase().hashCode();
int h2 = (domain!=null) ? domain.toLowerCase().hashCode() : 0;
@ -811,6 +820,7 @@ public final class HttpCookie implements Cloneable {
*
* @return a clone of this http cookie
*/
@Override
public Object clone() {
try {
return super.clone();
@ -978,7 +988,7 @@ public final class HttpCookie implements Cloneable {
});
assignors.put("port", new CookieAttributeAssignor(){
public void assign(HttpCookie cookie, String attrName, String attrValue) {
if (cookie.getPortlist() == null) cookie.setPortlist(attrValue);
if (cookie.getPortlist() == null) cookie.setPortlist(attrValue == null ? "" : attrValue);
}
});
assignors.put("secure", new CookieAttributeAssignor(){
@ -1050,24 +1060,31 @@ public final class HttpCookie implements Cloneable {
return sb.toString();
}
private static SimpleDateFormat[] cDateFormats = null;
static {
cDateFormats = new SimpleDateFormat[COOKIE_DATE_FORMATS.length];
for (int i = 0; i < COOKIE_DATE_FORMATS.length; i++) {
cDateFormats[i] = new SimpleDateFormat(COOKIE_DATE_FORMATS[i]);
cDateFormats[i].setTimeZone(TimeZone.getTimeZone("GMT"));
}
}
/*
* @param dateString a date string in format of
* "EEE',' dd-MMM-yyyy HH:mm:ss 'GMT'",
* which defined in Netscape cookie spec
* @param dateString a date string in one of the formats
* defined in Netscape cookie spec
*
* @return delta seconds between this cookie's creation
* time and the time specified by dateString
*/
private long expiryDate2DeltaSeconds(String dateString) {
SimpleDateFormat df = new SimpleDateFormat(NETSCAPE_COOKIE_DATE_FORMAT);
df.setTimeZone(TimeZone.getTimeZone("GMT"));
for (SimpleDateFormat df : cDateFormats) {
try {
Date date = df.parse(dateString);
return (date.getTime() - whenCreated) / 1000;
} catch (Exception e) {
try {
Date date = df.parse(dateString);
return (date.getTime() - whenCreated) / 1000;
} catch (Exception e) {
return 0;
}
}
return 0;
}

View File

@ -29,6 +29,8 @@ import java.util.Enumeration;
import java.util.List;
import java.util.ArrayList;
import javax.management.ObjectName;
/**
* Logging is the implementation class of LoggingMXBean.
*
@ -115,4 +117,7 @@ class Logging implements LoggingMXBean {
}
}
public ObjectName getObjectName() {
return com.sun.jmx.mbeanserver.Util.newObjectName(LogManager.LOGGING_MXBEAN_NAME);
}
}

View File

@ -25,6 +25,8 @@
package java.util.logging;
import java.lang.management.PlatformManagedObject;
/**
* The management interface for the logging facility.
*
@ -43,14 +45,17 @@ package java.util.logging;
* <tt>java.util.logging:type=Logging</tt>}
* </blockquote>
*
* @see java.lang.management.ManagementFactory
* It can be obtained by calling the
* {@link PlatformManagedObject#getObjectName} method.
*
* @see java.lang.management.ManagementFactory#getPlatformMXBeans(Class)
*
* @author Ron Mann
* @author Mandy Chung
* @since 1.5
*
*/
public interface LoggingMXBean {
public interface LoggingMXBean extends PlatformManagedObject {
/**
* Returns the list of currently registered loggers. This method

View File

@ -2844,7 +2844,15 @@ loop: for(int x=0, offset=0; x<nCodePoints; x++, offset+=len) {
/**
* Utility method for parsing unicode escape sequences.
*/
private int u() {
private int cursor() {
return cursor;
}
private void setcursor(int pos) {
cursor = pos;
}
private int uxxxx() {
int n = 0;
for (int i = 0; i < 4; i++) {
int ch = read();
@ -2856,6 +2864,20 @@ loop: for(int x=0, offset=0; x<nCodePoints; x++, offset+=len) {
return n;
}
private int u() {
int n = uxxxx();
if (Character.isHighSurrogate((char)n)) {
int cur = cursor();
if (read() == '\\' && read() == 'u') {
int n2 = uxxxx();
if (Character.isLowSurrogate((char)n2))
return Character.toCodePoint((char)n, (char)n2);
}
setcursor(cur);
}
return n;
}
//
// Utility methods for code point support
//

View File

@ -100,12 +100,13 @@ class AndQueryExp extends QueryEval implements QueryExp {
/**
* Returns a string representation of this AndQueryExp
*/
public String toString() {
return "(" + exp1 + ") and (" + exp2 + ")";
}
@Override
public String toString() {
return "(" + exp1 + ") and (" + exp2 + ")";
}
@Override
String toQueryString() {
@Override
String toQueryString() {
// Parentheses are only added if needed to disambiguate.
return parens(exp1) + " and " + parens(exp2);
}

View File

@ -135,6 +135,7 @@ class BetweenQueryExp extends QueryEval implements QueryExp {
/**
* Returns the string representing the object.
*/
@Override
public String toString() {
return "(" + exp1 + ") between (" + exp2 + ") and (" + exp3 + ")";
}

View File

@ -187,11 +187,11 @@ class BinaryRelQueryExp extends QueryEval implements QueryExp {
/**
* Returns the string representing the object.
*/
@Override
public String toString() {
return "(" + exp1 + ") " + relOpString() + " (" + exp2 + ")";
}
@Override
String toQueryString() {
return exp1 + " " + relOpString() + " " + exp2;
}

View File

@ -91,7 +91,6 @@ class NotQueryExp extends QueryEval implements QueryExp {
return "not (" + exp + ")";
}
@Override
String toQueryString() {
return "not (" + Query.toString(exp) + ")";
}

Some files were not shown because too many files have changed in this diff Show More