2008-07-29 1.1.0

org.eclipse.soda.dk.barcode.reader.transport.managed
Class BarcodeReaderTransportManaged

java.lang.Object
  extended by TransportManaged
      extended by org.eclipse.soda.dk.barcode.reader.transport.managed.BarcodeReaderTransportManaged
All Implemented Interfaces:
BundleActivator

public class BarcodeReaderTransportManaged
extends TransportManaged
implements BundleActivator

Standard Barcode Reader.

The transport bundle activator class creates and registers the BarcodeReaderTransport transport.

The Device Kit properties keys and default values.

barcodereadertransport.baudrate 9600
barcodereadertransport.parity none
barcodereadertransport.writetotaltimeout 100
barcodereadertransport.softwareflowcontrol 0
barcodereadertransport.stopbits 1
barcodereadertransport.hardwareflowcontrol 0
barcodereadertransport.readintervaltimeout 50
barcodereadertransport.readtotaltimeout 1000
barcodereadertransport.comport 1
barcodereadertransport.databits 8
barcodereadertransport.localport -1
barcodereadertransport.readtimeout 1000
barcodereadertransport.host localhost
barcodereadertransport.readsize -1
barcodereadertransport.remoteport 8901
barcodereadertransport.linger -1
barcodereadertransport.writesize -1
barcodereadertransport.connection serial
barcodereadertransport.MessageMinimumSize 1
barcodereadertransport.baudrate=9600 barcodereadertransport.parity=none barcodereadertransport.writetotaltimeout=100 barcodereadertransport.softwareflowcontrol=0 barcodereadertransport.stopbits=1 barcodereadertransport.hardwareflowcontrol=0 barcodereadertransport.readintervaltimeout=50 barcodereadertransport.readtotaltimeout=1000 barcodereadertransport.comport=1 barcodereadertransport.databits=8 barcodereadertransport.localport=-1 barcodereadertransport.readtimeout=1000 barcodereadertransport.host=localhost barcodereadertransport.readsize=-1 barcodereadertransport.remoteport=8901 barcodereadertransport.linger=-1 barcodereadertransport.writesize=-1 barcodereadertransport.connection=serial barcodereadertransport.MessageMinimumSize=1

The list of exported services:

Version:
1.1.0
See Also:
BarcodeReaderTransportService, org.eclipse.soda.dk.transport.service.TransportService

Field Summary
static java.lang.String CLASS_NAME
          Defines the full class name.
static java.lang.String[] DEVICE_CATEGORY
          Defines the org.osgi.service.device.Constants.DEVICE_CATEGORY property.
static java.lang.String[] EXPORTED_SERVICE_NAMES
          Defines the service name(s) to be registered by the BarcodeReaderTransport bundle.
static java.lang.String[] IMPORTED_SERVICE_NAMES
          Defines the imported service name(s) to be registered by the BarcodeReaderTransport bundle.
 
Constructor Summary
BarcodeReaderTransportManaged()
           
 
Method Summary
 java.util.Hashtable createProperties()
          Gets the properties to be registered with the service(s).
 TransportService createService(ConnectionService connection)
          Creates the transport service to be registered with the OSGi system.
 java.lang.String[] getExportedServiceNames(java.lang.String pid, java.util.Dictionary oldProperties, java.util.Dictionary properties, org.eclipse.soda.sat.core.framework.interfaces.IBundleActivationManager manager)
          Return the exported service name(s) to be registered by the BarcodeReaderTransport bundle.
 java.lang.String[] getImportedServiceNames(java.lang.String pid, java.util.Dictionary oldProperties, java.util.Dictionary properties, org.eclipse.soda.sat.core.framework.interfaces.IBundleActivationManager manager)
          Return the imported service name(s) to be registered by the BarcodeReaderTransport bundle.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.osgi.framework.BundleActivator
start, stop
 

Field Detail

CLASS_NAME

public static final java.lang.String CLASS_NAME
Defines the full class name.

See Also:
Constant Field Values

DEVICE_CATEGORY

public static final java.lang.String[] DEVICE_CATEGORY
Defines the org.osgi.service.device.Constants.DEVICE_CATEGORY property.


EXPORTED_SERVICE_NAMES

public static final java.lang.String[] EXPORTED_SERVICE_NAMES
Defines the service name(s) to be registered by the BarcodeReaderTransport bundle.
org.eclipse.soda.dk.transport.service.TransportService


IMPORTED_SERVICE_NAMES

public static final java.lang.String[] IMPORTED_SERVICE_NAMES
Defines the imported service name(s) to be registered by the BarcodeReaderTransport bundle.
org.eclipse.soda.dk.connection.service.ConnectionService

Constructor Detail

BarcodeReaderTransportManaged

public BarcodeReaderTransportManaged()
Method Detail

createProperties

public java.util.Hashtable createProperties()
Gets the properties to be registered with the service(s).

Returns:
Hashtable of properties.
org.osgi.framework.Constants.SERVICE_RANKING 6
org.osgi.service.device.Constants.DEVICE_CATEGORY TransportService
org.eclipse.soda.dk.connection.bundle.ServiceBundle.DEVICE_CLASS BarcodeReader
org.osgi.framework.Constants.SERVICE_PID BarcodeReaderTransportService.SERVICE_NAME
org.osgi.service.device.Constants.DRIVER_ID BarcodeReaderTransport

createService

public TransportService createService(ConnectionService connection)
Creates the transport service to be registered with the OSGi system.

Parameters:
connection - The connection service to be used when creating this transport service.
Returns:
Object The transport service
See Also:
BarcodeReaderTransport

getExportedServiceNames

public java.lang.String[] getExportedServiceNames(java.lang.String pid,
                                                  java.util.Dictionary oldProperties,
                                                  java.util.Dictionary properties,
                                                  org.eclipse.soda.sat.core.framework.interfaces.IBundleActivationManager manager)
Return the exported service name(s) to be registered by the BarcodeReaderTransport bundle.

Parameters:
pid - pid.
oldProperties - old properties.
properties - properties.
manager - manager.
Returns:
String[] The transport's service names.

getImportedServiceNames

public java.lang.String[] getImportedServiceNames(java.lang.String pid,
                                                  java.util.Dictionary oldProperties,
                                                  java.util.Dictionary properties,
                                                  org.eclipse.soda.sat.core.framework.interfaces.IBundleActivationManager manager)
Return the imported service name(s) to be registered by the BarcodeReaderTransport bundle.

Parameters:
pid - pid.
oldProperties - old properties.
properties - properties.
manager - manager.
Returns:
String[] The imported service names.

2008-07-29 1.1.0

Copyright (c) 2008 IBM. See license in Legal section.