com.openexchange.mail
Class MailAccessWatcher

java.lang.Object
  extended by com.openexchange.mail.MailAccessWatcher

public final class MailAccessWatcher
extends java.lang.Object

MailAccessWatcher - Keeps track of connected instances of MailAccess and allows a forced close if connection time exceeds allowed time

Author:
Thorben Betten

Method Summary
static void addMailAccess(MailAccess<?,?> mailAccess)
          Adds specified mail access to this watcher's tracing if not already added before.
static int getNumberOfMailAccesses()
          Gets the number of currently tracked mail accesses.
static void removeMailAccess(MailAccess<?,?> mailAccess)
          Removes specified mail access from this watcher's tracing
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

addMailAccess

public static void addMailAccess(MailAccess<?,?> mailAccess)
Adds specified mail access to this watcher's tracing if not already added before. If already present its timestamp is updated.

Watcher is established if not running, yet

Parameters:
mailAccess - The mail access to add

removeMailAccess

public static void removeMailAccess(MailAccess<?,?> mailAccess)
Removes specified mail access from this watcher's tracing

Parameters:
mailAccess - The mail access to remove

getNumberOfMailAccesses

public static int getNumberOfMailAccesses()
Gets the number of currently tracked mail accesses.

Returns:
The number of currently tracked mail accesses