Class HubFactory

java.lang.Object
org.gcube.common.events.utils.HubFactory

public class HubFactory extends Object
Convenience factory to share Hub instances. Encouraged only in environments where better means of sharing like dependency injection are not available.
Author:
Fabio Simeoni, Luca Frosini (ISTI-CNR)
  • Method Details

    • hub

      public static Hub hub()
      Returns the shared Hub instance.
      Returns:
      the instance
    • configure

      public static void configure(Hub hub)
      Sets the shared Hub instance, overriding the default one.

      Typically used in testing to configure a test-driving instance.

      Parameters:
      hub - the instance