IBM DB2 Information Integrator
Java API Reference
for Developing Wrappers

com.ibm.db2.wrapper
Class ServerInfo

java.lang.Object
  extended bycom.ibm.db2.wrapper.CatalogInfo
      extended bycom.ibm.db2.wrapper.ServerInfo

public final class ServerInfo
extends CatalogInfo

The ServerInfo class encapsulates the catalog information for a server object from the CREATE SERVER and ALTER SERVER statements.

The ServerInfo class is one of the catalog classes for the Java API.

Usage:
The ServerInfo class is instantiated by the DB2 federated server to contain information from a CREATE SERVER or an ALTER SERVER statement or to contain information from the federated server's system catalog. This class is instantiated by the wrapper when information is added during CREATE SERVER or ALTER SERVER statement operations.

Since:
IBM DB2 Information Integrator Version 8.2

Constructor Summary
ServerInfo()
          Construct a default (empty) server information object.
ServerInfo(java.lang.String name, java.lang.String type, java.lang.String version, java.lang.String wrapperName)
          Construct a fully initialized server information object.
 
Method Summary
 void addOption(java.lang.String optionName, java.lang.String optionValue, int action)
          Add a single-value option to the options chain.
 void addOption(java.lang.String optionName, java.lang.String optionValue, java.sql.Timestamp timestamp, java.lang.String valueID, int action)
          Add a multi-value option to the options chain.
 void dropOption(CatalogOption option)
          Delete an option from the options chain.
 void dropOption(CatalogOption option, java.lang.String valueID)
          Delete a value from a multi-value option and delete the option if no values remain.
 void dropRemoteFunction(RemoteFunctionInfo remoteFunctionInfo)
          Drop a remote function mapping object from the chain.
 java.lang.String getAuthID()
          Retrieve the authorization ID for the server.
 RemoteFunctionInfo getFirstRemoteFunction()
          Retrieve the first remote function mapping object from the chain.
 RemoteFunctionInfo getNextRemoteFunction(RemoteFunctionInfo remoteFunctionInfo)
          Retrieve the next remote function mapping object from the chain.
 java.lang.String getPassword()
          Retrieve the password for the server.
 RemoteFunctionInfo getRemoteFunction(java.lang.String functionName)
          Retrieve the remote function mapping object with the specified name from the chain.
 java.lang.String getServerName()
          Retrieve the name of the server.
 java.lang.String getType()
          Retrieve the type of the server.
 java.lang.String getVersion()
          Retrieve the version string for the server.
 java.lang.String getWrapperName()
          Retrieve the name of the wrapper that contains the server.
 void insertRemoteFunction(RemoteFunctionInfo remoteFunctionInfo)
          Insert a remote function mapping object into the chain.
 boolean isAuthIDValid()
          Verify whether an authorization ID value is specified.
 boolean isNameValid()
          Verify whether the value of server name is specified.
 boolean isPasswordValid()
          Verify whether a password value is specified.
 boolean isTypeValid()
          Verify whether a type value is specified.
 boolean isVersionValid()
          Verify whether a version value is specified.
 boolean isWrapperNameValid()
          Verify if a wrapper name value is specified.
 void setAuthID(java.lang.String authID)
          Set the authorization ID for the server.
 void setPassword(java.lang.String password)
          Set the password for the server.
 void setServerName(java.lang.String name)
          Set the server name.
 void setType(java.lang.String type)
          Set the type of the server.
 void setVersion(java.lang.String version)
          Set the version string for the server.
 void setWrapperName(java.lang.String name)
          Set the name of the wrapper that contains the server.
 
Methods inherited from class com.ibm.db2.wrapper.CatalogInfo
addOption, getFirstOption, getNextOption, getOption
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServerInfo

public ServerInfo()
Construct a default (empty) server information object.

Since:
IBM DB2 Information Integrator Version 8.2

ServerInfo

public ServerInfo(java.lang.String name,
                  java.lang.String type,
                  java.lang.String version,
                  java.lang.String wrapperName)
Construct a fully initialized server information object.

Parameters:
name - The server name.
type - The server type.
version - The version.
wrapperName - The name of the wrapper that contains the server.
Since:
IBM DB2 Information Integrator Version 8.2
Method Detail

addOption

public void addOption(java.lang.String optionName,
                      java.lang.String optionValue,
                      int action)
               throws WrapperException
Add a single-value option to the options chain.

Parameters:
optionName - The name of the option.
optionValue - The value of the option.
action - The action flag for the option.
Throws:
WrapperException - if the option already exists in the chain or if the action is invalid.
Since:
IBM DB2 Information Integrator Version 8.2
See Also:
SingleValueOption

addOption

public void addOption(java.lang.String optionName,
                      java.lang.String optionValue,
                      java.sql.Timestamp timestamp,
                      java.lang.String valueID,
                      int action)
               throws WrapperException
Add a multi-value option to the options chain.

Parameters:
optionName - The name of the option.
optionValue - The value of the option.
timestamp - The timestamp of the value.
valueID - The ID of the value.
action - The action flag for the option.
Throws:
WrapperException - if a duplicate value ID is specified or if the action is invalid.
Since:
IBM DB2 Information Integrator Version 8.2
See Also:
MultiValueOption

dropOption

public void dropOption(CatalogOption option)
                throws WrapperException
Delete an option from the options chain.

Overrides:
dropOption in class CatalogInfo
Parameters:
option - The option to be deleted.
Throws:
WrapperException - if the option object is null.
Since:
IBM DB2 Information Integrator Version 8.2
See Also:
CatalogOption

dropOption

public void dropOption(CatalogOption option,
                       java.lang.String valueID)
                throws WrapperException
Delete a value from a multi-value option and delete the option if no values remain.

Parameters:
option - The option.
valueID - The ID of the value to be deleted.
Throws:
WrapperException - if the option object is null or the value ID is not found.
Since:
IBM DB2 Information Integrator Version 8.2
See Also:
CatalogOption

dropRemoteFunction

public void dropRemoteFunction(RemoteFunctionInfo remoteFunctionInfo)
                        throws WrapperException
Drop a remote function mapping object from the chain.

Parameters:
remoteFunctionInfo - The function mapping object to be dropped.
Throws:
WrapperException - if the remote function is null.
Since:
IBM DB2 Information Integrator Version 8.2
See Also:
RemoteFunctionInfo

getAuthID

public java.lang.String getAuthID()
Retrieve the authorization ID for the server.

Returns:
The authorization ID.
Since:
IBM DB2 Information Integrator Version 8.2

getFirstRemoteFunction

public RemoteFunctionInfo getFirstRemoteFunction()
Retrieve the first remote function mapping object from the chain.

Returns:
The first function mapping object.
Since:
IBM DB2 Information Integrator Version 8.2
See Also:
RemoteFunctionInfo

getNextRemoteFunction

public RemoteFunctionInfo getNextRemoteFunction(RemoteFunctionInfo remoteFunctionInfo)
Retrieve the next remote function mapping object from the chain.

Parameters:
remoteFunctionInfo - The current function mapping object.
Returns:
The next function mapping object.
Since:
IBM DB2 Information Integrator Version 8.2
See Also:
RemoteFunctionInfo

getPassword

public java.lang.String getPassword()
Retrieve the password for the server.

Returns:
The password.
Since:
IBM DB2 Information Integrator Version 8.2

getRemoteFunction

public RemoteFunctionInfo getRemoteFunction(java.lang.String functionName)
                                     throws WrapperException
Retrieve the remote function mapping object with the specified name from the chain.

Parameters:
functionName - The name of the function mapping.
Returns:
The function mapping object.
Throws:
WrapperException - if the function name is null or is not found.
Since:
IBM DB2 Information Integrator Version 8.2
See Also:
RemoteFunctionInfo

getServerName

public java.lang.String getServerName()
Retrieve the name of the server.

Returns:
The server name.
Since:
IBM DB2 Information Integrator Version 8.2

getType

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

Returns:
The server type.
Since:
IBM DB2 Information Integrator Version 8.2

getVersion

public java.lang.String getVersion()
Retrieve the version string for the server.

Returns:
The version.
Since:
IBM DB2 Information Integrator Version 8.2

getWrapperName

public java.lang.String getWrapperName()
Retrieve the name of the wrapper that contains the server.

Returns:
The wrapper name.
Since:
IBM DB2 Information Integrator Version 8.2

insertRemoteFunction

public void insertRemoteFunction(RemoteFunctionInfo remoteFunctionInfo)
                          throws WrapperException
Insert a remote function mapping object into the chain.

Parameters:
remoteFunctionInfo - The function mapping object to be inserted.
Throws:
WrapperException - if the remote function is null.
Since:
IBM DB2 Information Integrator Version 8.2
See Also:
RemoteFunctionInfo

isAuthIDValid

public boolean isAuthIDValid()
Verify whether an authorization ID value is specified.

Returns:
true if a value is specified, false otherwise.
Since:
IBM DB2 Information Integrator Version 8.2

isNameValid

public boolean isNameValid()
Verify whether the value of server name is specified.

Returns:
true if a value is specified, false otherwise.
Since:
IBM DB2 Information Integrator Version 8.2

isPasswordValid

public boolean isPasswordValid()
Verify whether a password value is specified.

Returns:
true if a value is specified, false otherwise.
Since:
IBM DB2 Information Integrator Version 8.2

isTypeValid

public boolean isTypeValid()
Verify whether a type value is specified.

Returns:
true if a value is specified, false otherwise.
Since:
IBM DB2 Information Integrator Version 8.2

isVersionValid

public boolean isVersionValid()
Verify whether a version value is specified.

Returns:
true if a value is specified, false otherwise.
Since:
IBM DB2 Information Integrator Version 8.2

isWrapperNameValid

public boolean isWrapperNameValid()
Verify if a wrapper name value is specified.

Returns:
true if a value is specified, false otherwise.
Since:
IBM DB2 Information Integrator Version 8.2

setAuthID

public void setAuthID(java.lang.String authID)
Set the authorization ID for the server.

Parameters:
authID - The authorization ID
Since:
IBM DB2 Information Integrator Version 8.2

setPassword

public void setPassword(java.lang.String password)
Set the password for the server.

Parameters:
password - The password.
Since:
IBM DB2 Information Integrator Version 8.2

setServerName

public void setServerName(java.lang.String name)
Set the server name.

Parameters:
name - The server name.
Since:
IBM DB2 Information Integrator Version 8.2

setType

public void setType(java.lang.String type)
Set the type of the server.

Parameters:
type - The server type.
Since:
IBM DB2 Information Integrator Version 8.2

setVersion

public void setVersion(java.lang.String version)
Set the version string for the server.

Parameters:
version - The version.
Since:
IBM DB2 Information Integrator Version 8.2

setWrapperName

public void setWrapperName(java.lang.String name)
Set the name of the wrapper that contains the server.

Parameters:
name - The name of the wrapper.
Since:
IBM DB2 Information Integrator Version 8.2

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.