org.apache.felix.ipojo

## Class IPojoFactory.RetryNameGenerator

- java.lang.Object
- - org.apache.felix.ipojo.IPojoFactory.RetryNameGenerator

All Implemented Interfaces:
  IPojoFactory.NameGenerator

Enclosing class:
  IPojoFactory

    public static class IPojoFactory.RetryNameGenerator
    extends java.lang.Object
    implements IPojoFactory.NameGenerator

This generator implements a retry naming strategy. It uses a delegate `IPojoFactory.NameGenerator`, and call it in sequence until an unused value is found.

### Constructor Summary

Constructors
Constructor and Description
`RetryNameGenerator(IPojoFactory.NameGenerator delegate)`

### Method Summary

All Methods Instance Methods Concrete Methods
`java.lang.String` `generate(Factory factory, java.util.List<java.lang.String> reserved)`
`void` `setMaximum(long maximum)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### RetryNameGenerator

    public RetryNameGenerator(IPojoFactory.NameGenerator delegate)

### Method Detail

#### setMaximum

    public void setMaximum(long maximum)

#### generate

    public java.lang.String generate(Factory factory,
                                     java.util.List<java.lang.String> reserved)
                              throws UnacceptableConfiguration

Specified by:
  `generate` in interface `IPojoFactory.NameGenerator`
Parameters:
  `factory` - Factory called to create the instance
  `reserved` - List of reserved (already used) instance names. This has to be used tp ensure generated name is unique among all other instances.
Returns:
  a unique name.
Throws:
  `UnacceptableConfiguration`