com.openexchange.mail
Class MailInitialization

java.lang.Object
  extended by com.openexchange.mail.MailInitialization
All Implemented Interfaces:
com.openexchange.cache.registry.CacheAvailabilityListener, com.openexchange.server.Initialization

public final class MailInitialization
extends java.lang.Object
implements com.openexchange.server.Initialization, com.openexchange.cache.registry.CacheAvailabilityListener

MailInitialization - Initializes whole mail implementation and therefore provides a central point for starting/stopping mail implementation.

Author:
Thorben Betten

Method Summary
static MailInitialization getInstance()
           
 void handleAbsence()
          Handles the (possibly temporary) absence of cache service
 void handleAvailability()
          Handles the (re-)availability of cache service
 boolean isInitialized()
           
 void shutDownCaches()
          Handles the (possibly temporary) unavailability of caching service
 void start()
           
 void startUpCaches()
          Handles the re-availability of caching service
 void stop()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static MailInitialization getInstance()
Returns:
The singleton instance of MailInitialization

start

public void start()
           throws com.openexchange.groupware.AbstractOXException
Specified by:
start in interface com.openexchange.server.Initialization
Throws:
com.openexchange.groupware.AbstractOXException

stop

public void stop()
Specified by:
stop in interface com.openexchange.server.Initialization

shutDownCaches

public void shutDownCaches()
                    throws com.openexchange.groupware.AbstractOXException
Handles the (possibly temporary) unavailability of caching service

Throws:
com.openexchange.groupware.AbstractOXException - If mail caches shut-down fails

startUpCaches

public void startUpCaches()
                   throws com.openexchange.groupware.AbstractOXException
Handles the re-availability of caching service

Throws:
com.openexchange.groupware.AbstractOXException - If mail caches start-up fails

handleAbsence

public void handleAbsence()
                   throws com.openexchange.groupware.AbstractOXException
Description copied from interface: com.openexchange.cache.registry.CacheAvailabilityListener
Handles the (possibly temporary) absence of cache service

Specified by:
handleAbsence in interface com.openexchange.cache.registry.CacheAvailabilityListener
Throws:
com.openexchange.groupware.AbstractOXException - If an error occurs

handleAvailability

public void handleAvailability()
                        throws com.openexchange.groupware.AbstractOXException
Description copied from interface: com.openexchange.cache.registry.CacheAvailabilityListener
Handles the (re-)availability of cache service

Specified by:
handleAvailability in interface com.openexchange.cache.registry.CacheAvailabilityListener
Throws:
com.openexchange.groupware.AbstractOXException - If an error occurs

isInitialized

public boolean isInitialized()