com.phoenixst.plexus.util

Class FilteredGraphListener

public class FilteredGraphListener extends ForwardingGraphListener

A GraphListener which filters events to be forwarded to an ObservableGraphDelegate. Instances of this class only keep a WeakReference to their delegates. If that Reference has been cleared when an event is received, this listener will remove itself as a listener of the Graph which sent the event. Because of this, it is necessary for the Graph which is using this listener to maintain a strong reference to the ObservableGraphDelegate.

Since: 1.0

Version: $Revision: 1.3 $

Author: Ray A. Conner

Constructor Summary
FilteredGraphListener(Predicate nodePredicate, Predicate edgePredicate, ObservableGraphDelegate observableDelegate)
Method Summary
voidedgeAdded(GraphEvent event)
voidedgeRemoved(GraphEvent event)
voidnodeAdded(GraphEvent event)
voidnodeRemoved(GraphEvent event)

Constructor Detail

FilteredGraphListener

public FilteredGraphListener(Predicate nodePredicate, Predicate edgePredicate, ObservableGraphDelegate observableDelegate)

Method Detail

edgeAdded

public void edgeAdded(GraphEvent event)

edgeRemoved

public void edgeRemoved(GraphEvent event)

nodeAdded

public void nodeAdded(GraphEvent event)

nodeRemoved

public void nodeRemoved(GraphEvent event)
See the Plexus project home, hosted by SourceForge.
Copyright B) 1994-2006, by Phoenix Software Technologists, Inc. and others. All Rights Reserved. Use is subject to license terms.