1.0.0

org.eclipse.soda.dk.transport.test.managed
Class TransportTestManaged

java.lang.Object
  extended by BaseBundleActivator
      extended by org.eclipse.soda.dk.transport.test.managed.TransportTestManaged
All Implemented Interfaces:
org.osgi.service.cm.ManagedService

public abstract class TransportTestManaged
extends BaseBundleActivator
implements org.osgi.service.cm.ManagedService

The TransportBundle is the standard Bundle Activator for all other transport bundle activators to subclass.

Version:
1.0.0

Constructor Summary
TransportTestManaged()
           
 
Method Summary
protected  void activate()
          Create exported services.
 java.util.Hashtable createManagedProperties()
          Create managed properties and return the Hashtable result.
 java.util.Hashtable createProperties()
          Create the properties.
abstract  TransportTestService createService(TransportService transport)
          Creates and returns the transport service to be registered.
 void createTransportTest(java.util.Dictionary properties, TransportService transport)
          Create transport with the specified properties and connection parameters.
protected  void deactivate()
          Deactivate.
 ConnectionService getDefaultConnection()
          Gets the default connection to be used by this transport service.
 java.lang.String[] getExportedServiceNames()
          Gets the exported service names (String[]) value.
 java.util.Dictionary getManagedProperties()
          Gets the managed properties (Dictionary) value.
 java.lang.String getServiceName()
          Return the service name to be registered.
 TransportService getTransport()
          Gets the transport (TransportService) value.
 TransportTestService getTransportTest()
          Gets the transport (TransportService) value.
protected  void handleAcquiredImportedService(java.lang.Object service)
          Handle acquired imported service with the specified service parameter.
protected  void handleReleasedImportedService(java.lang.Object service)
          Handle released imported service with the specified service parameter.
 boolean isFactoryConnection()
          Gets the factory connection (boolean) value.
 boolean isFactoryConnection(java.util.Dictionary properties)
          Is factory connection with the specified properties parameter and return the boolean result.
 void log(int severity, java.lang.String message)
          Log with the specified severity and message parameters.
 void log(int severity, java.lang.String message, java.lang.Throwable exception)
          Log with the specified severity, message and exception parameters.
protected  boolean requiresAllImportedServices()
          Requires all imported services and return the boolean result.
 void setFactoryConnection(boolean factoryConnection)
          Sets the factory connection value.
 void setManagedProperties(java.util.Dictionary managedProperties)
          Sets the managed properties value.
 void setTransport(TransportService transport)
          Sets the transport value.
 void setTransportTest(TransportTestService transportTest)
          Sets the transport value.
 void updated(java.util.Dictionary properties)
          Updated with the specified properties parameter.
 void updateProperties(java.util.Dictionary table, java.util.Dictionary from)
          Update properties with the specified table and from parameters.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TransportTestManaged

public TransportTestManaged()
Method Detail

activate

protected void activate()
Create exported services.


createManagedProperties

public java.util.Hashtable createManagedProperties()
Create managed properties and return the Hashtable result.

Returns:
Results of the create managed properties (Hashtable) value.
See Also:
getManagedProperties(), setManagedProperties(Dictionary)

createProperties

public java.util.Hashtable createProperties()
Create the properties.

Returns:
Results of the create properties (Hashtable) value.
See Also:
createManagedProperties(), getManagedProperties(), setManagedProperties(Dictionary), updateProperties(Dictionary,Dictionary)

createService

public abstract TransportTestService createService(TransportService transport)
Creates and returns the transport service to be registered. Subclasses must override this method. The connection (TransportService) parameter.

Parameters:
transport - The transport (TransportService) parameter.
Returns:
Results of the create service (Object) value.
See Also:
handleAcquiredImportedService(Object), handleReleasedImportedService(Object)

createTransportTest

public void createTransportTest(java.util.Dictionary properties,
                                TransportService transport)
Create transport with the specified properties and connection parameters. The properties (Dictionary) parameter. The connection (TransportService) parameter.

Parameters:
properties - The properties (Dictionary) parameter.
transport - The transport (TransportService) parameter.
See Also:
getTransportTest(), setTransportTest(TransportTestService)

deactivate

protected void deactivate()
Deactivate.


getDefaultConnection

public ConnectionService getDefaultConnection()
Gets the default connection to be used by this transport service. Normally, subclasses should override this method.

Returns:
Results of the get default connection (TransportService) value.

getExportedServiceNames

public java.lang.String[] getExportedServiceNames()
Gets the exported service names (String[]) value.

Returns:
The exported service names (String[]) value.

getManagedProperties

public java.util.Dictionary getManagedProperties()
Gets the managed properties (Dictionary) value.

Returns:
The managed properties (Dictionary) value.
See Also:
createManagedProperties(), setManagedProperties(Dictionary)

getServiceName

public java.lang.String getServiceName()
Return the service name to be registered. Normally, subclasses should override this method.

Returns:
Results of the get service name (String) value.

getTransport

public TransportService getTransport()
Gets the transport (TransportService) value.

Returns:
The transport (TransportService) value.
See Also:
setTransport(TransportService)

getTransportTest

public TransportTestService getTransportTest()
Gets the transport (TransportService) value.

Returns:
The transport (TransportService) value.
See Also:
createTransportTest(Dictionary,TransportService), setTransportTest(TransportTestService)

handleAcquiredImportedService

protected void handleAcquiredImportedService(java.lang.Object service)
Handle acquired imported service with the specified service parameter. The service (Object) parameter.

Parameters:
service - The service (Object) parameter.

handleReleasedImportedService

protected void handleReleasedImportedService(java.lang.Object service)
Handle released imported service with the specified service parameter. The service (Object) parameter.

Parameters:
service - The service (Object) parameter.

isFactoryConnection

public boolean isFactoryConnection(java.util.Dictionary properties)
Is factory connection with the specified properties parameter and return the boolean result. The properties (Dictionary) parameter.

Parameters:
properties - The properties (Dictionary) parameter.
Returns:
Results of the is factory connection (boolean) value.
See Also:
isFactoryConnection(), setFactoryConnection(boolean)

isFactoryConnection

public boolean isFactoryConnection()
Gets the factory connection (boolean) value.

Returns:
The factory connection (boolean) value.
See Also:
isFactoryConnection(Dictionary), setFactoryConnection(boolean)

log

public void log(int severity,
                java.lang.String message)
Log with the specified severity and message parameters. The severity (int) parameter. The message (String) parameter.

Parameters:
severity - The severity (int) parameter.
message - The message (String) parameter.
See Also:
log(int,String,Throwable)

log

public void log(int severity,
                java.lang.String message,
                java.lang.Throwable exception)
Log with the specified severity, message and exception parameters. The severity (int) parameter. The message (String) parameter. The exception (Throwable) parameter.

Parameters:
severity - The severity (int) parameter.
message - The message (String) parameter.
exception - The exception (Throwable) parameter.
See Also:
log(int,String)

requiresAllImportedServices

protected boolean requiresAllImportedServices()
Requires all imported services and return the boolean result.

Returns:
Results of the requires all imported services (boolean) value.

setFactoryConnection

public void setFactoryConnection(boolean factoryConnection)
Sets the factory connection value. The factory connection (boolean) parameter.

Parameters:
factoryConnection - The factory connection (boolean) parameter.
See Also:
isFactoryConnection(Dictionary), isFactoryConnection()

setManagedProperties

public void setManagedProperties(java.util.Dictionary managedProperties)
Sets the managed properties value. The managed properties (Dictionary) parameter.

Parameters:
managedProperties - The managed properties (Dictionary) parameter.
See Also:
createManagedProperties(), getManagedProperties()

setTransport

public void setTransport(TransportService transport)
Sets the transport value.

Parameters:
transport - The transport (TransportService) parameter.
See Also:
getTransport()

setTransportTest

public void setTransportTest(TransportTestService transportTest)
Sets the transport value. The transport (TransportService) parameter.

Parameters:
transportTest - The transport test (TransportTestService) parameter.
See Also:
createTransportTest(Dictionary,TransportService), getTransportTest()

updateProperties

public void updateProperties(java.util.Dictionary table,
                             java.util.Dictionary from)
Update properties with the specified table and from parameters. The table (Dictionary) parameter. The from (Dictionary) parameter.

Parameters:
table - The table (Dictionary) parameter.
from - The from (Dictionary) parameter.
See Also:
createManagedProperties(), createProperties(), getManagedProperties(), setManagedProperties(Dictionary)

updated

public void updated(java.util.Dictionary properties)
             throws org.osgi.service.cm.ConfigurationException
Updated with the specified properties parameter. The properties (Dictionary) parameter. Configuration Exception.

Specified by:
updated in interface org.osgi.service.cm.ManagedService
Parameters:
properties - The properties (Dictionary) parameter.
Throws:
org.osgi.service.cm.ConfigurationException - Configuration Exception.

1.0.0

Copyright (c) 1999, 2007 IBM