org.apache.felix.ipojo.api
Class TemporalDependency

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

public class TemporalDependency
extends Object
implements HandlerConfiguration

Allows configuring a service dependencies.

Author:
Felix Project Team

Field Summary
static String EMPTY
          OnTimeout policy: empty array or collection.
static String NULL
          OnTimeout policy: inject null.
static String NULLABLE
          OnTimeout policy: nullable object.
 
Constructor Summary
TemporalDependency()
           
 
Method Summary
 Element getElement()
          Gets the dependency metadata.
 TemporalDependency setField(String field)
          Sets the field attached to the dependency.
 TemporalDependency setFilter(String filter)
          Sets the dependency filter.
 TemporalDependency setOnTimeoutPolicy(String tip)
          Sets the dependency ontimeout policy.
 TemporalDependency setProxy(boolean proxy)
          Sets if the dependency is injected as a proxy.
 TemporalDependency setSpecification(String spec)
          Sets the required service specification.
 TemporalDependency setTimeout(long time)
          Sets the dependency timeout.
 TemporalDependency setTimeout(String time)
          Sets the dependency timeout.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NULLABLE

public static final String NULLABLE
OnTimeout policy: nullable object.

See Also:
Constant Field Values

EMPTY

public static final String EMPTY
OnTimeout policy: empty array or collection.

See Also:
Constant Field Values

NULL

public static final String NULL
OnTimeout policy: inject null.

See Also:
Constant Field Values
Constructor Detail

TemporalDependency

public TemporalDependency()
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 TemporalDependency setSpecification(String spec)
Sets the required service specification.

Parameters:
spec - the specification
Returns:
the current dependency object.

setFilter

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

Parameters:
filter - the LDAP filter
Returns:
the current dependency object

setField

public TemporalDependency setField(String field)
Sets the field attached to the dependency.

Parameters:
field - the implementation class field name.
Returns:
the current dependency object

setProxy

public TemporalDependency setProxy(boolean proxy)
Sets if the dependency is injected as a proxy.

Parameters:
proxy - true to inject proxies.
Returns:
the current dependency object.

setTimeout

public TemporalDependency setTimeout(String time)
Sets the dependency timeout.

Parameters:
time - the dependency timeout in ms 'infinite' for infinite.
Returns:
the current dependency object

setTimeout

public TemporalDependency setTimeout(long time)
Sets the dependency timeout.

Parameters:
time - the dependency timeout in ms
Returns:
the current dependency object

setOnTimeoutPolicy

public TemporalDependency setOnTimeoutPolicy(String tip)
Sets the dependency ontimeout policy. Supports null, nullable, empty, and default-implementation. In this latter case, you must specify the qualified class name of the default-implementation (instead of default-implementation). Default: no action (i.e throws a runtime exception)

Parameters:
tip - the ontimeout policy
Returns:
the current dependency object


Copyright © 2011 Apache Software Foundation. All Rights Reserved.