org.robokind.api.common.lifecycle
Class DependencyDescriptor

java.lang.Object
  extended by org.robokind.api.common.lifecycle.DependencyDescriptor

public final class DependencyDescriptor
extends Object

Describes a service dependency of a ServiceLifecycleProvider. Used to match find and track the appropriate services needed by a lifecycle provider.

Author:
Matthew Stevenson

Nested Class Summary
static class DependencyDescriptor.DependencyType
           
 
Constructor Summary
DependencyDescriptor(String dependencyName, Class clazz, String filter)
          Create a new required DependencyDescriptor with the given values.
DependencyDescriptor(String dependencyName, Class clazz, String filter, DependencyDescriptor.DependencyType type)
          Create a new DependencyDescriptor with the given values.
 
Method Summary
 boolean equals(Object obj)
           
 String getDependencyName()
          Returns the dependency name used within a ServiceLifecycleProvider.
 DependencyDescriptor.DependencyType getDependencyType()
          Returns the dependency type, Required or Optional
 Class getServiceClass()
          Returns the Class of dependency.
 String getServiceFilter()
          Returns an OSGi filter string for the dependency, null if it is not set.
 int hashCode()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DependencyDescriptor

public DependencyDescriptor(String dependencyName,
                            Class clazz,
                            String filter)
Create a new required DependencyDescriptor with the given values.

Parameters:
dependencyName - dependency name within a ServiceLifecycleProvider
clazz - Class of the dependency
filter - optional OSGi filter string

DependencyDescriptor

public DependencyDescriptor(String dependencyName,
                            Class clazz,
                            String filter,
                            DependencyDescriptor.DependencyType type)
Create a new DependencyDescriptor with the given values.

Parameters:
dependencyName - dependency name within a ServiceLifecycleProvider
clazz - Class of the dependency
filter - optional OSGi filter string
type - is this dependency required or optional
Method Detail

getDependencyName

public String getDependencyName()
Returns the dependency name used within a ServiceLifecycleProvider.

Returns:
dependency name used within a ServiceLifecycleProvider

getServiceClass

public Class getServiceClass()
Returns the Class of dependency.

Returns:
Class of dependency

getServiceFilter

public String getServiceFilter()
Returns an OSGi filter string for the dependency, null if it is not set.

Returns:
OSGi filter string for the dependency, null if it is not set

getDependencyType

public DependencyDescriptor.DependencyType getDependencyType()
Returns the dependency type, Required or Optional

Returns:
dependency type, Required or Optional

equals

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

hashCode

public int hashCode()
Overrides:
hashCode in class Object


Copyright © 2011-2013. All Rights Reserved.