org.apache.felix.ipojo.handlers.dependency
Class DependencyDescription

java.lang.Object
  extended by org.apache.felix.ipojo.handlers.dependency.DependencyDescription

public class DependencyDescription
extends Object

Service Dependency Description.

Author:
Felix Project Team

Constructor Summary
DependencyDescription(Dependency dep)
          Creates a dependency description.
 
Method Summary
 String getComparator()
           
 String getDefaultImplementation()
           
 String getFilter()
           
 String getId()
           
 String getInterface()
           
 int getPolicy()
           
 ServiceReference getServiceReference()
          Gets the service reference if only one service reference is used.
 List getServiceReferences()
          Gets the service reference list.
 String getSpecification()
          Gets the required service specification name.
 int getState()
           
 List getUsedServices()
          Gets the used service set.
 boolean isFrozen()
           
 boolean isMultiple()
           
 boolean isOptional()
           
 void setAggregate(boolean isAgg)
          Sets the dependency cardinality.
 void setComparator(Comparator cmp)
          Sets the dependency comparator.
 void setFilter(Filter filter)
          Sets the dependency filter.
 void setOptional(boolean isOpt)
          Sets the dependency optionality.
 boolean supportsNullable()
          Gets true if the dependency uses Nullable objects.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DependencyDescription

public DependencyDescription(Dependency dep)
Creates a dependency description.

Parameters:
dep - the described dependency
Method Detail

isMultiple

public boolean isMultiple()

isOptional

public boolean isOptional()

getFilter

public String getFilter()

getInterface

public String getInterface()

getState

public int getState()

getId

public String getId()

supportsNullable

public boolean supportsNullable()
Gets true if the dependency uses Nullable objects.

Returns:
true if the dependency is optional and supports nullable object.

getDefaultImplementation

public String getDefaultImplementation()

getPolicy

public int getPolicy()

getComparator

public String getComparator()

isFrozen

public boolean isFrozen()

getServiceReferences

public List getServiceReferences()
Gets the service reference list.

Returns:
the list of matching service reference, null if no service reference.

getServiceReference

public ServiceReference getServiceReference()
Gets the service reference if only one service reference is used.

Returns:
the ServiceReference (only if the cardinality could be 1), or null if no service reference.

getUsedServices

public List getUsedServices()
Gets the used service set.

Returns:
the list [service reference] containing the used services, null if no providers are used

setComparator

public void setComparator(Comparator cmp)
Sets the dependency comparator. The reference set will be sort at the next usage.

Parameters:
cmp - the comparator

setFilter

public void setFilter(Filter filter)
Sets the dependency filter.

Parameters:
filter - the new LDAP filter

setAggregate

public void setAggregate(boolean isAgg)
Sets the dependency cardinality.

Parameters:
isAgg - if true sets the dependency to aggregate, if false sets the dependency to scalar.

setOptional

public void setOptional(boolean isOpt)
Sets the dependency optionality.

Parameters:
isOpt - if true sets the dependency to optional, if false sets the dependency to mandatory.

getSpecification

public String getSpecification()
Gets the required service specification name.

Returns:
the required service specification class name.


Copyright © 2006-2011 Apache Software Foundation. All Rights Reserved.