org.springframework.osgi.service.importer
Class DefaultOsgiServiceDependency

java.lang.Object
  extended by org.springframework.osgi.service.importer.DefaultOsgiServiceDependency
All Implemented Interfaces:
OsgiServiceDependency

public class DefaultOsgiServiceDependency
extends Object
implements OsgiServiceDependency

Default, immutable implementation for OsgiServiceDependency.

Author:
Costin Leau

Constructor Summary
DefaultOsgiServiceDependency(String beanName, Filter filter, boolean mandatoryService)
          Constructs a new DefaultOsgiServiceDependency instance.
 
Method Summary
 boolean equals(Object obj)
           
 String getBeanName()
          Returns the bean name (if any) that declares this dependency.
 Filter getServiceFilter()
          Returns the OSGi filter for the service dependency.
 int hashCode()
           
 boolean isMandatory()
          Indicates if the dependency is mandatory or not.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DefaultOsgiServiceDependency

public DefaultOsgiServiceDependency(String beanName,
                                    Filter filter,
                                    boolean mandatoryService)
Constructs a new DefaultOsgiServiceDependency instance.

Parameters:
beanName - dependency bean name (can be null)
filter - dependency OSGi filter (can be null)
mandatoryService - flag indicating whether the dependency is mandatory or not
Method Detail

getBeanName

public String getBeanName()
Description copied from interface: OsgiServiceDependency
Returns the bean name (if any) that declares this dependency.

Specified by:
getBeanName in interface OsgiServiceDependency
Returns:
the name of bean declaring the dependency. Can be null.

getServiceFilter

public Filter getServiceFilter()
Description copied from interface: OsgiServiceDependency
Returns the OSGi filter for the service dependency.

Specified by:
getServiceFilter in interface OsgiServiceDependency
Returns:
filter describing the dependent OSGi service

isMandatory

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

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

toString

public String toString()
Overrides:
toString in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object


Copyright © 2006-2009 Spring Framework. All Rights Reserved.