org.norther.tammi.core.monitor
Class DefaultFinalizer

java.lang.Object
  extended by org.norther.tammi.core.base.Adaptee
      extended by org.norther.tammi.core.thread.DefaultExecutable
          extended by org.norther.tammi.core.monitor.DefaultFinalizer
All Implemented Interfaces:
Serializable, Runnable, NotificationBroadcaster, NotificationEmitter, Manageable, MBeanDelegate, Startable, Finalizer, Executable

public class DefaultFinalizer
extends DefaultExecutable
implements Finalizer

A default implementation of Finalizer.

Author:
Ilkka Priha
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.norther.tammi.core.base.Adaptee
ADAPTEE_NOTIF_DESCRIPTION, ADAPTEE_NOTIFICATIONS
 
Fields inherited from interface org.norther.tammi.core.base.MBeanDelegate
ARRAY_TYPE, OBJECT_TYPE, PRIMITIVE_TYPE, STRING_TYPE
 
Constructor Summary
DefaultFinalizer()
          Constructs a new finalizer.
 
Method Summary
 PhantomReference addPhantomListener(Object referent, QueueListener listener)
          Adds a new phantom reference to the reference queue and registers its listener.
 SoftReference addSoftListener(Object referent, QueueListener listener)
          Adds a new soft reference to the reference queue and registers its listener.
 WeakReference addWeakListener(Object referent, QueueListener listener)
          Adds a new weak reference to the reference queue and registers its listener.
 void removeListener(Reference reference)
          Removes the registered listener of a reference.
 void run()
           
 
Methods inherited from class org.norther.tammi.core.thread.DefaultExecutable
getExecutor, getExecutorName, isStarted, postmanaged, setExecutorName, start, stop, unmanaged
 
Methods inherited from class org.norther.tammi.core.base.Adaptee
addAdaptee, addNotificationListener, getAttributeSupport, getBroker, getCanonicalName, getDomain, getFactory, getLoader, getLog, getLog, getMBean, getMBeanServer, getNotificationInfo, getObjectName, getRegistrationTime, getSequenceNumber, hasListeners, isRegistered, premanaged, removeNotificationListener, removeNotificationListener, sendNotification, sendNotification, sendNotification, sendNotification, unregister
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.norther.tammi.core.thread.Executable
getExecutorName, setExecutorName
 
Methods inherited from interface org.norther.tammi.core.base.Startable
isStarted, start, stop
 

Constructor Detail

DefaultFinalizer

public DefaultFinalizer()
Constructs a new finalizer.

Method Detail

addPhantomListener

public PhantomReference addPhantomListener(Object referent,
                                           QueueListener listener)
Description copied from interface: Finalizer
Adds a new phantom reference to the reference queue and registers its listener.

Specified by:
addPhantomListener in interface Finalizer
Parameters:
referent - the referent of the reference.
listener - a listener for the enqueued referent.
Returns:
the new phantom reference.

addWeakListener

public WeakReference addWeakListener(Object referent,
                                     QueueListener listener)
Description copied from interface: Finalizer
Adds a new weak reference to the reference queue and registers its listener.

Specified by:
addWeakListener in interface Finalizer
Parameters:
referent - the referent of the reference.
listener - a listener for the enqueued referent.
Returns:
the new weak reference.

addSoftListener

public SoftReference addSoftListener(Object referent,
                                     QueueListener listener)
Description copied from interface: Finalizer
Adds a new soft reference to the reference queue and registers its listener.

Specified by:
addSoftListener in interface Finalizer
Parameters:
referent - the referent of the reference.
listener - a listener for the enqueued referent.
Returns:
the new soft reference.

removeListener

public void removeListener(Reference reference)
Description copied from interface: Finalizer
Removes the registered listener of a reference.

Specified by:
removeListener in interface Finalizer
Parameters:
reference - the reference.

run

public void run()
Specified by:
run in interface Runnable
Overrides:
run in class DefaultExecutable


Copyright © 2004 The Norther Organization. All rights reserved.