org.obe.client.api
Class ClientConfig

java.lang.Object
  extended byorg.obe.util.CommonConfig
      extended byorg.obe.client.api.ClientConfig

public final class ClientConfig
extends CommonConfig

Provides access to OBE client configuration information. OBE is configured by several XML and properties files, which can either be located in the OBE configuration directory or in the META-INF/services directory in obeconfig.jar. Resources in the latter location are accessed via this class's ClassLoader. The OBE configuration directory can be specified by the system property "obe.config.dir", defaulting to the current directory. Loose files take precedence over resources in obeconfig.jar.

The obe.properties file contains the OBE client configuration.

Author:
Adrian Price

Field Summary
static java.lang.String JAAS_CALLBACK_HANDLER_PROP
          Property key for the name of a JAAS callback handler class.
static java.lang.String JAAS_CALLER_PRINCIPAL_CLASS_PROP
          Property key for the primary JAAS principal class.
static java.lang.String JAAS_CONFIG_PROP
          Property key for the JAAS login configuration entry to use.
static java.lang.String JMS_QUEUE_CON_FACTORY_PROP
          Property key for the public JNDI name of a JMS queue connection factory.
static java.lang.String JMS_TOPIC_CON_FACTORY_PROP
          Property key for the public JNDI name of a JMS topic connection factory.
static java.lang.String JNDI_INITIAL_CONTEXT_FACTORY_PROP
          Property key for configuring an override to the default JNDI initial context factory whilst preserving the value of the latter.
static java.lang.String SERVER_HOST_URL_PROP
          Property key for the OBE server host URL.
static java.lang.String USE_STDIO_PROP
          Property key for whether client-side tool agents should use STDIO for user interactions.
 
Fields inherited from class org.obe.util.CommonConfig
_logger, _props, CONFIG_DIR_PROP, CONFIG_FILE, CREDENTIALS_PROP, DATE_FORMAT_PROP, DURATION_UNIT_PROP, PRINCIPAL_PROP, PROTOCOL_PROP
 
Method Summary
static java.lang.String getJAASCallbackHandlerClass()
          Returns the name of the JAAS callback handler to use for client authentication.
static java.lang.String getJAASCallerPrincipalClass()
          Returns the name of the javax.security.Principal class from which to infer the primary identity of an authenticated subject.
static java.lang.String getJAASConfig()
          Returns the name of the JAAS configuration entry to use for client authentication.
static java.lang.String getJMSQueueConnectionFactory()
          Returns the JNDI name of the JMS queue connection factory for clients.
static java.lang.String getJMSTopicConnectionFactory()
          Returns the JNDI name of the JMS topic connection factory for clients.
static java.lang.String getJNDIInitialContextFactoryClass()
          Returns an override for the JNDI property java.naming.factory.initial.
static java.lang.String getServerHostURL()
          Returns the OBE server host URL.
static boolean useSTDIO()
          Whether client-side tool agents should use STDIO for user interactions.
 
Methods inherited from class org.obe.util.CommonConfig
findResource, getBooleanProperty, getConfigDir, getCredentials, getDefaultDateFormat, getDefaultDurationUnit, getIntProperty, getPrincipal, getProtocol, getStringProperty, openInputSource, openInputStream, openOutputStream, openReader
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

JNDI_INITIAL_CONTEXT_FACTORY_PROP

public static final java.lang.String JNDI_INITIAL_CONTEXT_FACTORY_PROP
Property key for configuring an override to the default JNDI initial context factory whilst preserving the value of the latter.

See Also:
Constant Field Values

JAAS_CALLBACK_HANDLER_PROP

public static final java.lang.String JAAS_CALLBACK_HANDLER_PROP
Property key for the name of a JAAS callback handler class.

See Also:
Constant Field Values

JAAS_CALLER_PRINCIPAL_CLASS_PROP

public static final java.lang.String JAAS_CALLER_PRINCIPAL_CLASS_PROP
Property key for the primary JAAS principal class.

See Also:
Constant Field Values

JAAS_CONFIG_PROP

public static final java.lang.String JAAS_CONFIG_PROP
Property key for the JAAS login configuration entry to use.

See Also:
Constant Field Values

USE_STDIO_PROP

public static final java.lang.String USE_STDIO_PROP
Property key for whether client-side tool agents should use STDIO for user interactions.

See Also:
Constant Field Values

JMS_QUEUE_CON_FACTORY_PROP

public static final java.lang.String JMS_QUEUE_CON_FACTORY_PROP
Property key for the public JNDI name of a JMS queue connection factory.

See Also:
Constant Field Values

JMS_TOPIC_CON_FACTORY_PROP

public static final java.lang.String JMS_TOPIC_CON_FACTORY_PROP
Property key for the public JNDI name of a JMS topic connection factory.

See Also:
Constant Field Values

SERVER_HOST_URL_PROP

public static final java.lang.String SERVER_HOST_URL_PROP
Property key for the OBE server host URL.

See Also:
Constant Field Values
Method Detail

useSTDIO

public static boolean useSTDIO()
Whether client-side tool agents should use STDIO for user interactions.

The setting reflects the boolean value of the configuration property obe.client.stdio. Default is false.

Returns:
true to interact via STDIO, false to present a graphical UI.
See Also:
USE_STDIO_PROP

getJAASConfig

public static java.lang.String getJAASConfig()
Returns the name of the JAAS configuration entry to use for client authentication.

The setting reflects the string value of the configuration property obe.client.jaas.config.

Returns:
JAAS configuration entry name, defaulting to "other".
See Also:
JAAS_CONFIG_PROP

getJMSQueueConnectionFactory

public static java.lang.String getJMSQueueConnectionFactory()
Returns the JNDI name of the JMS queue connection factory for clients.

The setting reflects the string value of the configuration property obe.jms.queue.connection.factory.

Returns:
JMS connection factory JNDI name, defaulting to "ConnectionFactory".
See Also:
JMS_QUEUE_CON_FACTORY_PROP

getJMSTopicConnectionFactory

public static java.lang.String getJMSTopicConnectionFactory()
Returns the JNDI name of the JMS topic connection factory for clients.

The setting reflects the string value of the configuration property obe.jms.topic.connection.factory.

Returns:
JMS connection factory JNDI name, defaulting to "ConnectionFactory".
See Also:
JMS_TOPIC_CON_FACTORY_PROP

getJAASCallbackHandlerClass

public static java.lang.String getJAASCallbackHandlerClass()
Returns the name of the JAAS callback handler to use for client authentication.

The setting reflects the string value of the configuration property obe.client.jaas.callback.handler. The implementing class must have a public constructor that takes the following arguments:

(String url, String username, String password)

Returns:
JAAS callback handler class name, defaulting to "org.obe.client.api.base.OBECallbackHandler".
See Also:
JAAS_CALLBACK_HANDLER_PROP

getJAASCallerPrincipalClass

public static java.lang.String getJAASCallerPrincipalClass()
Returns the name of the javax.security.Principal class from which to infer the primary identity of an authenticated subject. If null, the client uses the first non-group principal in the authenticated subject.

The setting reflects the string value of the configuration property obe.jaas.caller.principal.class.

Returns:
JAAS callback handler class name, defaulting to null.
See Also:
JAAS_CALLER_PRINCIPAL_CLASS_PROP

getJNDIInitialContextFactoryClass

public static java.lang.String getJNDIInitialContextFactoryClass()
Returns an override for the JNDI property java.naming.factory.initial. Generally speaking there is no reason to set this property. It should only be used if the OBE client needs to bypass the standard JNDI initial context factory as specified by the system property java.naming.factory.initial. For example, certain RPC tunnelling protocols wrap default JNDI objects with their own marshalling mechanism.

The setting reflects the string value of the configuration property obe.client.java.naming.factory.initial.

Returns:
JAAS callback handler class name, defaulting to null.
See Also:
JNDI_INITIAL_CONTEXT_FACTORY_PROP

getServerHostURL

public static java.lang.String getServerHostURL()
Returns the OBE server host URL.

The setting reflects the string value of the configuration property obe.server.host.

Returns:
Server host name, defaulting to "jnp://localhost:1099".
See Also:
SERVER_HOST_URL_PROP


SourceForge.net Logo OBE-1.0 Copyright (c) 2002-2006 Adrian Price. All Rights Reserved.