be.ac.ulg.montefiore.run.totem.domain.model.impl
Class DomainImpl

java.lang.Object
  extended by be.ac.ulg.montefiore.run.totem.domain.model.jaxb.impl.DomainTypeImpl
      extended by be.ac.ulg.montefiore.run.totem.domain.model.jaxb.impl.DomainImpl
          extended by be.ac.ulg.montefiore.run.totem.domain.model.impl.DomainImpl
All Implemented Interfaces:
Domain, DomainType, UnmarshallableObject, ValidatableObject, XMLSerializable, com.sun.xml.bind.JAXBObject, com.sun.xml.bind.RIElement, javax.xml.bind.Element

public class DomainImpl
extends DomainImpl
implements Domain

Implementation of a network domain.

Creation date : 19-Jan-2005 14:28:33

Author:
Fabian Skivee (skivee@run.montefiore.ulg.ac.be), Bruno Quoitin (bqu@info.ucl.ac.be), Simon Balon (balon@run.montefiore.ulg.ac.be)

Nested Class Summary
 
Nested classes/interfaces inherited from class be.ac.ulg.montefiore.run.totem.domain.model.jaxb.impl.DomainImpl
DomainImpl.Unmarshaller
 
Field Summary
 
Fields inherited from class be.ac.ulg.montefiore.run.totem.domain.model.jaxb.impl.DomainImpl
version
 
Fields inherited from class be.ac.ulg.montefiore.run.totem.domain.model.jaxb.impl.DomainTypeImpl
_ASID, _Bgp, _Igp, _Info, _Mpls, _Name, _Topology, has_ASID
 
Constructor Summary
DomainImpl()
          Simple constructor.
DomainImpl(int ASID)
          Create a Domain with a specified ASID
 
Method Summary
 void addBgpRouter(BgpRouter router)
           
 void addLink(Link link)
          Add a link to the domain
 void addLsp(Lsp lsp)
          Add a Lsp in the domain
 void addLsp(Lsp lsp, boolean preemption)
          Add a Lsp in the domain
 void addNode(Node node)
          Add a node to the domain
 void addPriorityLevel(int priority, int classType, int preemptionLevel)
          Adds a priority level.
 java.lang.String generateDetourLspId(java.lang.String protectedId, int methodType, int protectionType)
          Generate an id for a new detour LSP, based on the detour lsp parameters A conversion for this new id is automatically added to the convertor.
 java.lang.String generateLspId()
          Generate a unique LSP id.
 java.util.List<BgpRouter> getAllBgpRouters()
          Returns the list of all BGP routers.
 int[] getAllCTId()
          Returns an array of all available CTs
 java.util.List<Link> getAllLinks()
          Return a list of all links and a empty list if there is no links.
 java.util.List<Lsp> getAllLsps()
          Get a list of all LSPs
 java.util.List<Node> getAllNodes()
          Return a list of all nodes and an empty if there is no nodes
 java.util.List<Lsp> getAllPrimaryLsps()
          Get a list of all primary LSPs
 java.util.List<Information.DiffServType.PriorityType> getAllPriorities()
          Return a list of all priorities and null if there is no priorities
 java.lang.String getAuthor()
           
 java.util.List<Lsp> getBackupsOfPrimary(Lsp primaryLsp)
          Deprecated. use Lsp.getBackups()
 BandwidthManagement getBandwidthManagement()
          Returns the bandwidth management object associated with the domain
 BandwidthUnit getBandwidthUnit()
          Returns the bandwidth unit used in the domain.
 BgpRouter getBgpRouter(java.lang.String id)
          Returns the BGP router with the specified Id.
 int getClassType(int priority)
          Returns the class type corresponding to a priority
 DomainConvertor getConvertor()
          Get the domain convertor
 java.util.Calendar getDate()
           
 DelayUnit getDelayUnit()
          Returns the delay unit used in the domain.
 java.lang.String getDescription()
          Get the description of a domain
 DomainStatistics getDomainStatistics()
          Get the domain statistics
 Link getLink(java.lang.String id)
          Return the link with the specified id
 Link getLinkBetweenNodes(java.lang.String srcNodeId, java.lang.String srcIfId, java.lang.String dstNodeId, java.lang.String dstIfId)
          Returns the link between srcNode and dstNode and using the specified interfaces.
 Link getLinkFrom(java.lang.String nodeId, java.lang.String nodeInterfaceId)
          Returns the link connecting the given interface on the given source node.
 LinkIgp getLinkIgp(java.lang.String linkId)
          Get a LinkIgp from the specified linkId
 java.util.List<Link> getLinksBetweenNodes(Node srcNode, Node dstNode)
          Get the list of the UP links between srcNode and dstNode and a empty list if there is no links.
 java.util.List<Link> getLinksBetweenNodes(java.lang.String srcNodeId, java.lang.String dstNodeId)
          Get the list of the UP links between srcNode and dstNode and a empty list if there is no links.
 Link getLinkTo(java.lang.String nodeId, java.lang.String nodeInterfaceId)
          Returns the link connecting the given interface on the given destination node.
 java.util.List<java.lang.Integer> getLowerPLs(int priority)
          Returns all the priorities corresponding to same CT as priority but lower preemption level (higher numerical value)
 java.util.List<java.lang.Integer> getLowerPLsAllCTs(int priority)
          Returns all the priorities at lower preemption level (higher numerical value)
 Lsp getLsp(java.lang.String id)
          Return the Lsp with the specified id
 java.util.List<Lsp> getLsps(Node ingress, Node egress)
          Get the list of LSPs between ingress node and egress node
 java.util.List<Lsp> getLspsOnLink(Link link)
          Get all the LSPs that use the link
 java.util.List<Lsp> getLspStartingAtIngress(Node ingress)
          Get all the LSPs that begins at the specified ingress node
 int getMaxCTvalue()
          Obtain the maximum numerical value of CT (lowest priority)
 int getMaxPLvalue()
          Obtain the maximum numerical value of preemption level (lowest priority)
 int getMaxPLValue(int ctValue)
          Obtain the maximum numerical value of preemption level for a given Class Type
 int getMaxPreemptionLevel(int CT)
          Gets the maximum Preemption Level (lowest numerical value) for a given class type.
 int getMinCTValue()
          Obtain the minimum numerical value of CT (highest priority)
 int getMinPLValue()
           
 int getMinPriority()
          Gets the default minimum Priority (ie for lowest priority Class Type and lowest corresponding priority level);
 int getMinPriority(int ctValue)
          Gets the minimum priority for the given Class Type (ie lowest priority level for the class type)
 int getNbCT()
          Gets the number of different class types
 int getNbLinks()
          Return the number of links
 int getNbLsps()
          Get the number of LSPs
 int getNbNodes()
          Return the number of nodes
 int getNbPriority()
          Get the number of priority levels
 Node getNode(java.lang.String id)
          Get the node of the specified id
 Node getNodeByRid(java.lang.String IP)
          Returns the node that as the given IP address as router id.
 DomainChangeObserver getObserver()
          Get the observer
 int getPreemptionLevel(int priority)
          Returns the preemption level corresponding to a priority
 java.util.List<java.lang.Integer> getPreemptionLevels(int classType)
          Returns the preemption levels corresponding to a given class type
 java.util.List<Lsp> getPrimaryLsps(Node ingress, Node egress)
           
 java.util.List<java.lang.Integer> getPriorities()
          Return a list of all priorities identifiers
 int getPriority(int preemption, int classtype)
          Returns the priority corresponding to a preemption level and a class type
 int getPriorityHighPL(int priority)
          Returns the priority corresponding to the same CT but a just higher preemption level (lower numerical value)
 java.util.List<java.lang.Integer> getPrioritySameCT(int CT)
          Returns all priorities corresponding to a same CT
 Link getReverseLink(Link link)
          Returns the reverse link for link link.
 java.util.List<Link> getReverseLinks(Link link)
          Returns the list of reverse links for link link.
 java.util.List<Link> getReverseLinks(java.lang.String linkId)
          Returns the list of reverse links for link linkId.
 SPFCache getSPFCache()
          Get the SPFCache
 SwitchingMethod getSwitchingMethod()
           
 java.lang.String getTitle()
           
 java.util.List<Link> getUpLinks()
          Get all the up links
 java.util.List<Node> getUpNodes()
          Get the list of all up nodes.
 java.net.URI getURI()
          Get the URI from which the domain was loaded
 DomainValidator getValidator()
          Get the validator
 void init(boolean removeMultipleLink, boolean useBwSharing)
          Init all the index and give the Domain reference to Link, Node and Lsp.
 boolean isExistingPriority(int priority)
          Tells if this priority value exists or not
 boolean isExistingPriority(int preemptionLevel, int classType)
          Tells if the couple preemptionLevel/classType corresponds to an existing priority level
 void removeAllLsps()
          Removes all the LSPs from the Domain.
 void removeBgpRouters()
           
 void removeLink(Link link)
          Remove a link from the domain.
 void removeLsp(Lsp lsp)
          Remove a Lsp
 void removeLsp(Lsp lsp, boolean isReroute)
           
 void removeNode(Node node)
          Remove a node from the domain.
 boolean removePriorityLevel(int priority)
          Removes the given priority level.
 void renameLink(java.lang.String oldId, java.lang.String newId)
           
 void renameLsp(java.lang.String oldId, java.lang.String newId)
          Rename an lsp of the domain.
 void renameNode(java.lang.String oldId, java.lang.String newId)
           
 void setAuthor(java.lang.String author)
           
 void setBandWidthUnit(BandwidthUnit unit)
          Change the bandwidth unit used in the domain.
 void setDate(java.util.Calendar date)
           
 void setDelayUnit(DelayUnit unit)
          Change the delay unit used in the domain.
 void setDescription(java.lang.String description)
          Set the description of a domain
 void setSwitchingMethod(SwitchingMethod sm)
           
 void setTitle(java.lang.String title)
           
 void setURI(java.net.URI uri)
          Set the URI from which the domain was loaded
 boolean useBandwidthSharing()
          returns true if the domain uses bandwidth management
 boolean usePreemption()
          Return true if the domain can use preemption.
 
Methods inherited from class be.ac.ulg.montefiore.run.totem.domain.model.jaxb.impl.DomainImpl
____jaxb_ri____getLocalName, ____jaxb_ri____getNamespaceURI, createRawValidator, createUnmarshaller, getPrimaryInterface, serializeAttributes, serializeBody, serializeURIs
 
Methods inherited from class be.ac.ulg.montefiore.run.totem.domain.model.jaxb.impl.DomainTypeImpl
getASID, getBgp, getIgp, getInfo, getMpls, getName, getTopology, isSetASID, isSetBgp, isSetIgp, isSetInfo, isSetMpls, isSetName, isSetTopology, setASID, setBgp, setIgp, setInfo, setMpls, setName, setTopology, unsetASID, unsetBgp, unsetIgp, unsetInfo, unsetMpls, unsetName, unsetTopology
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface be.ac.ulg.montefiore.run.totem.domain.model.Domain
getASID, getName, setASID, setName
 
Methods inherited from interface be.ac.ulg.montefiore.run.totem.domain.model.jaxb.DomainType
getASID, getBgp, getIgp, getInfo, getMpls, getName, getTopology, isSetASID, isSetBgp, isSetIgp, isSetInfo, isSetMpls, isSetName, isSetTopology, setASID, setBgp, setIgp, setInfo, setMpls, setName, setTopology, unsetASID, unsetBgp, unsetIgp, unsetInfo, unsetMpls, unsetName, unsetTopology
 

Constructor Detail

DomainImpl

public DomainImpl()
Simple constructor. Needed by JAXB


DomainImpl

public DomainImpl(int ASID)
Create a Domain with a specified ASID

Parameters:
ASID -
Method Detail

getConvertor

public DomainConvertor getConvertor()
Get the domain convertor

Returns:

getObserver

public DomainChangeObserver getObserver()
Get the observer

Returns:

getValidator

public DomainValidator getValidator()
Get the validator

Returns:

getDomainStatistics

public DomainStatistics getDomainStatistics()
Get the domain statistics

Returns:

getBandwidthManagement

public BandwidthManagement getBandwidthManagement()
Returns the bandwidth management object associated with the domain

Returns:

useBandwidthSharing

public boolean useBandwidthSharing()
returns true if the domain uses bandwidth management

Returns:

getSPFCache

public SPFCache getSPFCache()
Get the SPFCache

Returns:
the SPFCache

getURI

public java.net.URI getURI()
Get the URI from which the domain was loaded

Returns:
the URI of the domain

setURI

public void setURI(java.net.URI uri)
Set the URI from which the domain was loaded

Parameters:
uri -

getBandwidthUnit

public BandwidthUnit getBandwidthUnit()
Returns the bandwidth unit used in the domain.


setBandWidthUnit

public void setBandWidthUnit(BandwidthUnit unit)
Change the bandwidth unit used in the domain. It DOES NOT convert the units. This function is intended to be used only on new Domain object to change default value (mbps).


getDelayUnit

public DelayUnit getDelayUnit()
Returns the delay unit used in the domain.


setDelayUnit

public void setDelayUnit(DelayUnit unit)
Change the delay unit used in the domain. It DOES NOT convert the units. This function is intended to be used only on new Domain object to change default value (ms).


setSwitchingMethod

public void setSwitchingMethod(SwitchingMethod sm)

getSwitchingMethod

public SwitchingMethod getSwitchingMethod()

getDescription

public java.lang.String getDescription()
Get the description of a domain

Returns:

setDescription

public void setDescription(java.lang.String description)
Set the description of a domain

Parameters:
description -

getTitle

public java.lang.String getTitle()

setTitle

public void setTitle(java.lang.String title)

getDate

public java.util.Calendar getDate()

setDate

public void setDate(java.util.Calendar date)

getAuthor

public java.lang.String getAuthor()

setAuthor

public void setAuthor(java.lang.String author)

init

public void init(boolean removeMultipleLink,
                 boolean useBwSharing)
          throws InvalidDomainException
Init all the index and give the Domain reference to Link, Node and Lsp. Create the DomainConvertor.

Parameters:
removeMultipleLink - true if the multiple links must be removed (@see DomainValidator)
Throws:
InvalidDomainException - If the domain is not valid (ex: if the one the LSPs has bad path)

getNode

public Node getNode(java.lang.String id)
             throws NodeNotFoundException
Get the node of the specified id

Parameters:
id -
Returns:
the node
Throws:
NodeNotFoundException

getNodeByRid

public Node getNodeByRid(java.lang.String IP)
                  throws NodeNotFoundException
Returns the node that as the given IP address as router id.

Parameters:
IP - ip address of the node
Returns:
the node whose rid is IP.
Throws:
NodeNotFoundException - when no node exists in the domain with the given IP address.

addNode

public void addNode(Node node)
             throws NodeAlreadyExistException
Add a node to the domain

Parameters:
node -
Throws:
NodeAlreadyExistException

removeNode

public void removeNode(Node node)
                throws NodeNotFoundException,
                       LinkNotFoundException
Remove a node from the domain. WARNING : use this method carrefully. When removing a node, all the in and out links will be remove. Prefer using the node.setNodeStatus(NODE.STATUS_DOWN) method.

Parameters:
node -
Throws:
NodeNotFoundException
LinkNotFoundException

getNbNodes

public int getNbNodes()
Return the number of nodes

Returns:

getAllNodes

public java.util.List<Node> getAllNodes()
Return a list of all nodes and an empty if there is no nodes

Returns:

getUpNodes

public java.util.List<Node> getUpNodes()
Get the list of all up nodes.

Returns:

getLinksBetweenNodes

public java.util.List<Link> getLinksBetweenNodes(Node srcNode,
                                                 Node dstNode)
                                          throws NodeNotFoundException
Get the list of the UP links between srcNode and dstNode and a empty list if there is no links.

Parameters:
srcNode -
dstNode -
Returns:
the list of the links between srcNode and dstNode and a empty list if there is no links.
Throws:
NodeNotFoundException

getLinksBetweenNodes

public java.util.List<Link> getLinksBetweenNodes(java.lang.String srcNodeId,
                                                 java.lang.String dstNodeId)
                                          throws NodeNotFoundException
Get the list of the UP links between srcNode and dstNode and a empty list if there is no links.

Parameters:
srcNodeId -
dstNodeId -
Returns:
the list of the links between srcNode and dstNode and a empty list if there is no links.
Throws:
NodeNotFoundException

getLinkBetweenNodes

public Link getLinkBetweenNodes(java.lang.String srcNodeId,
                                java.lang.String srcIfId,
                                java.lang.String dstNodeId,
                                java.lang.String dstIfId)
                         throws LinkNotFoundException,
                                NodeNotFoundException,
                                NodeInterfaceNotFoundException
Returns the link between srcNode and dstNode and using the specified interfaces.

Parameters:
srcNodeId - The source node ID.
srcIfId - The source interface ID.
dstNodeId - The destination node ID.
dstIfId - The destination interface ID.
Returns:
The link between srcNode and dstNode and using the specified interfaces.
Throws:
LinkNotFoundException
NodeNotFoundException
NodeInterfaceNotFoundException

getReverseLink

public Link getReverseLink(Link link)
                    throws NodeNotFoundException
Returns the reverse link for link link. It is the opposite link that connects the same interfaces if interfaces are defined or the link between the destination and the source node if there is only one. Otherwise, null is returned.

Parameters:
link - The link to consider.
Returns:
The list of reverse links for link link.
Throws:
NodeNotFoundException

getReverseLinks

public java.util.List<Link> getReverseLinks(Link link)
                                     throws NodeNotFoundException
Returns the list of reverse links for link link.

Parameters:
link - The link to consider.
Returns:
The list of reverse links for link link.
Throws:
NodeNotFoundException

getReverseLinks

public java.util.List<Link> getReverseLinks(java.lang.String linkId)
                                     throws NodeNotFoundException,
                                            LinkNotFoundException
Returns the list of reverse links for link linkId.

Parameters:
linkId - The ID of the link to consider.
Returns:
The list of reverse links for link linkId.
Throws:
LinkNotFoundException
NodeNotFoundException

getLink

public Link getLink(java.lang.String id)
             throws LinkNotFoundException
Return the link with the specified id

Parameters:
id -
Returns:
Throws:
LinkNotFoundException

getLinkFrom

public Link getLinkFrom(java.lang.String nodeId,
                        java.lang.String nodeInterfaceId)
                 throws NodeNotFoundException,
                        NodeInterfaceNotFoundException,
                        LinkNotFoundException
Returns the link connecting the given interface on the given source node.

Returns:
The link connecting the given interface on the given source node.
Throws:
NodeNotFoundException
NodeInterfaceNotFoundException
LinkNotFoundException

getLinkTo

public Link getLinkTo(java.lang.String nodeId,
                      java.lang.String nodeInterfaceId)
               throws NodeNotFoundException,
                      NodeInterfaceNotFoundException,
                      LinkNotFoundException
Returns the link connecting the given interface on the given destination node.

Returns:
The link connecting the given interface on the given destination node.
Throws:
NodeNotFoundException
NodeInterfaceNotFoundException
LinkNotFoundException

getNbLinks

public int getNbLinks()
Return the number of links

Returns:

addLink

public void addLink(Link link)
             throws LinkAlreadyExistException,
                    NodeNotFoundException
Add a link to the domain

Parameters:
link -
Throws:
LinkAlreadyExistException - if a link with the same id already exist in the domain
NodeNotFoundException

removeLink

public void removeLink(Link link)
                throws LinkNotFoundException
Remove a link from the domain. WARNING : use this method carrefully. This method removes all the LSP crossing the removed link. You can change the status of a link if you want to simulate a failure of this link.

Parameters:
link -
Throws:
LinkNotFoundException - if the link is not found in the domain

getAllLinks

public java.util.List<Link> getAllLinks()
Return a list of all links and a empty list if there is no links.

Returns:

getUpLinks

public java.util.List<Link> getUpLinks()
Get all the up links

Returns:

generateLspId

public java.lang.String generateLspId()
Generate a unique LSP id.

Returns:

generateDetourLspId

public java.lang.String generateDetourLspId(java.lang.String protectedId,
                                            int methodType,
                                            int protectionType)
Generate an id for a new detour LSP, based on the detour lsp parameters A conversion for this new id is automatically added to the convertor. The format of the generated id is
("GlobalBackup-" | "LocalBackup-") minimum_number "-" protected_lsp_id
The protection type is thus not used.

Parameters:
protectedId - id of the protected lsp
methodType -
protectionType -
Returns:
a new id

getLsp

public Lsp getLsp(java.lang.String id)
           throws LspNotFoundException
Return the Lsp with the specified id

Parameters:
id -
Returns:
Throws:
LspNotFoundException

getLsps

public java.util.List<Lsp> getLsps(Node ingress,
                                   Node egress)
Get the list of LSPs between ingress node and egress node

Parameters:
ingress - the ingress node
egress - the egress node
Returns:
the list of LSPs between ingress node and egress node

getPrimaryLsps

public java.util.List<Lsp> getPrimaryLsps(Node ingress,
                                          Node egress)

addLsp

public void addLsp(Lsp lsp)
            throws LinkCapacityExceededException,
                   LspAlreadyExistException,
                   LspNotFoundException,
                   DiffServConfigurationException
Add a Lsp in the domain

Parameters:
lsp -
Throws:
LinkCapacityExceededException
LspAlreadyExistException
LspNotFoundException - If it is a backup LSP and the primary LSP cannot be found.
DiffServConfigurationException

addLsp

public void addLsp(Lsp lsp,
                   boolean preemption)
            throws LinkCapacityExceededException,
                   LspAlreadyExistException,
                   LspNotFoundException,
                   DiffServConfigurationException
Add a Lsp in the domain

Parameters:
lsp -
preemption - tells if preemption should be used
Throws:
LinkCapacityExceededException
LspAlreadyExistException
LspNotFoundException - If it is a backup LSP and the primary LSP cannot be found.
DiffServConfigurationException

removeLsp

public void removeLsp(Lsp lsp)
               throws LspNotFoundException
Remove a Lsp

Parameters:
lsp -
Throws:
LspNotFoundException

removeLsp

public void removeLsp(Lsp lsp,
                      boolean isReroute)
               throws LspNotFoundException
Throws:
LspNotFoundException

removeAllLsps

public void removeAllLsps()
Removes all the LSPs from the Domain.


getNbLsps

public int getNbLsps()
Get the number of LSPs

Returns:

getAllLsps

public java.util.List<Lsp> getAllLsps()
Get a list of all LSPs

Returns:

getAllPrimaryLsps

public java.util.List<Lsp> getAllPrimaryLsps()
Get a list of all primary LSPs

Returns:

getBackupsOfPrimary

public java.util.List<Lsp> getBackupsOfPrimary(Lsp primaryLsp)
Deprecated. use Lsp.getBackups()

Get all the backups Lsp of a primary LSP

Parameters:
primaryLsp -
Returns:

getLspsOnLink

public java.util.List<Lsp> getLspsOnLink(Link link)
Get all the LSPs that use the link

Parameters:
link -
Returns:

getLspStartingAtIngress

public java.util.List<Lsp> getLspStartingAtIngress(Node ingress)
Get all the LSPs that begins at the specified ingress node

Parameters:
ingress - the ingress node
Returns:
the list of LSPs begins at ingress node

renameLsp

public void renameLsp(java.lang.String oldId,
                      java.lang.String newId)
               throws LspNotFoundException,
                      LspAlreadyExistException
Rename an lsp of the domain.

Parameters:
oldId -
newId -
Throws:
LspNotFoundException - If the lsp cannot be found in the domain
LspAlreadyExistException - If the lsp already exists

renameNode

public void renameNode(java.lang.String oldId,
                       java.lang.String newId)
                throws NodeNotFoundException,
                       IdException,
                       NodeAlreadyExistException
Throws:
NodeNotFoundException
IdException
NodeAlreadyExistException

renameLink

public void renameLink(java.lang.String oldId,
                       java.lang.String newId)
                throws LinkNotFoundException,
                       LinkAlreadyExistException,
                       IdException
Throws:
LinkNotFoundException
LinkAlreadyExistException
IdException

getPriority

public int getPriority(int preemption,
                       int classtype)
Returns the priority corresponding to a preemption level and a class type

Parameters:
preemption -
classtype -
Returns:

usePreemption

public boolean usePreemption()
Return true if the domain can use preemption. Preemption cannot be used if bandwidth sharing is enabled.

Returns:

getPreemptionLevel

public int getPreemptionLevel(int priority)
Returns the preemption level corresponding to a priority

Parameters:
priority -
Returns:

getPreemptionLevels

public java.util.List<java.lang.Integer> getPreemptionLevels(int classType)
Returns the preemption levels corresponding to a given class type

Parameters:
classType -
Returns:

getClassType

public int getClassType(int priority)
Returns the class type corresponding to a priority

Parameters:
priority -
Returns:

isExistingPriority

public boolean isExistingPriority(int preemptionLevel,
                                  int classType)
Tells if the couple preemptionLevel/classType corresponds to an existing priority level

Parameters:
preemptionLevel -
classType -
Returns:

isExistingPriority

public boolean isExistingPriority(int priority)
Tells if this priority value exists or not

Parameters:
priority -
Returns:

getMinPriority

public int getMinPriority()
Gets the default minimum Priority (ie for lowest priority Class Type and lowest corresponding priority level);

Returns:

getMinPriority

public int getMinPriority(int ctValue)
Gets the minimum priority for the given Class Type (ie lowest priority level for the class type)

Parameters:
ctValue -
Returns:

getMaxCTvalue

public int getMaxCTvalue()
Obtain the maximum numerical value of CT (lowest priority)


getMinCTValue

public int getMinCTValue()
Obtain the minimum numerical value of CT (highest priority)


getMaxPLValue

public int getMaxPLValue(int ctValue)
Obtain the maximum numerical value of preemption level for a given Class Type

Parameters:
ctValue -
Returns:

getMaxPLvalue

public int getMaxPLvalue()
Obtain the maximum numerical value of preemption level (lowest priority)


getMinPLValue

public int getMinPLValue()

getNbCT

public int getNbCT()
Gets the number of different class types

Returns:

getAllCTId

public int[] getAllCTId()
Returns an array of all available CTs

Returns:

getLinkIgp

public LinkIgp getLinkIgp(java.lang.String linkId)
                   throws LinkNotFoundException
Get a LinkIgp from the specified linkId

Parameters:
linkId -
Returns:
Throws:
LinkNotFoundException

getNbPriority

public int getNbPriority()
Get the number of priority levels

Returns:

getAllPriorities

public java.util.List<Information.DiffServType.PriorityType> getAllPriorities()
Return a list of all priorities and null if there is no priorities

Returns:

getPriorities

public java.util.List<java.lang.Integer> getPriorities()
Return a list of all priorities identifiers

Returns:

getMaxPreemptionLevel

public int getMaxPreemptionLevel(int CT)
Gets the maximum Preemption Level (lowest numerical value) for a given class type.

Returns:

getPriorityHighPL

public int getPriorityHighPL(int priority)
Returns the priority corresponding to the same CT but a just higher preemption level (lower numerical value)

Parameters:
priority -
Returns:

getLowerPLs

public java.util.List<java.lang.Integer> getLowerPLs(int priority)
Returns all the priorities corresponding to same CT as priority but lower preemption level (higher numerical value)

Parameters:
priority -
Returns:

getLowerPLsAllCTs

public java.util.List<java.lang.Integer> getLowerPLsAllCTs(int priority)
Returns all the priorities at lower preemption level (higher numerical value)

Parameters:
priority -
Returns:

getPrioritySameCT

public java.util.List<java.lang.Integer> getPrioritySameCT(int CT)
Returns all priorities corresponding to a same CT

Parameters:
CT -
Returns:

addPriorityLevel

public void addPriorityLevel(int priority,
                             int classType,
                             int preemptionLevel)
                      throws DiffServConfigurationException
Adds a priority level.

Parameters:
priority - The ID of the newly created priority level.
classType - The class type of the newly created priority level.
preemptionLevel - The preemption level of the newly created priority level.
Throws:
DiffServConfigurationException - If the priority level already exists (with same id or with same class type and preemption level) or if one of priority, classType, preemptionLevel is not >= 0 and < 8.

removePriorityLevel

public boolean removePriorityLevel(int priority)
                            throws DiffServConfigurationException
Removes the given priority level.

Parameters:
priority - The ID of the priority level to remove.
Returns:
true if the priority level was successfully removed and false if the priority level did not exist.
Throws:
DiffServConfigurationException - if the priority level is in used by some lsps

addBgpRouter

public void addBgpRouter(BgpRouter router)
                  throws RouterAlreadyExistException
Throws:
RouterAlreadyExistException

getBgpRouter

public BgpRouter getBgpRouter(java.lang.String id)
Returns the BGP router with the specified Id.

Parameters:
id - the Id of the requested BGP router.
Returns:
the BGP router associated with the given Id, if it exists. Otherwise, returns null.

getAllBgpRouters

public java.util.List<BgpRouter> getAllBgpRouters()
Returns the list of all BGP routers.

Returns:
the list of all BGP routers available in the domain.

removeBgpRouters

public void removeBgpRouters()


Copyright © 2004-2007 Research Unit in Networking, All Rights Reserved.