2008-07-29 1.1.0

org.eclipse.soda.dk.agent.bundle
Class AgentBundle

java.lang.Object
  extended by org.eclipse.soda.sat.core.framework.BaseBundleActivator
      extended by org.eclipse.soda.dk.agent.bundle.AgentBundle
All Implemented Interfaces:
org.osgi.framework.BundleActivator

public abstract class AgentBundle
extends org.eclipse.soda.sat.core.framework.BaseBundleActivator
implements org.osgi.framework.BundleActivator

The AgentBundle is the base bundle activator for all agent bundle activators.

Version:
1.1.0

Field Summary
static java.lang.String[] OPTIONAL_SERVICES
          Define the optional services (String[]) constant.
 
Fields inherited from class org.eclipse.soda.sat.core.framework.BaseBundleActivator
NO_SERVICES
 
Constructor Summary
AgentBundle()
           
 
Method Summary
 void activate()
          Create service and return the Object result.
 java.util.Hashtable createProperties()
          Create the properties.
 AgentService createService()
           
 AgentService createService(DeviceService device)
          Create service with the specified device parameter and return the AgentService result.
 AgentService createService(org.eclipse.soda.sat.core.framework.interfaces.IBundleActivationManager manager)
          Create service with the specified manager parameter and return the AgentService result.
protected  void deactivate()
          Deactivate.
 AgentService getAgent()
          Return the agent.
 DeviceService getDevice()
          Get the DeviceService to be used by the agent.
abstract  java.lang.String[] getExportedServiceNames()
          Gets the exported service names (String[]) value.
 java.lang.String getInterestServiceName()
          Gets the interest service name (String) value.
protected  java.lang.String[] getOptionalImportedServiceNames()
          Gets the optional imported service names (String[]) value.
protected  void handleAcquiredOptionalImportedService(java.lang.String serviceName, java.lang.Object service)
           
protected  void handleReleasedOptionalImportedService(java.lang.String serviceName, java.lang.Object service)
           
 void log(int severity, java.lang.String message)
           
 void log(int severity, java.lang.String message, java.lang.Throwable exception)
           
 void setAgent(AgentService agent)
          Sets the agent value.
 void setDevice(DeviceService device)
          Sets the device value.
 
Methods inherited from class org.eclipse.soda.sat.core.framework.BaseBundleActivator
acquireImportedService, acquireImportedServices, acquireOptionalImportedServices, addExportedProxyService, addExportedProxyServices, addExportedService, addExportedServices, addImportedServiceFilter, addOptionalImportedServiceFilter, basicGetImportedServiceNames, basicGetOptionalImportedServiceNames, collectImportedServiceNames, collectOptionalImportedServiceNames, getAsyncStartPriority, getBundle, getBundleActivationManager, getBundleContext, getBundleSymbolicName, getDataDirectory, getDataFile, getExportedService, getExportedServiceNamesFromManifest, getExportedServiceProperties, getExportedServiceProperties, getExportedServices, getExportedServices, getFilePropertiesInputStream, getFilePropertiesInputStream, getImportedService, getImportedServiceFilter, getImportedServiceNames, getImportedServiceNamesFromManifest, getImportedServiceProperty, getImportedServicePropertyKeys, getImportedServices, getOptionalImportedService, getOptionalImportedServiceFilter, getOptionalImportedServiceProperty, getOptionalImportedServicePropertyKeys, getOptionalImportedServices, getProperties, getPropertiesInputStream, getProperty, getResourcePropertiesInputStream, getResourcePropertiesInputStream, handleException, handleFailedToFindProperties, isStartAsync, isTransient, isUninstallable, releaseImportedService, releaseImportedServices, releaseOptionalImportedServices, removeExportedService, removeExportedService, removeExportedServices, removeImportedServiceFilter, removeOptionalImportedServiceFilter, restartFramework, setExportedServiceProperties, setExportedServiceProperties, shutdownFramework, start, start, stop, stop
 
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

OPTIONAL_SERVICES

public static final java.lang.String[] OPTIONAL_SERVICES
Define the optional services (String[]) constant.

Constructor Detail

AgentBundle

public AgentBundle()
Method Detail

activate

public void activate()
Create service and return the Object result.

Overrides:
activate in class org.eclipse.soda.sat.core.framework.BaseBundleActivator

createProperties

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

Returns:
Results of the create properties (Hashtable) value.

createService

public AgentService createService()
Returns:
Results of the create service (Object) value. The device (DeviceService) parameter.
See Also:
createService(IBundleActivationManager), createService(DeviceService), handleAcquiredOptionalImportedService(String,Object), handleReleasedOptionalImportedService(String,Object)

createService

public AgentService createService(org.eclipse.soda.sat.core.framework.interfaces.IBundleActivationManager manager)
Create service with the specified manager parameter and return the AgentService result.

Parameters:
manager - The manager (IBundleActivationManager) parameter.
Returns:
Results of the create service (AgentService) value.
See Also:
createService(), createService(DeviceService), handleAcquiredOptionalImportedService(String,Object), handleReleasedOptionalImportedService(String,Object)

createService

public AgentService createService(DeviceService device)
Create service with the specified device parameter and return the AgentService result.

Parameters:
device - The device (DeviceService) parameter.
Returns:
Results of the create service (AgentService) value.
See Also:
createService(), createService(IBundleActivationManager), handleAcquiredOptionalImportedService(String,Object), handleReleasedOptionalImportedService(String,Object)

deactivate

protected void deactivate()
Deactivate.

Overrides:
deactivate in class org.eclipse.soda.sat.core.framework.BaseBundleActivator

getAgent

public AgentService getAgent()
Return the agent.

Returns:
Results of the get agent (AgentService) value.
See Also:
setAgent(AgentService)

getDevice

public DeviceService getDevice()
Get the DeviceService to be used by the agent.

Returns:
Results of the get device (DeviceService) value.
See Also:
setDevice(DeviceService)

getExportedServiceNames

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

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

getInterestServiceName

public java.lang.String getInterestServiceName()
Gets the interest service name (String) value.

Returns:
The interest service name (String) value.

getOptionalImportedServiceNames

protected java.lang.String[] getOptionalImportedServiceNames()
Gets the optional imported service names (String[]) value.

Overrides:
getOptionalImportedServiceNames in class org.eclipse.soda.sat.core.framework.BaseBundleActivator
Returns:
The optional imported service names (String[]) value.

handleAcquiredOptionalImportedService

protected void handleAcquiredOptionalImportedService(java.lang.String serviceName,
                                                     java.lang.Object service)
Overrides:
handleAcquiredOptionalImportedService in class org.eclipse.soda.sat.core.framework.BaseBundleActivator
Parameters:
serviceName - The service name (String) parameter.
service - The service (Object) parameter.

handleReleasedOptionalImportedService

protected void handleReleasedOptionalImportedService(java.lang.String serviceName,
                                                     java.lang.Object service)
Overrides:
handleReleasedOptionalImportedService in class org.eclipse.soda.sat.core.framework.BaseBundleActivator
Parameters:
serviceName - The service name (String) parameter.
service - The service (Object) parameter.

log

public void log(int severity,
                java.lang.String message)
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)
Parameters:
severity - The severity (int) parameter.
message - The message (String) parameter.
exception - The exception (Throwable) parameter.
See Also:
log(int,String)

setAgent

public void setAgent(AgentService agent)
Sets the agent value. The agent (AgentService) parameter.

Parameters:
agent - The agent (AgentService) parameter.
See Also:
getAgent()

setDevice

public void setDevice(DeviceService device)
Sets the device value. The device (DeviceService) parameter.

Parameters:
device - The device (DeviceService) parameter.
See Also:
getDevice()

2008-07-29 1.1.0

Copyright (c) 1999, 2008 IBM and others. See license in Legal section. OSGi Framework Version 3.4.0.v20080605-1900