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

java.lang.Object
  extended bycom.sap.ip.me.api.pios.connection.DriverInfo

public class DriverInfo
extends java.lang.Object

Represents a peripheral driver and can be used to obtain information of a driver before using it. Used by the ConnectionParameters class to select a driver for the connection to a peripheral.

Since:
MI 2.5
Author:
Abaco
See Also:
ConnectionParameters

Constructor Summary
protected DriverInfo(java.lang.String name, java.lang.String description, java.lang.Object connectionType)
          Creates a new DriverInfo object given the driver name, description, and connectionType.
 
Method Summary
protected  java.util.Properties getAttributes()
          Returns the driver attributes.
 DriverConfigurationManager getConfigurationManager()
          Returns the configuration manager for this driver.
 ConnectionType getConnectionType()
          Returns the connection type.
 java.lang.String getDescription()
          Returns the driver description.
 java.lang.String getName()
          Returns the driver name.
 java.lang.String getVersion()
          Returns the driver version.
 boolean isAttributeSupported(java.lang.String attributeName)
          Determine if a required functionality is supported by driver.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DriverInfo

protected DriverInfo(java.lang.String name,
                     java.lang.String description,
                     java.lang.Object connectionType)
Creates a new DriverInfo object given the driver name, description, and connectionType.

Parameters:
name - the driver name
description - the driver description
connectionType - type of connection
Method Detail

getName

public java.lang.String getName()
Returns the driver name.

Returns:
The driver name.

getDescription

public java.lang.String getDescription()
Returns the driver description.

Returns:
The driver description.

getConnectionType

public ConnectionType getConnectionType()
Returns the connection type.

Returns:
The connection typ for this instance.

getAttributes

protected java.util.Properties getAttributes()
                                      throws PIOSException
Returns the driver attributes. The attributes describes the driver supported functionality.

Returns:
An instance of the java.util.Properties object containing the driver attributes.
Throws:
PIOSException - thrown if the property file is missing or corrupted
See Also:
Properties

isAttributeSupported

public boolean isAttributeSupported(java.lang.String attributeName)
                             throws PIOSException
Determine if a required functionality is supported by driver. Example: Determine is a printer supports line mode
 

	Connector connector = Connector.getInstance();

	DriverInfo[] printers = connector.listDrivers(ConnectionType.PRINTER);

	if (printers[0].isAttributeSupported(PrinterConnection.Attributes.LINE_MODE)) {
		//Add some code here 	 
	} 

 
 

Parameters:
attributeName - name of the attribute
Returns:
true if functionality is supported else it returns false.
Throws:
PIOSException - thrown if unable to get attribute value

getConfigurationManager

public DriverConfigurationManager getConfigurationManager()
                                                   throws ConfigurationException
Returns the configuration manager for this driver.

Returns:
The configuration manager for this instance.
Throws:
ConfigurationException - thrown if there is an error while getting the configuration manager
See Also:
ConfigurationManager

getVersion

public java.lang.String getVersion()
                            throws PIOSException
Returns the driver version.

Returns:
the driver version
Throws:
PIOSException - thrown when unable to get version value


Copyright © 2005 SAP AG. All Rights Reserved.