Checking Connections and Operations
ResourceAdapterBase provides methods that you can
use to check the validity of an operation, such as whether the connection
to the resource is working, before the adapter attempts the actual operation.
The following table describes methods you can use to verify that your
adapter is communicating with the resource and that the authorized account
has access.
Table 10–15 Methods Used to Check Communication
Method
|
Description
|
checkCreateAccount
|
Checks to see if an account can be created on the resource. The following
features can be checked:
-
Can basic connectivity to the resource be established?
-
Does the account already exist?
-
Do the account attribute values comply with all (if any) resource-specific
restrictions or policies that have not been checked at a higher level?
This method does not check whether the account already exists. It contains
the account attribute information needed to create the user account such as
account name, password, and user name.
After confirming that the
account can be created, the method closes the connection to the resource.
|
checkUpdateAccount
|
Establishes a connection and checks to see if the account can be updated.
This method receives a user object as input. It contains the account
attribute information needed to create the user account such as account name,
password, and user name.
The user object specifies the account attributes that have been added
or modified. Only these attributes are checked.
|
checkDeleteAccount
|
Checks to see if an account exists and can deleted. The following features
can be checked:
-
Can basic connectivity to the resource be established?
-
Does the account already exist?
-
Do the account attribute values comply with all (if any) resource-specific
restrictions or policies that haven’t been checked at a higher level?
This method does not check whether the account already exists. It receives
a user object as input. It contains the account attribute information needed
to delete the user account such as account name, password, and user name.
After checking to see if the account can be deleted, the method closes
the connection to the resource
|