Package org.apache.james.mime4j.storage
Class DefaultStorageProvider
- java.lang.Object
-
- org.apache.james.mime4j.storage.DefaultStorageProvider
-
public class DefaultStorageProvider extends java.lang.ObjectAllows for a defaultStorageProviderinstance to be configured on an application level.The default instance can be set by either calling
setInstance(StorageProvider)when the application starts up or by setting the system propertyorg.apache.james.mime4j.defaultStorageProviderto the class name of aStorageProviderimplementation.If neither option is used or if the class instantiation fails this class provides a pre-configured default instance.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringDEFAULT_STORAGE_PROVIDER_PROPERTYValue isorg.apache.james.mime4j.defaultStorageProviderprivate static StorageProviderinstance
-
Constructor Summary
Constructors Modifier Constructor Description privateDefaultStorageProvider()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static StorageProvidergetInstance()Returns the defaultStorageProviderinstance.private static voidinitialize()(package private) static voidreset()static voidsetInstance(StorageProvider instance)Sets the defaultStorageProviderinstance.
-
-
-
Field Detail
-
DEFAULT_STORAGE_PROVIDER_PROPERTY
public static final java.lang.String DEFAULT_STORAGE_PROVIDER_PROPERTY
Value isorg.apache.james.mime4j.defaultStorageProvider- See Also:
- Constant Field Values
-
instance
private static volatile StorageProvider instance
-
-
Method Detail
-
getInstance
public static StorageProvider getInstance()
Returns the defaultStorageProviderinstance.- Returns:
- the default
StorageProviderinstance.
-
setInstance
public static void setInstance(StorageProvider instance)
Sets the defaultStorageProviderinstance.- Parameters:
instance- the defaultStorageProviderinstance.
-
initialize
private static void initialize()
-
reset
static void reset()
-
-