Package com.xpdustry.distributor.common
Class DistributorProvider
java.lang.Object
com.xpdustry.distributor.common.DistributorProvider
A holder for the global
Distributor factory.-
Method Summary
Modifier and TypeMethodDescriptionstatic voidclear()Clears the globalDistributorfactory.static Distributorget()Returns the globalDistributorfactory.static booleanReturns whether the API has been initialized.static voidset(Distributor distributor) Sets the globalDistributorfactory.
-
Method Details
-
get
Returns the globalDistributorfactory.- Throws:
DistributorInitializationException- if the API hasn't been initialized yet
-
set
Sets the globalDistributorfactory.- Throws:
DistributorInitializationException- if the API has already been initialized
-
clear
public static void clear()Clears the globalDistributorfactory.- Throws:
DistributorInitializationException- if the API hasn't been initialized yet
-
isInitialized
public static boolean isInitialized()Returns whether the API has been initialized.
-