Package org.apache.james.mime4j.storage
Class DefaultStorageProvider
java.lang.Object
org.apache.james.mime4j.storage.DefaultStorageProvider
Allows for a default
StorageProvider
instance 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 property
org.apache.james.mime4j.defaultStorageProvider
to the class
name of a StorageProvider
implementation.
If neither option is used or if the class instantiation fails this class provides a pre-configured default instance.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
Value isorg.apache.james.mime4j.defaultStorageProvider
private static StorageProvider
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StorageProvider
Returns the defaultStorageProvider
instance.private static void
(package private) static void
reset()
static void
setInstance
(StorageProvider instance) Sets the defaultStorageProvider
instance.
-
Field Details
-
DEFAULT_STORAGE_PROVIDER_PROPERTY
Value isorg.apache.james.mime4j.defaultStorageProvider
- See Also:
-
instance
-
-
Constructor Details
-
DefaultStorageProvider
private DefaultStorageProvider()
-
-
Method Details
-
getInstance
Returns the defaultStorageProvider
instance.- Returns:
- the default
StorageProvider
instance.
-
setInstance
Sets the defaultStorageProvider
instance.- Parameters:
instance
- the defaultStorageProvider
instance.
-
initialize
private static void initialize() -
reset
static void reset()
-