org.apache.derby.catalog
Class Java5SystemProcedures

java.lang.Object
  extended by org.apache.derby.catalog.Java5SystemProcedures

public class Java5SystemProcedures
extends java.lang.Object

System procedures which run only on Java 5 or higher.


Field Summary
private static java.lang.String CUSTOM_TOOL_CLASS_NAME
          Generic name for all user-supplied tools: the first optional arg is the tool class name
private static java.lang.String[][] OPTIONAL_TOOLS
          Mapping of tool names to their implementing classes for use by SYSCS_REGISTER_TOOL
private static int TOOL_CLASS_NAME
           
private static int TOOL_NAME
          Offsets into arrays in OPTIONAL_TOOLS
 
Constructor Summary
Java5SystemProcedures()
           
 
Method Summary
private static StandardException badTool(java.lang.String toolName)
           
private static java.lang.String findToolClassName(java.lang.String toolName, java.lang.String... optionalArgs)
          Lookup the class name corresponding to the name of an optional tool
private static java.lang.String[] stripCustomClassName(java.lang.String... optionalArgs)
           For a custom tool, we strip the first arg from the list of optional args.
static void SYSCS_REGISTER_TOOL(java.lang.String toolName, boolean register, java.lang.String... optionalArgs)
           Load or unload an optional tool package.
private static StandardException wrap(java.lang.Throwable t)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TOOL_NAME

private static final int TOOL_NAME
Offsets into arrays in OPTIONAL_TOOLS

See Also:
Constant Field Values

TOOL_CLASS_NAME

private static final int TOOL_CLASS_NAME
See Also:
Constant Field Values

CUSTOM_TOOL_CLASS_NAME

private static final java.lang.String CUSTOM_TOOL_CLASS_NAME
Generic name for all user-supplied tools: the first optional arg is the tool class name

See Also:
Constant Field Values

OPTIONAL_TOOLS

private static final java.lang.String[][] OPTIONAL_TOOLS
Mapping of tool names to their implementing classes for use by SYSCS_REGISTER_TOOL

Constructor Detail

Java5SystemProcedures

public Java5SystemProcedures()
Method Detail

SYSCS_REGISTER_TOOL

public static void SYSCS_REGISTER_TOOL(java.lang.String toolName,
                                       boolean register,
                                       java.lang.String... optionalArgs)
                                throws java.sql.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:
java.sql.SQLException

findToolClassName

private static java.lang.String findToolClassName(java.lang.String toolName,
                                                  java.lang.String... optionalArgs)
                                           throws StandardException
Lookup the class name corresponding to the name of an optional tool

Throws:
StandardException

badTool

private static StandardException badTool(java.lang.String toolName)

stripCustomClassName

private static java.lang.String[] stripCustomClassName(java.lang.String... optionalArgs)

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

private static StandardException wrap(java.lang.Throwable t)

Built on Wed 2013-06-12 15:21:56+0000, from revision ???

Apache Derby V10.10 Internals - Copyright © 2004,2013 The Apache Software Foundation. All Rights Reserved.