Skip navigation links

Oracle Access Manager Access SDK Java API Reference
11g Release 1 (11.1.1)

E22472-01


oracle.security.am.asdk
Class AccessClient

java.lang.Object
  extended by oracle.security.am.asdk.AccessClient


public final class AccessClient
extends java.lang.Object

Implements AccessClient Class.

Implements methods that allow applications to initialize the Access Server API Client.

The initialization functions are used to:

The AccessClient class includes class methods to indicate the location of a properties configuration file, to initialize the Access Server API from the XML configuration file and to retrieve a value of a configuration item. Clients are expected to call initialize method before any other API call.


Nested Class Summary
static class AccessClient.CompatibilityMode
           

 

Method Summary
static AccessClient createDefaultInstance(AccessClient.CompatibilityMode mode)
          Returns a reference to a Singleton object of AccessClient.
static AccessClient createDefaultInstance(java.lang.String configLocation, AccessClient.CompatibilityMode mode)
          Returns a reference to a Singleton object of AccessClient.
static AccessClient createInstance(java.lang.String loggerName, AccessClient.CompatibilityMode mode)
          Returns a reference to a new object of AccessClient.
static AccessClient createInstance(java.lang.String configLocation, java.lang.String loggerName, AccessClient.CompatibilityMode mode)
          Returns a reference to a new object of AccessClient.
 java.util.Hashtable getClientDiagnosticInfo()
          Returns the diagnostic information about the connectivity to OAM servers including host, port, time since when the connection is established and the server state.
 java.util.Hashtable getConfigurations()
          Returns all the configuration settings from the configuration file before connecting to the server, or the configuration fetched from the server
static AccessClient getDefaultInstance()
          Returns a reference to the Singleton object of AccessClient; if already created.
 java.util.Hashtable getDirectoryDiagnosticInfo()
          Returns the directory diagnostic information from the OAM 10g servers about the Directory Servers used to store User, Policy, Config information.
static java.lang.String getNAPVersion()
          Returns Oracle Access Protocol version.
static java.lang.String getSDKVersion()
          Returns the OAM Access SDK version number.
 java.util.Hashtable getServerDiagnosticInfo()
          Returns the diagnostic information from the OAM server containing server health, host, port, number of connections.
 boolean isInitialized()
          Checks if AccessClient is initialized or not.
 void shutdown()
          It disconnects client from the OAM server.

 

Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Method Detail

isInitialized

public boolean isInitialized()
Checks if AccessClient is initialized or not.
Returns:
Boolean true if AccessClient is initialized

createDefaultInstance

public static AccessClient createDefaultInstance(AccessClient.CompatibilityMode mode)
                                          throws AccessException
Returns a reference to a Singleton object of AccessClient. Creates the singleton object if one does not already exists.
In addition, it also performs initialization required before any ASDK api can be used. For initialization, it searches for the configuration file in locations in the order given below:
Parameters:
mode - indicates the compatibility mode to be used by the AccessClient object.
Returns:
A reference to the Singleton object of AccessClient.
Throws:
AccessException - In case of initialization failure.

createDefaultInstance

public static AccessClient createDefaultInstance(java.lang.String configLocation,
                                                 AccessClient.CompatibilityMode mode)
                                          throws AccessException
Returns a reference to a Singleton object of AccessClient. Creates the singleton object if one does not already exists.
ConfigLocation is a directory location where configuration file will be searched first underneath and if not found, it searches in a OAM 10g JNI ASDK sub directory path.Deprecated. The OAM 10g JNI ASDK sub directory is searched for backward compatibility. If the configuration file is not found, it will throw AccessException.
If configLocation is null, it searches for the configuration file in locations in the order given below:
Parameters:
configLocation - indicates the directory location of configuration file used for initializing the singleton AccessClient object.
mode - indicates the compatibility mode to be used by the AccessClient object.
Returns:
A reference to the Singleton object of AccessClient.
Throws:
AccessException - In case of initialization failure OR there is an reinitialization attempt detected by invoking with different configLocation.

getServerDiagnosticInfo

public final java.util.Hashtable getServerDiagnosticInfo()
                                                  throws AccessException
Returns the diagnostic information from the OAM server containing server health, host, port, number of connections.
Returns:
Hashtable containing server diagnostic information in name/value pairs of String type.
Throws:
AccessException - If OAM server fails to return the information

getDirectoryDiagnosticInfo

public final java.util.Hashtable getDirectoryDiagnosticInfo()
                                                     throws AccessException
Returns the directory diagnostic information from the OAM 10g servers about the Directory Servers used to store User, Policy, Config information. The information includes host, port, bind credentials, search base.
Returns:
Hashtable containing directory diagnostic information in name/value pairs of String type.
Throws:
AccessException - If OAM server fails to return the information

getClientDiagnosticInfo

public final java.util.Hashtable getClientDiagnosticInfo()
                                                  throws AccessException
Returns the diagnostic information about the connectivity to OAM servers including host, port, time since when the connection is established and the server state.
Returns:
Hashtable containing diagnostic information about the connectivity in name/value pairs of String type.
Throws:
AccessException - If diagnostic information cannot be fetched

createInstance

public static AccessClient createInstance(java.lang.String loggerName,
                                          AccessClient.CompatibilityMode mode)
                                   throws AccessException
Returns a reference to a new object of AccessClient.
In addition, it also performs initialization required before any ASDK api can be used. For initialization, it searches for the configuration file in locations in the order given below:
Parameters:
loggerName - indicates the name with which the Java Logger object would be created.
mode - indicates the compatibility mode to be used by the AccessClient object.
Returns:
A reference to a new object of AccessClient.
Throws:
AccessException - In case of initialization failure.

createInstance

public static AccessClient createInstance(java.lang.String configLocation,
                                          java.lang.String loggerName,
                                          AccessClient.CompatibilityMode mode)
                                   throws AccessException
Returns a reference to a new object of AccessClient.
ConfigLocation is a directory location where configuration file will be searched first underneath and if not found, it searches in a OAM 10g JNI ASDK sub directory path.Deprecated. The OAM 10g JNI ASDK sub directory is searched for backward compatibility.If the configuration file is not found, it will throw AccessException.
If configLocation is null, it searches for the configuration file in locations in the order given below:
Parameters:
configLocation - indicates the directory location of configuration file to be used while initializing the AccessClient object.
loggerName - indicates the name with which the Java Logger object would be created.
mode - indicates the compatibility mode to be used by the AccessClient object.
Returns:
A reference to a new object of AccessClient.
Throws:
AccessException - In case of initialization failure.

getConfigurations

public java.util.Hashtable getConfigurations()
                                      throws AccessException
Returns all the configuration settings from the configuration file before connecting to the server, or the configuration fetched from the server
Returns:
Hashtable containing the configuration vars in name/value pairs of String type.
Throws:
AccessException - If method is invoked before successful initialization

shutdown

public void shutdown()
It disconnects client from the OAM server.

getNAPVersion

public static java.lang.String getNAPVersion()
Returns Oracle Access Protocol version.
Returns:
String representing Oracle Access Protocol version.

getSDKVersion

public static java.lang.String getSDKVersion()
Returns the OAM Access SDK version number.
Returns:
String representing OAM Access SDK version number.

getDefaultInstance

public static AccessClient getDefaultInstance()
                                       throws AccessException
Returns a reference to the Singleton object of AccessClient; if already created.
Returns:
A reference to the Singleton object of AccessClient; if already created.
Throws:
AccessException - In case if Singleton object of AccessClient is not created or Singleton AccessClient object initialization fails.

Skip navigation links

Oracle Access Manager Access SDK Java API Reference
11g Release 1 (11.1.1)

E22472-01


Copyright © 2000,2011, Oracle® and/or its affiliates. All rights reserved.