2010-01-22 1.2.0

org.eclipse.soda.dk.matrix.lcd.transport.managed
Class MatrixLcdTransportManaged

java.lang.Object
  extended by TransportManaged
      extended by org.eclipse.soda.dk.matrix.lcd.transport.managed.MatrixLcdTransportManaged
All Implemented Interfaces:
BundleActivator

public class MatrixLcdTransportManaged
extends TransportManaged
implements BundleActivator

Matrix Lcd Transport.

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

The Device Kit properties CONNECTION_KEYS and default values.

matrixlcdtransport.databits 8
matrixlcdtransport.comport 1
matrixlcdtransport.readtotaltimeout 1000
matrixlcdtransport.readintervaltimeout 100
matrixlcdtransport.hardwareflowcontrol 0
matrixlcdtransport.softwareflowcontrol 0
matrixlcdtransport.stopbits 1
matrixlcdtransport.writetotaltimeout 100
matrixlcdtransport.parity none
matrixlcdtransport.baudrate 19200
matrixlcdtransport.writesize -1
matrixlcdtransport.linger -1
matrixlcdtransport.readsize -1
matrixlcdtransport.remoteport 9234
matrixlcdtransport.host localhost
matrixlcdtransport.readtimeout 1000
matrixlcdtransport.localport -1
matrixlcdtransport.connection serial
matrixlcdtransport.databits=8 matrixlcdtransport.comport=1 matrixlcdtransport.readtotaltimeout=1000 matrixlcdtransport.readintervaltimeout=100 matrixlcdtransport.hardwareflowcontrol=0 matrixlcdtransport.softwareflowcontrol=0 matrixlcdtransport.stopbits=1 matrixlcdtransport.writetotaltimeout=100 matrixlcdtransport.parity=none matrixlcdtransport.baudrate=19200 matrixlcdtransport.writesize=-1 matrixlcdtransport.linger=-1 matrixlcdtransport.readsize=-1 matrixlcdtransport.remoteport=9234 matrixlcdtransport.host=localhost matrixlcdtransport.readtimeout=1000 matrixlcdtransport.localport=-1 matrixlcdtransport.connection=serial

The list of exported services:

Since:
1.0
Version:
1.2.0
See Also:
MatrixLcdTransportService, 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 MatrixLcdTransport bundle.
static java.lang.String[] IMPORTED_SERVICE_NAMES
          Defines the imported service name(s) to be registered by the MatrixLcdTransport bundle.
 
Constructor Summary
MatrixLcdTransportManaged()
           
 
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, IBundleActivationManager manager)
          Return the exported service name(s) to be registered by the MatrixLcdTransport bundle.
 java.lang.String[] getImportedServiceNames(java.lang.String pid, java.util.Dictionary oldProperties, java.util.Dictionary properties, IBundleActivationManager manager)
          Return the imported service name(s) to be registered by the MatrixLcdTransport 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.

Since:
1.0
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.

Since:
1.0

EXPORTED_SERVICE_NAMES

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

Since:
1.0

IMPORTED_SERVICE_NAMES

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

Since:
1.0
Constructor Detail

MatrixLcdTransportManaged

public MatrixLcdTransportManaged()
Method Detail

createProperties

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

Returns:
Hashtable of properties.
org.osgi.service.device.Constants.DRIVER_ID MatrixLcdTransport
org.osgi.framework.Constants.SERVICE_PID MatrixLcdTransportService.SERVICE_NAME
org.eclipse.soda.dk.connection.bundle.ServiceBundle.DEVICE_CLASS MatrixLcd
org.osgi.service.device.Constants.DEVICE_CATEGORY TransportService
org.osgi.framework.Constants.SERVICE_RANKING 6
Since:
1.0

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
Since:
1.0
See Also:
MatrixLcdTransport

getExportedServiceNames

public java.lang.String[] getExportedServiceNames(java.lang.String pid,
                                                  java.util.Dictionary oldProperties,
                                                  java.util.Dictionary properties,
                                                  IBundleActivationManager manager)
Return the exported service name(s) to be registered by the MatrixLcdTransport bundle.

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

getImportedServiceNames

public java.lang.String[] getImportedServiceNames(java.lang.String pid,
                                                  java.util.Dictionary oldProperties,
                                                  java.util.Dictionary properties,
                                                  IBundleActivationManager manager)
Return the imported service name(s) to be registered by the MatrixLcdTransport bundle.

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

2010-01-22 1.2.0

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