net.clackrouter.component.base
Class ComponentFinder

java.lang.Object
  extended by net.clackrouter.component.base.ComponentFinder

public class ComponentFinder
extends java.lang.Object

Implements the flow-based component discovery in a Clack router graph (not currently used).

It handles queries such as "find a queue that is downstream from me".


Constructor Summary
ComponentFinder()
           
 
Method Summary
protected  ClackComponent findConnectedIncoming(ClackComponent comp, int port_num, java.lang.String component_type_name)
          Find connected component whose packets may reach this component by recursing over all incoming connected links.
static ClackComponent findConnectedOutgoing(ClackComponent comp, int port_num, java.lang.String component_type_name)
          Find connected component whose packets may reach this component by recursing over all outgoing connected links.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ComponentFinder

public ComponentFinder()
Method Detail

findConnectedIncoming

protected ClackComponent findConnectedIncoming(ClackComponent comp,
                                               int port_num,
                                               java.lang.String component_type_name)
Find connected component whose packets may reach this component by recursing over all incoming connected links.

Parameters:
comp - the component uses as the search starting point
port_num - the exact port on the source component to search from
component_type_name - the type of component we are searching for (tested using Class.getName.equals())

findConnectedOutgoing

public static ClackComponent findConnectedOutgoing(ClackComponent comp,
                                                   int port_num,
                                                   java.lang.String component_type_name)
Find connected component whose packets may reach this component by recursing over all outgoing connected links.

Parameters:
comp - the starting component
port_num - the port to start the search on
component_type_name - name of component to search for