org.apache.felix.ipojo.api.composite
Class ImportedService

java.lang.Object
  extended by org.apache.felix.ipojo.api.composite.ImportedService
All Implemented Interfaces:
HandlerConfiguration

public class ImportedService
extends Object
implements HandlerConfiguration

Allows defining an imported service. A service import is the publication of service from the parent composite or global registry inside the composite.

Author:
Felix Project Team

Field Summary
static String COMPOSITE_AND_GLOBAL_SCOPE
          Scoping policy: composite+global.
static String COMPOSITE_SCOPE
          Scoping policy: composite.
static String GLOBAL_SCOPE
          Scoping policy: global.
 
Constructor Summary
ImportedService()
           
 
Method Summary
 Element getElement()
          Gets the dependency metadata.
 ImportedService setAggregate(boolean agg)
          Sets the dependency cardinality.
 ImportedService setBindingPolicy(int policy)
          Sets the dependency binding policy.
 ImportedService setComparator(String cmp)
          Sets the dependency comparator.
 ImportedService setFilter(String filter)
          Sets the dependency filter.
 ImportedService setId(String id)
          Sets the dependency id.
 ImportedService setOptional(boolean opt)
          Sets the dependency optionality.
 ImportedService setScope(String scope)
          Sets the dependency scope.
 ImportedService setSpecification(String spec)
          Sets the required service specification.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COMPOSITE_SCOPE

public static final String COMPOSITE_SCOPE
Scoping policy: composite.

See Also:
Constant Field Values

GLOBAL_SCOPE

public static final String GLOBAL_SCOPE
Scoping policy: global.

See Also:
Constant Field Values

COMPOSITE_AND_GLOBAL_SCOPE

public static final String COMPOSITE_AND_GLOBAL_SCOPE
Scoping policy: composite+global.

See Also:
Constant Field Values
Constructor Detail

ImportedService

public ImportedService()
Method Detail

getElement

public Element getElement()
Gets the dependency metadata.

Specified by:
getElement in interface HandlerConfiguration
Returns:
the 'requires' element describing the current dependency.

setSpecification

public ImportedService setSpecification(String spec)
Sets the required service specification.

Parameters:
spec - the specification
Returns:
the current imported sub-service.

setFilter

public ImportedService setFilter(String filter)
Sets the dependency filter.

Parameters:
filter - the LDAP filter
Returns:
the current imported sub-service

setOptional

public ImportedService setOptional(boolean opt)
Sets the dependency optionality.

Parameters:
opt - true to set the dependency to optional.
Returns:
the current imported sub-service.

setAggregate

public ImportedService setAggregate(boolean agg)
Sets the dependency cardinality.

Parameters:
agg - true to set the dependency to aggregate.
Returns:
the current imported sub-service.

setBindingPolicy

public ImportedService setBindingPolicy(int policy)
Sets the dependency binding policy.

Parameters:
policy - the binding policy
Returns:
the current imported sub-service

setComparator

public ImportedService setComparator(String cmp)
Sets the dependency comparator.

Parameters:
cmp - the comparator class name
Returns:
the current imported sub-service

setId

public ImportedService setId(String id)
Sets the dependency id.

Parameters:
id - the dependency id.
Returns:
the current imported sub-service.

setScope

public ImportedService setScope(String scope)
Sets the dependency scope.

Parameters:
scope - the dependency scope (global, composite or composite+global).
Returns:
the current imported sub-service.


Copyright © 2011 Apache Software Foundation. All Rights Reserved.