org.richfaces.services

## Class ServiceUtils

- java.lang.Object
- - org.richfaces.services.ServiceUtils

-     public final class ServiceUtils
      extends Object

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ServiceUtils()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static void` | `initialize(Collection<?> services)` Initializes a collection of services.
    `static void` | `release(Collection<?> services)` Releases (finalizes) a collection of services.
    `static void` | `sortByPriority(List<?> services)` Sorts a given list containing services by their priority.

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

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

- - ### Constructor Detail

    - #### ServiceUtils

          public ServiceUtils()

  - ### Method Detail

    - #### sortByPriority

          public static void sortByPriority(List<?> services)

      Sorts a given list containing services by their priority.

      By default, each service has priority 0. A developer can re-define the priority by implementing `Prioritizable.getPriority()` method.

      Parameters:
        `services` - list of services

    - #### initialize

          public static void initialize(Collection<?> services)

      Initializes a collection of services.

      Only services which implements `Initializable` will be initialized. A rest of services will stay untouched.

      Parameters:
        `services` - a collection of services

    - #### release

          public static void release(Collection<?> services)

      Releases (finalizes) a collection of services.

      Only services which implements `Initializable` will be released. A rest of services will stay untouched.

      Parameters:
        `services` - a collection of services

Copyright © 2016 JBoss by Red Hat. All Rights Reserved.