public class NetworkLayer extends NetworkElement
This class contains a representation of a network layer. This is an structure which contains a set of demands, multicast demands and links.
It also is characterized by a routing type, which can be SOURCE_ROUTING
, or
HOP_BY_HOP_ROUTING
. In layers with source routing, the
traffic is carried through routes and protection segments. In layers based on hop-by-hop routing, the traffic is forwarded as mandated by forwarding rules defined.
A layer can have a description message and a name, as well as attributes. The capacity of the links and the traffic of the demands can be measured
in different units. Note that in this schema, while links are associated to a single layer, nodes are not associated to layers, since they can have
input and output links at different layers.
Modifier and Type | Method and Description |
---|---|
void |
checkRoutingType(Constants.RoutingType routingType)
Checks whether routing type is the expected one.
|
String |
getDescription()
Returns the user-defined layer description
|
String |
getName()
Returns the layer name.
|
void |
setDescription(String description)
Sets the user-defined layer description
|
void |
setName(String name)
Sets the layer name.
|
String |
toString()
Returns a
String representation of the network layer. |
checkAttachedToNetPlanObject, checkAttachedToNetPlanObject, equals, getAttribute, getAttributes, getId, getIndex, getNetPlan, removeAllAttributes, removeAttribute, setAttribute, setAttributeMap, wasRemoved
public void checkRoutingType(Constants.RoutingType routingType)
routingType
- Expected RoutingType
public String getDescription()
Returns the user-defined layer description
public String getName()
Returns the layer name. It does not have to be unique among layers
public void setDescription(String description)
Sets the user-defined layer description
description
- The description messagepublic void setName(String name)
Sets the layer name. It does not have to be unique among layers.
name
- New layer namepublic String toString()
Returns a String
representation of the network layer.
toString
in class NetworkElement
String
representation of the network layer