Package org.apache.sling.testing.serversetup

## Class ServerSetupSingleton

- java.lang.Object
- - org.apache.sling.testing.serversetup.ServerSetupSingleton

    public class ServerSetupSingleton
    extends Object

In general we just need a singleton ServerSetup, that uses System properties for its configuration - this class supplies that.

### Field Summary

Fields
`static String` `CLASS_NAME_PROP` Property name of the ServerSetup class that we instantiate

### Constructor Summary

Constructors
`ServerSetupSingleton()`

### Method Summary

All Methods Static Methods Concrete Methods
`static ServerSetup` `instance()` Same as no-parameter instance() method, but uses System properties to create its instance.
`static ServerSetup` `instance​(Properties config)` Create an instance based on the {@CLASS_NAME_PROP) property if needed and return it.

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

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

### Field Detail

#### CLASS_NAME_PROP

    public static final String CLASS_NAME_PROP

Property name of the ServerSetup class that we instantiate

See Also:
  Constant Field Values

### Constructor Detail

#### ServerSetupSingleton

    public ServerSetupSingleton()

### Method Detail

#### instance

    public static ServerSetup instance​(Properties config)
                                throws InstantiationException,
                                       IllegalAccessException,
                                       ClassNotFoundException

Create an instance based on the {@CLASS_NAME_PROP) property if needed and return it.

Parameters:
  `config` - Ignored unless an instance is created
Throws:
  `InstantiationException`
  `IllegalAccessException`
  `ClassNotFoundException`

#### instance

    public static ServerSetup instance()
                                throws InstantiationException,
                                       IllegalAccessException,
                                       ClassNotFoundException

Same as no-parameter instance() method, but uses System properties to create its instance.

Throws:
  `InstantiationException`
  `IllegalAccessException`
  `ClassNotFoundException`