org.springframework.osgi.service.importer.support
Class AbstractDependableServiceImporter

java.lang.Object
  extended by org.springframework.osgi.service.importer.support.AbstractDependableServiceImporter
All Implemented Interfaces:
DependableServiceImporter, ServiceDependency
Direct Known Subclasses:
AbstractOsgiServiceImportFactoryBean

public abstract class AbstractDependableServiceImporter
extends Object
implements DependableServiceImporter

Base class implementing the DependableServiceImporter interface. Abstract by default since it doesn't offer any OSGi specific functionality, which have to be supplied by subclasses.

Author:
Costin Leau

Constructor Summary
AbstractDependableServiceImporter()
           
 
Method Summary
 Cardinality getCardinality()
          Returns the cardinality used by this importer.
 boolean isMandatory()
          Indicates if this dependency is mandatory or not.
 void registerListener(MandatoryDependencyListener listener)
          Register a MandatoryDependencyListener on this importer.
 void setCardinality(Cardinality cardinality)
          Sets the importer cardinality (0..1, 1..1, 0..N, or 1..N).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.springframework.osgi.service.dependency.ServiceDependency
isSatisfied
 

Constructor Detail

AbstractDependableServiceImporter

public AbstractDependableServiceImporter()
Method Detail

registerListener

public void registerListener(MandatoryDependencyListener listener)
Description copied from interface: DependableServiceImporter
Register a MandatoryDependencyListener on this importer.

Specified by:
registerListener in interface DependableServiceImporter
Parameters:
listener - dependency listener to register.

isMandatory

public boolean isMandatory()
Description copied from interface: ServiceDependency
Indicates if this dependency is mandatory or not.

Specified by:
isMandatory in interface ServiceDependency
Returns:
true if the dependency is mandatory, false otherwise.

setCardinality

public void setCardinality(Cardinality cardinality)
Sets the importer cardinality (0..1, 1..1, 0..N, or 1..N). Default is 1..X.

Parameters:
cardinality - importer cardinality.

getCardinality

public Cardinality getCardinality()
Returns the cardinality used by this importer.

Returns:
importer cardinality


Copyright 2006-2008 Spring Framework. All Rights Reserved.