IBM DB2 Information Integrator
Java API Reference
for Developing Wrappers

com.ibm.db2.wrapper
Class Server

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

public class Server
extends com.ibm.db2.wrapper.SqlqgBaseClass

The Server class is the abstract base class for all server functionality. The Server class maps to a specific data source that is supported by the wrapper. The class maintains the following information:



Usage:
Do not use this class directly but subclass the FencedGenericServer class and the UnfencedGenericServer class.

Since:
IBM DB2 Information Integrator Version 8.2

Method Summary
protected  Nickname createNickname(java.lang.String schemaName, java.lang.String nickname)
          Instantiate an appropriate Nickname subclass for this data source server.
protected  RemoteUser createRemoteUser(java.lang.String userName)
          Instantiate an appropriate RemoteUser subclass for this data source server.
protected  void destroy()
          Destroys this server object and frees any resources associated with it.
 RemoteUser findRemoteUser(java.lang.String userName)
          Search for a remote user mapping with the local name that is specified in the federated server's system catalog.
 ServerInfo getInfo()
          Retrieve the data source server information that is stored in the federated server's system catalog as a result of running DDL statements.
 java.lang.String getName()
          Retrieve the name of the data source server.
 java.lang.String getType()
          Retrieve the data source server type.
 java.lang.String getVersion()
          Retrieve the version of the data source server.
 Wrapper getWrapper()
          Retrieve the wrapper object that this data source server belongs to.
protected  void initializeMyServer(ServerInfo serverInfo)
          Initialize the data source server with valid federated server's system catalog information.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

createNickname

protected Nickname createNickname(java.lang.String schemaName,
                                  java.lang.String nickname)
                           throws java.lang.Exception
Instantiate an appropriate Nickname subclass for this data source server. The wrapper writer must implement this method in the wrapper-specific data source server subclass.

Parameters:
schemaName - The local schema name of the nickname to be created.
nickname - The local name of the nickname to be created.
Returns:
The newly created Nickname instance.
Throws:
java.lang.Exception - if a new Nickname instance cannot be created.
Since:
IBM DB2 Information Integrator Version 8.2
See Also:
Nickname

createRemoteUser

protected RemoteUser createRemoteUser(java.lang.String userName)
                               throws java.lang.Exception
Instantiate an appropriate RemoteUser subclass for this data source server. The wrapper can implement this method in the wrapper-specific data source server subclass. The wrapper writer must implement this method if a wrapper-specific subclass of the RemoteUser class is implemented.

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

destroy

protected void destroy()
                throws java.lang.Exception
Destroys this server object and frees any resources associated with it. The default implementation does nothing. This method is called by the federated server before the server object is removed and gives the wrapper a chance to free any resources allocated. If wrapper-specific resources need to be freed, the wrapper writer can implement this method in the wrapper-specific subclass of UnfencedGenericServer and FencedGenericServer.

Throws:
java.lang.Exception - if the processing fails.
Since:
IBM DB2 Information Integrator Version 8.2

findRemoteUser

public final RemoteUser findRemoteUser(java.lang.String userName)
Search for a remote user mapping with the local name that is specified in the federated server's system catalog. If no remote user mapping with that name is found, returns null.

Parameters:
userName - The name of the remote user mapping.
Returns:
The RemoteUser instance with the specified name or null if the remote user mapping is not found.
Since:
IBM DB2 Information Integrator Version 8.2
See Also:
RemoteUser

getInfo

public final ServerInfo getInfo()
Retrieve the data source server information that is stored in the federated server's system catalog as a result of running DDL statements.

Returns:
The instance that contains the server information.
Since:
IBM DB2 Information Integrator Version 8.2
See Also:
ServerInfo

getName

public final java.lang.String getName()
Retrieve the name of the data source server.

Returns:
The name of the data source server as specified on CREATE SERVER statement.
Since:
IBM DB2 Information Integrator Version 8.2

getType

public java.lang.String getType()
Retrieve the data source server type.

Returns:
The type of the data source server.
Since:
IBM DB2 Information Integrator Version 8.2

getVersion

public java.lang.String getVersion()
Retrieve the version of the data source server.

Returns:
The version of the data source server.
Since:
IBM DB2 Information Integrator Version 8.2

getWrapper

public final Wrapper getWrapper()
Retrieve the wrapper object that this data source server belongs to.

Returns:
The wrapper object.
Since:
IBM DB2 Information Integrator Version 8.2
See Also:
Wrapper

initializeMyServer

protected void initializeMyServer(ServerInfo serverInfo)
                           throws java.lang.Exception
Initialize the data source server with valid federated server's system catalog information. The wrapper can implement this method in the wrapper-specific data source server subclass. The wrapper writer must implement this method if wrapper-specific data source server options are supported.

Parameters:
serverInfo - The ServerInfo instance that contains the data source server information.
Throws:
java.lang.Exception - if the initialization process fails.
Since:
IBM DB2 Information Integrator Version 8.2
See Also:
WrapperInfo

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.