Package com.helger.photon.api
Class GlobalAPIInvoker
- java.lang.Object
-
- com.helger.scope.singleton.AbstractSingleton
-
- com.helger.web.scope.singleton.AbstractGlobalWebSingleton
-
- com.helger.photon.api.GlobalAPIInvoker
-
- All Implemented Interfaces:
com.helger.scope.IScopeDestructionAware,com.helger.web.scope.singleton.IWebSingleton
@ThreadSafe public class GlobalAPIInvoker extends com.helger.web.scope.singleton.AbstractGlobalWebSingletonCentral API manager. Was reworked in v8.1.4 to clearly separate between registry and invoker.- Author:
- Philip Helger
-
-
Constructor Summary
Constructors Constructor Description GlobalAPIInvoker()Deprecated.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static GlobalAPIInvokergetInstance()IAPIInvokergetInvoker()IAPIRegistrygetRegistry()voidresetToDefault()Reset all values to default.voidsetInvoker(IAPIInvoker aInvoker)Set the global invoker to be used.voidsetRegistry(IAPIRegistry aRegistry)Set the global registry to be used.StringtoString()-
Methods inherited from class com.helger.web.scope.singleton.AbstractGlobalWebSingleton
getAllGlobalSingletons, getGlobalSingleton, getGlobalSingletonIfInstantiated, isGlobalSingletonInstantiated
-
Methods inherited from class com.helger.scope.singleton.AbstractSingleton
getAllSingletons, getSingleton, getSingletonIfInstantiated, getSingletonScopeKey, isDestroyed, isInDestruction, isInInstantiation, isInPreDestruction, isInstantiated, isSingletonInstantiated, isUsableObject, onAfterInstantiation, onBeforeDestroy, onBeforeScopeDestruction, onDestroy, onScopeDestruction, readAbstractSingletonFields, setDestroyed, setInDestruction, setInInstantiation, setInPreDestruction, setInstantiated, writeAbstractSingletonFields
-
-
-
-
Constructor Detail
-
GlobalAPIInvoker
@Deprecated(forRemoval=false) @UsedViaReflection public GlobalAPIInvoker()
Deprecated.
-
-
Method Detail
-
getInstance
@Nonnull public static GlobalAPIInvoker getInstance()
-
resetToDefault
@VisibleForTesting public void resetToDefault()
Reset all values to default. This is only intended for testing purposes. ATTENTION: this removes ALL registrations!
-
getRegistry
@Nonnull public IAPIRegistry getRegistry()
-
setRegistry
@Nonnull public void setRegistry(@Nonnull IAPIRegistry aRegistry)
Set the global registry to be used. Note: this API can only called BEFORE registrations are performed. Afterwards anIllegalStateExceptionis thrown if this API is invoked.- Parameters:
aRegistry- The registry to use. May not benull.
-
getInvoker
@Nonnull public IAPIInvoker getInvoker()
-
setInvoker
@Nonnull public void setInvoker(@Nonnull IAPIInvoker aInvoker)
Set the global invoker to be used. This can be changed during the runtime of the application and is independent of the registry state. Use this to e.g. increase the debug logging or tracing of the invocations.- Parameters:
aInvoker- The invoker to be used. May not benull.
-
toString
public String toString()
- Overrides:
toStringin classcom.helger.scope.singleton.AbstractSingleton
-
-