Package org.apache.derby.catalog
Class Java5SystemProcedures
java.lang.Object
org.apache.derby.catalog.Java5SystemProcedures
System procedures which run only on Java 5 or higher.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final String
Generic name for all user-supplied tools: the first optional arg is the tool class nameprivate static final String[][]
Mapping of tool names to their implementing classes for use by SYSCS_REGISTER_TOOLprivate static final int
private static final int
Offsets into arrays in OPTIONAL_TOOLS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static StandardException
badCustomTool
(String className) private static StandardException
private static String
findToolClassName
(String toolName, String... optionalArgs) Lookup the class name corresponding to the name of an optional toolprivate static Context
getContext
(String contextID) Privileged lookup of a Context.private static String[]
stripCustomClassName
(String... optionalArgs) For a custom tool, we strip the first arg from the list of optional args.static void
SYSCS_REGISTER_TOOL
(String toolName, boolean register, String... optionalArgs) Load or unload an optional tool package.private static StandardException
-
Field Details
-
TOOL_NAME
private static final int TOOL_NAMEOffsets into arrays in OPTIONAL_TOOLS- See Also:
-
TOOL_CLASS_NAME
private static final int TOOL_CLASS_NAME- See Also:
-
CUSTOM_TOOL_CLASS_NAME
Generic name for all user-supplied tools: the first optional arg is the tool class name- See Also:
-
OPTIONAL_TOOLS
Mapping of tool names to their implementing classes for use by SYSCS_REGISTER_TOOL
-
-
Constructor Details
-
Java5SystemProcedures
public Java5SystemProcedures()
-
-
Method Details
-
SYSCS_REGISTER_TOOL
public static void SYSCS_REGISTER_TOOL(String toolName, boolean register, String... optionalArgs) throws SQLException Load or unload an optional tool package. If the tool name is the special CUSTOM_TOOL_CLASS_NAME tool, then the first optionalArg is the name of a user-supplied class which implements OptionalTool.
- Parameters:
toolName
- Name of the tool package.register
- True if the package should be loaded, false otherwise.optionalArgs
- Tool-specific configuration parameters.- Throws:
SQLException
-
findToolClassName
private static String findToolClassName(String toolName, String... optionalArgs) throws StandardException Lookup the class name corresponding to the name of an optional tool- Throws:
StandardException
-
badTool
-
badCustomTool
-
stripCustomClassName
For a custom tool, we strip the first arg from the list of optional args. By the time we get to this method, it has already been determined that there is at least one arg and it is the name of a class which implements OptionalTool.
-
wrap
-
getContext
Privileged lookup of a Context. Must be private so that user code can't call this entry point.
-