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

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

public class DependencyDescription
extends java.lang.Object

Dependency Description.

Author:
Felix Project Team

Constructor Summary
DependencyDescription(java.lang.String itf, boolean multiple, boolean optional, java.lang.String filter, int state)
          Constructor.
 
Method Summary
 java.lang.String getFilter()
           
 java.lang.String getInterface()
           
 org.osgi.framework.ServiceReference getServiceReference()
          Get the service reference if only 1 used.
 java.util.List getServiceReferences()
          Get the service reference list.
 int getState()
           
 java.util.List getUsedServices()
          Get the used service set.
 boolean isMultiple()
           
 boolean isOptional()
           
 void setServiceReferences(java.util.List refs)
          Set the service reference array.
 void setUsedServices(java.util.List usages)
          Set the usedServices.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DependencyDescription

public DependencyDescription(java.lang.String itf,
                             boolean multiple,
                             boolean optional,
                             java.lang.String filter,
                             int state)
Constructor.

Parameters:
itf - : the needed interface
multiple - : is the dependency a multiple dependency ?
optional - : is the dependency optional ?
filter - : the filter
state - : the state
Method Detail

isMultiple

public boolean isMultiple()

isOptional

public boolean isOptional()

getFilter

public java.lang.String getFilter()

getInterface

public java.lang.String getInterface()

getState

public int getState()

getServiceReferences

public java.util.List getServiceReferences()
Get the service reference list.

Returns:
the array of service reference (only if the cardinality could be n).

getServiceReference

public org.osgi.framework.ServiceReference getServiceReference()
Get the service reference if only 1 used.

Returns:
the ServiceReference (only if the cardinality could be 1).

setServiceReferences

public void setServiceReferences(java.util.List refs)
Set the service reference array.

Parameters:
refs - : the list of service reference

getUsedServices

public java.util.List getUsedServices()
Get the used service set.

Returns:
the list [service reference] containing the used services

setUsedServices

public void setUsedServices(java.util.List usages)
Set the usedServices.

Parameters:
usages - : the list of used service reference.