com.sap.ip.me.api.pios.connection
Class DriverConfigurationManager

java.lang.Object
  extended bycom.sap.ip.me.api.pios.configuration.ConfigurationManager
      extended bycom.sap.ip.me.api.pios.connection.DriverConfigurationManager

public class DriverConfigurationManager
extends ConfigurationManager

This class provides access to a driver configuration parameters including the transport configuration.

The normal use of the DriverConfigurationManager class to set the default transport parameters for a driver is as follows:
 
	DriverInfo driverInfo = Connector.getInstance().getDefaultDriver(ConnectionType.PRINTER);

	DriverConfigurationManager dcm = driverInfo.getConfigurationManager();

	String[] transports = dcm.listTransports();
 
	dcm.setDefaultTransport(transports[0]);
 
 

Since:
MI 2.5
Author:
Abaco
See Also:
ConnectionParameters

Constructor Summary
protected DriverConfigurationManager(ConfigurationManager configurationManager)
          Constructs a new DriverConfigurationManager using the specified meta data and configuration file.
 
Method Summary
 Configuration getConfiguration(java.lang.String name)
          Returns an instance to the Driver Configuration class for the specified transport.
 java.lang.String getDefaultTransport()
          Returns the default transport for a driver.
 java.lang.String[] listTransports()
          Returns a list containing the available transports for the specific driver.
 void save()
          Stores the configuration changes.
 void setDefaultTransport(java.lang.String name)
          Sets the default transport for a driver.
 
Methods inherited from class com.sap.ip.me.api.pios.configuration.ConfigurationManager
add, delete, get, getConfig, getHeaderName, getParamaterValue, getParameters, getPossibleValues, getTypes, list, list, setParameterValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DriverConfigurationManager

protected DriverConfigurationManager(ConfigurationManager configurationManager)
                              throws ConfigurationException
Constructs a new DriverConfigurationManager using the specified meta data and configuration file.

Parameters:
configurationManager - the configuration manager instance
Throws:
ConfigurationException - thrown if there is an error while loading the configuration or metadata files
Method Detail

setDefaultTransport

public void setDefaultTransport(java.lang.String name)
Sets the default transport for a driver.

Parameters:
name - the transport name

getDefaultTransport

public java.lang.String getDefaultTransport()
Returns the default transport for a driver.

Returns:
The default transport name.

listTransports

public java.lang.String[] listTransports()
                                  throws ConfigurationException
Returns a list containing the available transports for the specific driver. When no transports are supported an empty array is returned.

Returns:
A string array listing all the transports name.
Throws:
ConfigurationException - thrown if an error occurs while obtaining the list

getConfiguration

public Configuration getConfiguration(java.lang.String name)
                               throws ConfigurationException
Returns an instance to the Driver Configuration class for the specified transport.

Parameters:
name - the transport name
Returns:
Returns an instance of a Configuration class for the specified transport.
Throws:
ConfigurationException - thrown if an error occurs while getting transport configuration

save

public void save()
          throws ConfigurationException
Stores the configuration changes. Changes will be reflected after closing and opening the connection.

Overrides:
save in class ConfigurationManager
Throws:
ConfigurationException - thrown if an error occurs while saving the configuration file


Copyright © 2005 SAP AG. All Rights Reserved.