Oracle Entitlements Server for Java API Reference

com.bea.security
Class AppConfig

java.lang.Object
  |
  +--com.bea.security.AppConfig

public class AppConfig
extends java.lang.Object
implements PDPProxyClientConfiguration

The AppConfig class is a representation of the configuration of your Java application. You pass an AppConfig object into the security runtime instance when you initialize it. The AppConfig object is used to configure the security runtime based upon the configuration of your application. This object includes a name for the runtime application, which can be used for monitoring purposes, and it also provides a method for adding an XML file that contains naming authority definitions. On initialization of the security runtime instance, the XML file is loaded into the Naming Authority Manager.

Author:
Copyright © 2004-2008, Oracle and/or its affiliates. All rights reserved.

Field Summary
static java.lang.String PDP_SERVER_FAILBACK_TIMEOUT
           
static java.lang.String PDP_SERVER_FAILURE_RETRY_COUNT
           
static java.lang.String PDP_SERVER_REQUEST_TIMEOUT
           
 
Constructor Summary
AppConfig()
          Constructs an application configuration object with default values.
AppConfig(java.lang.String applicationname)
          Constructs an application configuration object and sets the name of the application using the security runtime.
AppConfig(java.lang.String applicationname, java.util.Properties clientConfig)
          Constructs an application configuration object and sets the name of the application using the security runtime.
 
Method Summary
 void addNameAuthorityDefinitionFile(java.lang.String filespec)
          Adds an xml file that contains naming authority definitions to the configuration object.
 java.lang.String getApplicationName()
          Gets the name of the application from the configuration object.
 java.lang.String getClientUID()
          Get unique ID for the PDP Client proxy.
 int getFailbackTimeout()
          Get failback timeout value set.
 int getFailureRetryCount()
          Get maximum attempts to try before failing over to an alternate server
 java.util.Properties getPDPConfiguration()
          Get currentlt set PDPProperties configuration
 java.lang.String[] getPolicyDomainURLs()
          Get list of policy domains, return comma seperated list of PDP URLs
 int getRequestTimeout()
          Get request timeout value set.
 java.lang.String getServerTransport()
          Get configured transport type for the PDP Client.
 java.lang.String getSSMConfigID()
          Get unique ID for the PDP Client proxy.
 java.lang.String getTrustStore()
          Get current trust store.
 void setApplicationName(java.lang.String applicationname)
          Sets the name of the application in this configuration object.
 void setClientUID(java.lang.String uid)
          Set unique ID for the PDP Client proxy.
 void setFailbackTimeout(int timeout)
          Set request timeout value, if the client does not have successful connection.
 void setFailureRetryCount(int count)
          Set maximum attempts to try before failing over to an alternate server
 void setPolicyDomainURLs(java.lang.String a_urls)
          Set list of policy domains, comma seperated list of PDP URLs
 void setPolicyDomainURLs(java.lang.String[] a_urls)
          Set list of policy domains, comma seperated list of PDP URLs
 void setRequestTimeout(int timeout)
          Set request timeout value, if the client does not have successful connection.
 void setServerTransport(java.lang.String a_transport)
          Set transport to use, could be one of TRANSPORT_TYPE_?
 void setServiceControlManagerPort(int port)
          Sets the port used by the Service Control Manager.
 void setSSMConfigID(java.lang.String configID)
          Set configuration ID for the SSM
 void setTrustStore(java.lang.String trustStore)
          Set the trust store configuration for 1-way ssl configuration; the java option -Djavax.net.ssl.trustStore=c:/demo.jks would overide the call to set
 void useConfiguration(java.lang.String configurationname)
          Indicate which configurations we need to retrieve from the configuration repository.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PDP_SERVER_REQUEST_TIMEOUT

public static java.lang.String PDP_SERVER_REQUEST_TIMEOUT

PDP_SERVER_FAILURE_RETRY_COUNT

public static java.lang.String PDP_SERVER_FAILURE_RETRY_COUNT

PDP_SERVER_FAILBACK_TIMEOUT

public static java.lang.String PDP_SERVER_FAILBACK_TIMEOUT
Constructor Detail

AppConfig

public AppConfig()
Constructs an application configuration object with default values. The application name defaults to the network name of the machine on which it runs. If the machine has no network name then the application name is set to "Unknown".

AppConfig

public AppConfig(java.lang.String applicationname,
                 java.util.Properties clientConfig)
Constructs an application configuration object and sets the name of the application using the security runtime.

Parameters:
applicationname - the name of the application using this runtime.
clientConfig - properties file with PDPClient Configuration.

AppConfig

public AppConfig(java.lang.String applicationname)
Constructs an application configuration object and sets the name of the application using the security runtime.

Parameters:
applicationname - the name of the application using this runtime.
Method Detail

setApplicationName

public void setApplicationName(java.lang.String applicationname)
Sets the name of the application in this configuration object.

Parameters:
applicationname - the name of the application using this security runtime.

setServiceControlManagerPort

public void setServiceControlManagerPort(int port)
Sets the port used by the Service Control Manager. This method only needs to be called if the port in use is different than the default port.

Parameters:
port - the port the SCM listens on for the runtime to get its settings.

useConfiguration

public void useConfiguration(java.lang.String configurationname)
Indicate which configurations we need to retrieve from the configuration repository. Policydomains share the name of their configuration. This method must be called once for every configuration this SSM requires.

Parameters:
configurationname - the name of the configuration to retrieve from the repository.

getApplicationName

public java.lang.String getApplicationName()
Gets the name of the application from the configuration object.

Returns:
the name of the application using this security runtime.

addNameAuthorityDefinitionFile

public void addNameAuthorityDefinitionFile(java.lang.String filespec)
                                    throws java.io.FileNotFoundException
Adds an xml file that contains naming authority definitions to the configuration object. On initialization of the security runtime instance, this file is loaded into the naming authority manager.

Throws:
java.io.FileNotFoundException - This exception is thrown if the file specified is not present.

setClientUID

public void setClientUID(java.lang.String uid)
Set unique ID for the PDP Client proxy.
Specified by:
setClientUID in interface PDPProxyClientConfiguration

Parameters:
uid - Unique PDPProxy Client ID

getClientUID

public java.lang.String getClientUID()
Get unique ID for the PDP Client proxy.
Specified by:
getClientUID in interface PDPProxyClientConfiguration

Returns:
uid for the client

setSSMConfigID

public void setSSMConfigID(java.lang.String configID)
Set configuration ID for the SSM

Parameters:
uid - Unique PDPProxy Client ID

getSSMConfigID

public java.lang.String getSSMConfigID()
Get unique ID for the PDP Client proxy.

Returns:
uid for the client

setServerTransport

public void setServerTransport(java.lang.String a_transport)
Set transport to use, could be one of TRANSPORT_TYPE_? types above.
Specified by:
setServerTransport in interface PDPProxyClientConfiguration

Parameters:
uid - Unique PDPProxy Client ID

getServerTransport

public java.lang.String getServerTransport()
Get configured transport type for the PDP Client.
Specified by:
getServerTransport in interface PDPProxyClientConfiguration

Returns:
transport configured, could be one of TRANSPORT_TYPE_? types.

setPolicyDomainURLs

public void setPolicyDomainURLs(java.lang.String a_urls)
Set list of policy domains, comma seperated list of PDP URLs

Parameters:
urls - comma seperated list of http://host1:port1, http://host2:port2

setPolicyDomainURLs

public void setPolicyDomainURLs(java.lang.String[] a_urls)
Set list of policy domains, comma seperated list of PDP URLs
Specified by:
setPolicyDomainURLs in interface PDPProxyClientConfiguration

Parameters:
urls - comma seperated list of http://host1:port1, http://host2:port2

getPolicyDomainURLs

public java.lang.String[] getPolicyDomainURLs()
Get list of policy domains, return comma seperated list of PDP URLs
Specified by:
getPolicyDomainURLs in interface PDPProxyClientConfiguration

Returns:
urls comma seperated list of http://host1:port1, http://host2:port2

setFailureRetryCount

public void setFailureRetryCount(int count)
Set maximum attempts to try before failing over to an alternate server
Specified by:
setFailureRetryCount in interface PDPProxyClientConfiguration

Parameters:
count - max attempts

getFailureRetryCount

public int getFailureRetryCount()
Get maximum attempts to try before failing over to an alternate server
Specified by:
getFailureRetryCount in interface PDPProxyClientConfiguration

Returns:
max attempts

setRequestTimeout

public void setRequestTimeout(int timeout)
Set request timeout value, if the client does not have successful connection.
Specified by:
setRequestTimeout in interface PDPProxyClientConfiguration

Parameters:
ttl - value in milli seconds

getRequestTimeout

public int getRequestTimeout()
Get request timeout value set.
Specified by:
getRequestTimeout in interface PDPProxyClientConfiguration

Returns:
request time out in milli seconds

setFailbackTimeout

public void setFailbackTimeout(int timeout)
Set request timeout value, if the client does not have successful connection.
Specified by:
setFailbackTimeout in interface PDPProxyClientConfiguration

Parameters:
ttl - value in milli seconds

getFailbackTimeout

public int getFailbackTimeout()
Get failback timeout value set.
Specified by:
getFailbackTimeout in interface PDPProxyClientConfiguration

Returns:
failback time out in milli seconds

getPDPConfiguration

public java.util.Properties getPDPConfiguration()
Get currentlt set PDPProperties configuration

Returns:
 

setTrustStore

public void setTrustStore(java.lang.String trustStore)
Set the trust store configuration for 1-way ssl configuration; the java option -Djavax.net.ssl.trustStore=c:/demo.jks would overide the call to set
Specified by:
setTrustStore in interface PDPProxyClientConfiguration

Parameters:
trustStore - Fully qualified path for the key store

getTrustStore

public java.lang.String getTrustStore()
Get current trust store.
Specified by:
getTrustStore in interface PDPProxyClientConfiguration

Returns:
trustStore Fully qualified path for the key store