com.hazelcast.util

## Class ServiceLoader

- java.lang.Object
- - com.hazelcast.util.ServiceLoader

-     public final class ServiceLoader
      extends Object

  Support class for loading Hazelcast services and hooks based on the Java `ServiceLoader` specification, but changed to the fact of class loaders to test for given services to work in multi classloader environments like application or OSGi servers.

- - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static <T> Iterator<Class<T>>` | `classIterator(Class<T> expectedType, String factoryId, ClassLoader classLoader)`
    `static <T> Iterator<T>` | `iterator(Class<T> expectedType, String factoryId, ClassLoader classLoader)`
    `static <T> T` | `load(Class<T> clazz, String factoryId, ClassLoader classLoader)`

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

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

- - ### Method Detail

    - #### load

          public static <T> T load(Class<T> clazz,
                                   String factoryId,
                                   ClassLoader classLoader)
                            throws Exception

      Throws:
        `Exception`

    - #### iterator

          public static <T> Iterator<T> iterator(Class<T> expectedType,
                                                 String factoryId,
                                                 ClassLoader classLoader)
                                          throws Exception

      Throws:
        `Exception`

    - #### classIterator

          public static <T> Iterator<Class<T>> classIterator(Class<T> expectedType,
                                                             String factoryId,
                                                             ClassLoader classLoader)
                                                      throws Exception

      Throws:
        `Exception`

Copyright © 2019. All rights reserved.