BEA Systems, Inc.

BEA AquaLogic Enterprise Security for Java 2.1 API Reference

com.bea.security
Class AppConfig

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

public class AppConfig
extends java.lang.Object

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 BEA Systems, Inc. All Rights Reserved.

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.
 
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.
 void setApplicationName(java.lang.String applicationname)
          Sets the name of the application in this configuration object.
 void setServiceControlManagerPort(int port)
          Sets the port used by the Service Control Manager.
 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
 

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)
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.

Documentation is available at
http://edocs.bea.com/ales/docs21