|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--SSF.OS.BGP4.Path.Segment
An AS path segment. A path segment is a grouping of ASes (indicated by NHI address prefix) which comprises a portion of an AS path. A segment can either be an unordered set of ASes or an ordered sequence of ASes.
| Field Summary | |
java.util.ArrayList |
asnhs
The AS NHI prefix addresses which make up this segment of the path. |
static int |
SEQ
Indicates a segment type of AS_SEQUENCE, meaning that the ASes in the segment are ordered. |
static int |
SET
Indicates a segment type of AS_SET, meaning that the ASes in the segment are not ordered. |
int |
typ
The type of the path segment. |
| Constructor Summary | |
Segment()
Empty constructor. |
|
Segment(int ty,
java.util.ArrayList asn)
Generic constructor for initializing member data. |
|
Segment(Segment seg)
Constructs a path segment based on another one. |
|
| Method Summary | |
void |
append_as(java.lang.String asnh)
Adds an AS NHI prefix address to the end of the list. |
boolean |
contains(java.lang.String asnh)
Determines whether or not this path segment contains a given AS. |
boolean |
equals(Segment seg)
Returns true only if the two path segments are equivalent. |
void |
prepend_as(java.lang.String asnh)
Adds an AS NHI prefix address to the beginning of the list. |
void |
readExternal(java.io.DataInput in)
Reads the contents of this object from a serialization stream. |
void |
readExternal(java.io.ObjectInput in)
|
int |
size()
Returns the number of ASes in this path segment. |
java.lang.String |
toMinString()
Returns this path segment as a string, leaving out set/sequence info. |
java.lang.String |
toMinString(char sepchar,
boolean usenhi)
Returns this path segment as a string, leaving out set/sequence info. |
java.lang.String |
toString()
Returns this path segment as a string. |
void |
writeExternal(java.io.DataOutput out)
Writes the contents of this object to a serialization stream. |
void |
writeExternal(java.io.ObjectOutput out)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final int SET
public static final int SEQ
public int typ
public java.util.ArrayList asnhs
| Constructor Detail |
public Segment()
public Segment(int ty,
java.util.ArrayList asn)
ty - The type of the path segment.asn - The AS NHI prefix addresses making up the path segment.public Segment(Segment seg)
| Method Detail |
public final int size()
public boolean contains(java.lang.String asnh)
asnh - The NHI prefix of the AS to look for in this segment.
public final void prepend_as(java.lang.String asnh)
public final void append_as(java.lang.String asnh)
asnh - The AS NHI prefix address to append to this segment.public boolean equals(Segment seg)
seg - The path segment to compare with this one.
public final java.lang.String toMinString(char sepchar,
boolean usenhi)
sepchar - The character used to separate ASes in the string.usenhi - Whether to show ASes as NHI address prefixes or numbers
public final java.lang.String toMinString()
public final java.lang.String toString()
toString in class java.lang.Object
public void writeExternal(java.io.ObjectOutput out)
throws java.io.IOException
writeExternal in interface java.io.Externalizablejava.io.IOException
public void writeExternal(java.io.DataOutput out)
throws java.io.IOException
java.io.IOException - if there's an error writing the data
public void readExternal(java.io.ObjectInput in)
throws java.io.IOException,
java.lang.ClassNotFoundException
readExternal in interface java.io.Externalizablejava.io.IOException
java.lang.ClassNotFoundException
public void readExternal(java.io.DataInput in)
throws java.io.IOException,
java.lang.ClassNotFoundException
java.io.IOException - if there's an error reading in the data
java.lang.ClassNotFoundException - if a class name is unrecognized
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||