IBM DB2 Information Integrator
Java API Reference
for Developing Wrappers

com.ibm.db2.wrapper
Class RemoteUser

java.lang.Object
  extended bycom.ibm.db2.wrapper.SqlqgBaseClass
      extended bycom.ibm.db2.wrapper.RemoteUser
Direct Known Subclasses:
FencedRemoteUser, UnfencedRemoteUser

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

The RemoteUser class represents the authorizations to use on a data source server. Each instance of this class or its subclasses represents an authorization to use on the data source server that the wrapper works with. The RemoteUser base class implementation maintains the following information:



Usage:
Do not use this class directly, but instantiate or subclass the FencedGenericRemoteUser class and the UnfencedGenericRemoteUser class.

Since:
IBM DB2 Information Integrator Version 8.2

Field Summary
static java.lang.String REMOTE_AUTHID_OPTION
          Constant that represents the name of the remote authorization ID option.
static java.lang.String REMOTE_PASSWORD_OPTION
          Constant that represents the name of the remote authorization password option.
 
Method Summary
protected  void destroy()
          Destroys this user mapping object and frees any resources associated with it.
 UserInfo getInfo()
          Retrieve the user mapping information that is stored in the federated server's system catalog as a result of running DDL statements.
 java.lang.String getLocalName()
          Retrieve the name of the user on the local database.
 Wrapper getWrapper()
          Retrieve the wrapper instance that this user mapping belongs to.
protected  void initializeMyUser(UserInfo userInfo)
          Perform the necessary user mapping initialization.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

REMOTE_AUTHID_OPTION

public static final java.lang.String REMOTE_AUTHID_OPTION
Constant that represents the name of the remote authorization ID option.

Since:
IBM DB2 Information Integrator Version 8.2
See Also:
Constant Field Values

REMOTE_PASSWORD_OPTION

public static final java.lang.String REMOTE_PASSWORD_OPTION
Constant that represents the name of the remote authorization password option.

Since:
IBM DB2 Information Integrator Version 8.2
See Also:
Constant Field Values
Method Detail

destroy

protected void destroy()
                throws java.lang.Exception
Destroys this user mapping object and frees any resources associated with it. The default implementation does nothing. This method is called by the federated server before the user mapping 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 UnfencedGenericRemoteUser and FencedGenericRemoteUser.

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

getInfo

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

Returns:
An instance of UserInfo that contains the user mapping information.
Since:
IBM DB2 Information Integrator Version 8.2
See Also:
UserInfo

getLocalName

public final java.lang.String getLocalName()
Retrieve the name of the user on the local database.

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

getWrapper

public final Wrapper getWrapper()
Retrieve the wrapper instance that this user mapping belongs to.

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

initializeMyUser

protected void initializeMyUser(UserInfo userInfo)
                         throws java.lang.Exception
Perform the necessary user mapping initialization. This method is called by the DB2 Information Integrator engine when the user mapping is created or when its options are changed. This method can be implemented by the wrapper writer in the wrapper-specific RemoteUser subclass to perform the user mapping initialization.

Parameters:
userInfo - An instance of UserInfo that represents the user mapping information.
Throws:
java.lang.Exception - if the initialization process fails.
Since:
IBM DB2 Information Integrator Version 8.2
See Also:
UserInfo

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.