org.gcube.common.events.utils
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
|
Method Summary |
static void |
configure(Hub hub)
Sets the shared Hub instance, overriding the default one. |
static Hub |
hub()
Returns the shared Hub instance. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
HubFactory
public HubFactory()
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
Copyright © 2013. All Rights Reserved.