IBM DB2 Information Integrator
Java API Reference
for Developing Wrappers

com.ibm.db2.wrapper
Class UnfencedGenericServer

java.lang.Object
  extended bycom.ibm.db2.wrapper.SqlqgBaseClass
      extended bycom.ibm.db2.wrapper.Server
          extended bycom.ibm.db2.wrapper.UnfencedServer
              extended bycom.ibm.db2.wrapper.UnfencedGenericServer

public class UnfencedGenericServer
extends UnfencedServer

The UnfencedGenericServer class is a subclass of the Server class and is the abstract base class for all nonrelational 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:
The wrapper must implement a subclass of the UnfencedGenericServer class. This class is instantiated by the wrapper in the createServer method of the wrapper-specific subclass of the UnfencedGenericWrapper class.

Since:
IBM DB2 Information Integrator Version 8.2

Constructor Summary
protected UnfencedGenericServer(java.lang.String name, UnfencedGenericWrapper wrapper)
          Construct a UnfencedGenericServer object for the specified wrapper with the specified name.
 
Method Summary
protected  RemoteUser createRemoteUser(java.lang.String userName)
          Instantiate an appropriate RemoteUser subclass for this data source server.
 Reply createReply(Request request)
          Create a new empty Reply object for the given Request.
 float getSelectivity(PredicateList predicateList)
          Calculate the selectivity of a list of predicates.
protected  Reply planRequest(Request request)
          Analyze a proposed plan and determine what part of the plan (if any) can be pushed down to the remote data source.
 
Methods inherited from class com.ibm.db2.wrapper.UnfencedServer
findNickname, insertRemoteFunction, insertRemoteFunction, isReservedFunctionOption, setMyDefaultRemoteFunctionMappings, verifyMyAlterServerInfo, verifyMyFunctionMappingInfo, verifyMyRegisterServerInfo
 
Methods inherited from class com.ibm.db2.wrapper.Server
createNickname, 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

UnfencedGenericServer

protected UnfencedGenericServer(java.lang.String name,
                                UnfencedGenericWrapper wrapper)
Construct a UnfencedGenericServer object for the specified wrapper with the specified name.

Parameters:
name - The name of the data source server.
wrapper - The wrapper object that contains the data source server.
Since:
IBM DB2 Information Integrator Version 8.2
See Also:
UnfencedGenericWrapper, UnfencedServer
Method Detail

createRemoteUser

protected RemoteUser createRemoteUser(java.lang.String userName)
                               throws java.lang.Exception
Instantiate an appropriate RemoteUser subclass for this data source server. By default, this method creates an instance of the UnfencedGenericRemoteUser class. The wrapper can implement this method in the wrapper-specific data source server subclass. If a wrapper-specific subclass of the UnfencedGenericRemoteUser class is implemented, this method must also be implemented.

Overrides:
createRemoteUser in class Server
Parameters:
userName - The name of the remote user mapping to be created and that is specified in the CREATE USER MAPPING statement.
Returns:
The newly created UnfencedGenericRemoteUser instance.
Throws:
java.lang.Exception - if a new RemoteUser instance cannot be created.
Since:
IBM DB2 Information Integrator Version 8.2
See Also:
RemoteUser

createReply

public final Reply createReply(Request request)
                        throws java.lang.Exception
Create a new empty Reply object for the given Request. The planRequest method invokes this method to create the Reply objects.

Parameters:
request - The Request object that the Reply object is created for.
Returns:
The newly created Reply instance.
Throws:
java.lang.Exception - if the method fails.
Since:
IBM DB2 Information Integrator Version 8.2
See Also:
Request, Reply

getSelectivity

public float getSelectivity(PredicateList predicateList)
                     throws java.lang.Exception
Calculate the selectivity of a list of predicates.

Parameters:
predicateList - The PredicateList instance.
Returns:
The selectivity value.
Throws:
java.lang.Exception - if the method fails.
Since:
IBM DB2 Information Integrator Version 8.2
See Also:
PredicateList

planRequest

protected Reply planRequest(Request request)
                     throws java.lang.Exception
Analyze a proposed plan and determine what part of the plan (if any) can be pushed down to the remote data source. The wrapper writer implements this method in the wrapper-specific data source server subclass.

Parameters:
request - The Request object that contains the planned query.
Returns:
The Reply object or the first Reply in a list of Replies. Each Reply describes the query fragment that the wrapper is able to push down to the remote data source.
Throws:
java.lang.Exception - if the method fails.
Since:
IBM DB2 Information Integrator Version 8.2
See Also:
Request, Reply

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.