com.simba.dsi.core.interfaces
Interface IEnvironment

All Known Implementing Classes:
DSIEnvironment

public interface IEnvironment

An IEnvironment handles environment properties and connections.


Method Summary
 void close()
          Closes the environment and releases any resources held by it.
 IConnection createConnection()
          Factory method for creating IConnections.
 IConnection createConnection(com.simba.support.security.ICredentials credentials)
          Factory method for creating IConnections with integrated security.
 com.simba.support.IMessageSource getMessageSource()
          Gets the message source associated with this IEnvironment.
 Variant getProperty(int propKey)
          Gets the property as identified by the given property key.
 com.simba.support.IWarningListener getWarningListener()
          Gets the warning listener for this environment.
 void registerWarningListener(com.simba.support.IWarningListener listener)
          Registers a warning listener for allowing the IEnvironment to post warnings.
 void setProperty(int propKey, Variant propValue)
          Sets a property, as identified by the given property key, with the given property value.
 

Method Detail

close

void close()
Closes the environment and releases any resources held by it.


createConnection

IConnection createConnection()
                             throws com.simba.support.exceptions.ErrorException
Factory method for creating IConnections.

Returns:
IConnection
Throws:
com.simba.support.exceptions.ErrorException - if an error occurs.
See Also:
IConnection

createConnection

IConnection createConnection(com.simba.support.security.ICredentials credentials)
                             throws com.simba.support.exceptions.ErrorException,
                                    javax.naming.OperationNotSupportedException
Factory method for creating IConnections with integrated security. This will only be called when integrated security is turned on via the DSI_DRIVER_SUPPORTS_INTEGRATED_SECURITY driver property. See the documentation for that property for details on how this method gets called. Default implementation throws OperationNotSupportedException

Parameters:
credentials - Integrated security credentials.
Returns:
IConnection
Throws:
com.simba.support.exceptions.ErrorException - If an error occurs.
javax.naming.OperationNotSupportedException - If this method is called when DSII has not implemented this method.
See Also:
IConnection

getMessageSource

com.simba.support.IMessageSource getMessageSource()
Gets the message source associated with this IEnvironment.

Returns:
The message source.

getProperty

Variant getProperty(int propKey)
                    throws BadPropertyKeyException,
                           com.simba.support.exceptions.ErrorException
Gets the property as identified by the given property key.

Parameters:
propKey - Property key associated with an environment property.
Returns:
Property value associated with the given property key.
Throws:
BadPropertyKeyException - If the input key is not valid.
com.simba.support.exceptions.ErrorException - If an unspecified error occurs.
See Also:
Variant

getWarningListener

com.simba.support.IWarningListener getWarningListener()
Gets the warning listener for this environment.

Returns:
The warning listener for this environment.

registerWarningListener

void registerWarningListener(com.simba.support.IWarningListener listener)
Registers a warning listener for allowing the IEnvironment to post warnings.

Parameters:
listener - The listener to register with this IEnvironment.

setProperty

void setProperty(int propKey,
                 Variant propValue)
                 throws BadAttrValException,
                        OptionalFeatureNotImplementedException,
                        com.simba.support.exceptions.ErrorException
Sets a property, as identified by the given property key, with the given property value. If the value is substituted with another value before storage, an OPT_VAL_CHANGED_WARNING warning should be posted in the warnings holder. For properties which accept more than just a discrete set of values, this method should throw an BadAttrValException if an illegal value is given which can't be substituted with another value.

Parameters:
propKey - Property key associated with an environment property.
propValue - Property value to be set on the environment property associated with the given property key.
Throws:
BadAttrValException - If the input value is not valid for the key.
OptionalFeatureNotImplementedException - If the key is EnvPropertyKey.DSI_ENV_OUTPUT_NTS and the value is EnvPropertyValues.DSI_PROP_FALSE.
com.simba.support.exceptions.ErrorException - If an unspecified error occurs.
See Also:
Variant


Copyright © 2006-2014 Simba Technologies Incorporated. All Rights Reserved.