org.wildfly.swarm.config

## Class Singleton<T extends Singleton<T>>

- java.lang.Object
- - org.wildfly.swarm.config.Singleton<T>

-     public class Singleton<T extends Singleton<T>>
      extends Object

  The configuration of the singleton subsystem

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `Singleton.SingletonResources` Child mutators for Singleton

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Singleton()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addPropertyChangeListener(PropertyChangeListener listener)` Adds a property change listener
    `String` | `attributeDefault()` The default singleton policy
    `T` | `attributeDefault(String value)` The default singleton policy
    `String` | `getKey()`
    `void` | `removePropertyChangeListener(PropertyChangeListener listener)` Removes a property change listener
    `T` | `singletonPolicies(List<SingletonPolicy> value)` Add all SingletonPolicy objects to this subresource
    `T` | `singletonPolicy(SingletonPolicy value)` Add the SingletonPolicy object to the list of subresources
    `T` | `singletonPolicy(SingletonPolicySupplier supplier)` Install a supplied SingletonPolicy object to the list of subresources
    `T` | `singletonPolicy(String childKey)` Create and configure a SingletonPolicy object to the list of subresources
    `T` | `singletonPolicy(String childKey, SingletonPolicyConsumer consumer)` Create and configure a SingletonPolicy object to the list of subresources
    `Singleton.SingletonResources` | `subresources()`

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

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

- - ### Constructor Detail

    - #### Singleton

          public Singleton()

  - ### Method Detail

    - #### getKey

          public String getKey()

    - #### addPropertyChangeListener

          public void addPropertyChangeListener(PropertyChangeListener listener)

      Adds a property change listener

    - #### removePropertyChangeListener

          public void removePropertyChangeListener(PropertyChangeListener listener)

      Removes a property change listener

    - #### subresources

          public Singleton.SingletonResources subresources()

    - #### singletonPolicies

          public T singletonPolicies(List<SingletonPolicy> value)

      Add all SingletonPolicy objects to this subresource
      Parameters:
        `value` - List of SingletonPolicy objects.
      Returns:
        this

    - #### singletonPolicy

          public T singletonPolicy(SingletonPolicy value)

      Add the SingletonPolicy object to the list of subresources
      Parameters:
        `value` - The SingletonPolicy to add
      Returns:
        this

    - #### singletonPolicy

          public T singletonPolicy(String childKey,
                                   SingletonPolicyConsumer consumer)

      Create and configure a SingletonPolicy object to the list of subresources
      Parameters:
        `key` - The key for the SingletonPolicy resource
        `config` - The SingletonPolicyConsumer to use
      Returns:
        this

    - #### singletonPolicy

          public T singletonPolicy(String childKey)

      Create and configure a SingletonPolicy object to the list of subresources
      Parameters:
        `key` - The key for the SingletonPolicy resource
      Returns:
        this

    - #### singletonPolicy

          public T singletonPolicy(SingletonPolicySupplier supplier)

      Install a supplied SingletonPolicy object to the list of subresources

    - #### attributeDefault

          public String attributeDefault()

      The default singleton policy

    - #### attributeDefault

          public T attributeDefault(String value)

      The default singleton policy

Copyright © 2017 JBoss by Red Hat. All rights reserved.