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

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

public class InstantiatedService
extends Object
implements HandlerConfiguration

Allows defining an instantiated sub-service. An instantiated sub- service will be reified by instances publishing the required service. Those instances are created from public factories inside the composite.

Author:
Felix Project Team

Constructor Summary
InstantiatedService()
           
 
Method Summary
 InstantiatedService addProperty(String name, Dictionary values)
          Adds a dictionary property.
 InstantiatedService addProperty(String name, List values)
          Adds a list property.
 InstantiatedService addProperty(String name, Map values)
          Adds a map property.
 InstantiatedService addProperty(String name, String value)
          Adds a string property.
 InstantiatedService addProperty(String name, String[] values)
          Adds an array property.
 InstantiatedService addProperty(String name, Vector values)
          Adds a vector property.
 Element getElement()
          Gets the dependency metadata.
 InstantiatedService setAggregate(boolean agg)
          Sets the dependency cardinality.
 InstantiatedService setBindingPolicy(int policy)
          Sets the dependency binding policy.
 InstantiatedService setComparator(String cmp)
          Sets the dependency comparator.
 InstantiatedService setFilter(String filter)
          Sets the dependency filter.
 InstantiatedService setOptional(boolean opt)
          Sets the dependency optionality.
 InstantiatedService 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
 

Constructor Detail

InstantiatedService

public InstantiatedService()
Method Detail

getElement

public Element getElement()
Gets the dependency metadata.

Specified by:
getElement in interface HandlerConfiguration
Returns:
the 'subservice' element describing the current instantiated service.

addProperty

public InstantiatedService addProperty(String name,
                                       String value)
Adds a string property.

Parameters:
name - the property name
value - the property value
Returns:
the current instantiated sub-service

addProperty

public InstantiatedService addProperty(String name,
                                       List values)
Adds a list property.

Parameters:
name - the property name
values - the property value
Returns:
the current instantiated sub-service

addProperty

public InstantiatedService addProperty(String name,
                                       String[] values)
Adds an array property.

Parameters:
name - the property name
values - the property value
Returns:
the current instantiated sub-service

addProperty

public InstantiatedService addProperty(String name,
                                       Vector values)
Adds a vector property.

Parameters:
name - the property name
values - the property value
Returns:
the current instantiated sub-service

addProperty

public InstantiatedService addProperty(String name,
                                       Map values)
Adds a map property.

Parameters:
name - the property name
values - the property value
Returns:
the current instantiated sub-service

addProperty

public InstantiatedService addProperty(String name,
                                       Dictionary values)
Adds a dictionary property.

Parameters:
name - the property name
values - the property value
Returns:
the current instantiated sub-service

setSpecification

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

Parameters:
spec - the specification
Returns:
the current instantiated sub-service

setFilter

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

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

setOptional

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

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

setAggregate

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

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

setBindingPolicy

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

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

setComparator

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

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


Copyright © 2011 Apache Software Foundation. All Rights Reserved.