IBM DB2 Information Integrator
Java API Reference
for Developing Wrappers

com.ibm.db2.wrapper
Class UnfencedServer

java.lang.Object
  extended bycom.ibm.db2.wrapper.SqlqgBaseClass
      extended bycom.ibm.db2.wrapper.Server
          extended bycom.ibm.db2.wrapper.UnfencedServer
Direct Known Subclasses:
UnfencedGenericServer

public class UnfencedServer
extends Server

The UnfencedServer class is a subclass of the Server class and is the abstract base class for all data source server functionality that operates in the unfenced (trusted) process space. This class is responsible for validation and for performing the query planning.

Usage:
Do not use this class directly. Instantiating or subclassing the UnfencedServer class directly results in incorrect wrapper behavior. Subclass the UnfencedGenericServer class.

Since:
IBM DB2 Information Integrator Version 8.2

Constructor Summary
protected UnfencedServer(java.lang.String name, int kind, UnfencedWrapper wrapper)
           
 
Method Summary
 Nickname findNickname(java.lang.String schema, java.lang.String name)
          Search for a nickname with the specified schema name and nickname name.
 void insertRemoteFunction(DefaultRemoteFunction defaultRemoteFunction)
          This function adds a temporary remote function mapping based on the DefaultRemoteFunction object to the server.
 void insertRemoteFunction(RemoteFunctionInfo remoteFunctionInfo)
          This function adds a temporary remote function mapping based on the RemoteFunctionInfo object to the server.
static boolean isReservedFunctionOption(java.lang.String functionOption)
          Returns true if an option is a reserved function option
protected  void setMyDefaultRemoteFunctionMappings()
          Allows the wrapper to add temporary function mappings to the current server via the insertRemoteFunction(RemoteFunctionInfo) and insertRemoteFunction(DefaultRemoteFunction) method.
protected  ServerInfo verifyMyAlterServerInfo(ServerInfo serverInfo)
          Validate the data source server information that is specified in ALTER SERVER statements.
protected  void verifyMyFunctionMappingInfo(RemoteFunctionInfo remoteFunctionInfo)
          Validates function mapping information that is specified in CREATE FUNCTION MAPPING statements.
protected  ServerInfo verifyMyRegisterServerInfo(ServerInfo serverInfo)
          Validate the data source server information that is specified in CREATE SERVER statements.
 
Methods inherited from class com.ibm.db2.wrapper.Server
createNickname, createRemoteUser, destroy, findRemoteUser, getInfo, getName, getType, getVersion, getWrapper, initializeMyServer
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UnfencedServer

protected UnfencedServer(java.lang.String name,
                         int kind,
                         UnfencedWrapper wrapper)
Method Detail

findNickname

public final Nickname findNickname(java.lang.String schema,
                                   java.lang.String name)
Search for a nickname with the specified schema name and nickname name.

Parameters:
schema - The schema name of the nickname to locate.
name - The name of the nickname to locate.
Returns:
The nickname with the specified schema and name or null if the nickname is not found.
Since:
IBM DB2 Information Integrator Version 8.2
See Also:
Nickname

insertRemoteFunction

public final void insertRemoteFunction(DefaultRemoteFunction defaultRemoteFunction)
                                throws WrapperException
This function adds a temporary remote function mapping based on the DefaultRemoteFunction object to the server. The function can only be called inside setMyDefaultRemoteFunctionMappings()

Throws:
WrapperException - - if called outside of the setMyDefaultRemoteFunctionMappings() context
Since:
IBM WebSphere Information Integrator Version 9.1
See Also:
DefaultRemoteFunction, setMyDefaultRemoteFunctionMappings()

insertRemoteFunction

public final void insertRemoteFunction(RemoteFunctionInfo remoteFunctionInfo)
                                throws WrapperException
This function adds a temporary remote function mapping based on the RemoteFunctionInfo object to the server. The function can only be called inside setMyDefaultRemoteFunctionMappings() The function just inserts the provided RemoteFunctionInfo object - it does not follow the RemoteFuctionInfo chain.

Throws:
WrapperException - - if called outside of the setMyDefaultRemoteFunctionMappings() context
Since:
IBM WebSphere Information Integrator Version 9.1
See Also:
RemoteFunctionInfo, setMyDefaultRemoteFunctionMappings()

isReservedFunctionOption

public static final boolean isReservedFunctionOption(java.lang.String functionOption)
Returns true if an option is a reserved function option

Parameters:
functionOption - the option name to be checked
Since:
IBM WebSphere Information Integrator Version 9.1

setMyDefaultRemoteFunctionMappings

protected void setMyDefaultRemoteFunctionMappings()
                                           throws java.lang.Exception
Allows the wrapper to add temporary function mappings to the current server via the insertRemoteFunction(RemoteFunctionInfo) and insertRemoteFunction(DefaultRemoteFunction) method. By default no function mappings are added. The wrapper can implement this function to add temporary function mappings.

Throws:
java.lang.Exception - if an error occurs.
Since:
IBM WebSphere Information Integrator Version 9.1
See Also:
insertRemoteFunction(RemoteFunctionInfo), insertRemoteFunction(DefaultRemoteFunction)

verifyMyAlterServerInfo

protected ServerInfo verifyMyAlterServerInfo(ServerInfo serverInfo)
                                      throws java.lang.Exception
Validate the data source server information that is specified in ALTER SERVER statements. By default, this method allows only reserved options and does not return additional information. The wrapper can implement this method in the wrapper-specific unfenced server subclass. The wrapper must implement this method if wrapper-specific data source server options are supported.

Parameters:
serverInfo - An object that contains the information that is provided in ALTER SERVER statements.
Returns:
An object with the information that is added by the wrapper.
Throws:
java.lang.Exception - if the verification fails.
Since:
IBM DB2 Information Integrator Version 8.2
See Also:
ServerInfo

verifyMyFunctionMappingInfo

protected void verifyMyFunctionMappingInfo(RemoteFunctionInfo remoteFunctionInfo)
                                    throws java.lang.Exception
Validates function mapping information that is specified in CREATE FUNCTION MAPPING statements. By default this method does accept any function mapping. The wrapper can implement this mehod in the wrapper-specific unfenced server class if validation of the function mapping is required. If a function mapping is not accepted the wrapper can throw an Exception.

Parameters:
remoteFunctionInfo - A RemoteFunctionInfo instance that contains the function mapping information.
Returns:
An integer value that indicates whether or not the function mapping is supported.
Throws:
java.lang.Exception - if the verification fails.
Since:
IBM DB2 Information Integrator Version 8.2
See Also:
RemoteFunctionInfo

verifyMyRegisterServerInfo

protected ServerInfo verifyMyRegisterServerInfo(ServerInfo serverInfo)
                                         throws java.lang.Exception
Validate the data source server information that is specified in CREATE SERVER statements. By default, this method allows only reserved options and does not return additional information. The wrapper can implement this method in the wrapper-specific unfenced server subclass. The wrapper must implement this method if wrapper-specific data source server options are supported.

Parameters:
serverInfo - An object that contains the information that is provided in CREATE SERVER statements.
Returns:
An object with the information that is added by the wrapper.
Throws:
java.lang.Exception - if the verification fails.
Since:
IBM DB2 Information Integrator Version 8.2
See Also:
ServerInfo

IBM DB2 Information Integrator
Java API Reference
for Developing Wrappers

(C)Copyright IBM Corp. 2002. All rights reserved.

Links on this page are made available for your convenience and may take you to non-IBM sites. IBM does not warrant any sample code provided on these sites.