works
[fleet.git] / testCode / edu / berkeley / fleet / api / Path.java
1 package edu.berkeley.fleet.api;
2 import java.util.*;
3
4 /**
5  *  Represents a path through the switch fabric, from a Dock (source)
6  *  to a Destination, plus an optional "signal" value.
7  */
8 public abstract class Path {
9
10     /** The start of the path. */
11     public abstract Dock        getSource();
12
13     /** The end of the path. */
14     public abstract Destination getDestination();
15
16     /** The number of units of buffering along this path. */
17     public abstract int         getBufferingAmount();
18
19     /** A metric, in unspecified units, of the latency along this path; less is better. */
20     public abstract int         getLatencyMetric();
21
22     /** An additional quantity of bits to be transmitted along with a packet, or null if none. */
23     public abstract BitVector   getSignal();
24
25     public String toString() {
26         return getSource() + "->" + getDestination() + ((getSignal()==null||getSignal().length()==0)?"":(":"+getSignal()));
27     }
28
29 }