1.0.0

org.eclipse.soda.dk.gps.nmea.transport.factory
Class GpsNmeaTransportFactory

java.lang.Object
  extended by TransportFactory
      extended by org.eclipse.soda.dk.gps.nmea.transport.factory.GpsNmeaTransportFactory

public class GpsNmeaTransportFactory
extends TransportFactory

GPS NMEA Transport.

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

The devicekit properties keys and default values.

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

The list of exported services:

Version:
1.0.0
See Also:
GpsNmeaTransportService, org.eclipse.soda.dk.transport.service.TransportService

Field Summary
static java.lang.String CLASS_NAME
          Defines the 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 GpsNmeaTransport bundle.
static java.lang.String[] IMPORTED_SERVICE_NAMES
          Defines the imported service name(s) to be registered by the GpsNmeaTransport bundle.
 
Constructor Summary
GpsNmeaTransportFactory()
           
 
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 GpsNmeaTransport 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 GpsNmeaTransport bundle.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CLASS_NAME

public static final java.lang.String CLASS_NAME
Defines the 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 GpsNmeaTransport 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 GpsNmeaTransport bundle.
org.eclipse.soda.dk.connection.service.ConnectionService

Constructor Detail

GpsNmeaTransportFactory

public GpsNmeaTransportFactory()
Method Detail

createProperties

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

Returns:
Hashtable of properties.
org.eclipse.soda.dk.connection.bundle.ServiceBundle.DEVICE_CLASS GpsNmea
org.osgi.framework.Constants.SERVICE_PID GpsNmeaTransportService.SERVICE_NAME
org.osgi.framework.Constants.SERVICE_DESCRIPTION GPS NMEA Transport
org.osgi.framework.Constants.SERVICE_VENDOR IBM
org.osgi.service.device.Constants.DRIVER_ID GpsNmeaTransport
org.osgi.framework.Constants.SERVICE_RANKING 6
org.osgi.service.device.Constants.DEVICE_CATEGORY TransportService
org.eclipse.soda.dk.connection.bundle.ServiceBundle.DEVICE_REVISION 1.0.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
See Also:
GpsNmeaTransport

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 GpsNmeaTransport bundle.

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,
                                                  IBundleActivationManager manager)
Return the imported service name(s) to be registered by the GpsNmeaTransport bundle.

Returns:
String[] The imported service names.

1.0.0

Copyright (c) 2007 IBM