org.apache.felix.ipojo.api

## Class TemporalDependency

- java.lang.Object
- - org.apache.felix.ipojo.api.TemporalDependency

All Implemented Interfaces:
  HandlerConfiguration

    public class TemporalDependency
    extends java.lang.Object
    implements HandlerConfiguration

Allows configuring a service dependencies.

Author:
  Felix Project Team

### Field Summary

Fields
`static java.lang.String` `EMPTY` OnTimeout policy: empty array or collection.
`static java.lang.String` `NULL` OnTimeout policy: inject null.
`static java.lang.String` `NULLABLE` OnTimeout policy: nullable object.

### Constructor Summary

Constructors
Constructor and Description
`TemporalDependency()`

### Method Summary

All Methods Instance Methods Concrete Methods
`org.apache.felix.ipojo.metadata.Element` `getElement()` Gets the dependency metadata.
`TemporalDependency` `setField(java.lang.String field)` Sets the field attached to the dependency.
`TemporalDependency` `setFilter(java.lang.String filter)` Sets the dependency filter.
`TemporalDependency` `setOnTimeoutPolicy(java.lang.String tip)` Sets the dependency ontimeout policy.
`TemporalDependency` `setProxy(boolean proxy)` Sets if the dependency is injected as a proxy.
`TemporalDependency` `setSpecification(java.lang.String spec)` Sets the required service specification.
`TemporalDependency` `setTimeout(long time)` Sets the dependency timeout.
`TemporalDependency` `setTimeout(java.lang.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 java.lang.String NULLABLE

OnTimeout policy: nullable object.

See Also:
  Constant Field Values

#### EMPTY

    public static final java.lang.String EMPTY

OnTimeout policy: empty array or collection.

See Also:
  Constant Field Values

#### NULL

    public static final java.lang.String NULL

OnTimeout policy: inject null.

See Also:
  Constant Field Values

### Constructor Detail

#### TemporalDependency

    public TemporalDependency()

### Method Detail

#### getElement

    public org.apache.felix.ipojo.metadata.Element getElement()

Gets the dependency metadata.

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

#### setSpecification

    public TemporalDependency setSpecification(java.lang.String spec)

Sets the required service specification.

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

#### setFilter

    public TemporalDependency setFilter(java.lang.String filter)

Sets the dependency filter.

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

#### setField

    public TemporalDependency setField(java.lang.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(java.lang.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(java.lang.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