|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object be.ac.ulg.montefiore.run.totem.domain.model.jaxb.impl.DomainTypeImpl be.ac.ulg.montefiore.run.totem.domain.model.jaxb.impl.DomainImpl be.ac.ulg.montefiore.run.totem.domain.model.impl.DomainImpl
public class DomainImpl
Implementation of a network domain.
Creation date : 19-Jan-2005 14:28:33
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 |
---|
public DomainImpl()
public DomainImpl(int ASID)
ASID
- Method Detail |
---|
public DomainConvertor getConvertor()
public DomainChangeObserver getObserver()
public DomainValidator getValidator()
public DomainStatistics getDomainStatistics()
public BandwidthManagement getBandwidthManagement()
public boolean useBandwidthSharing()
public SPFCache getSPFCache()
public java.net.URI getURI()
public void setURI(java.net.URI uri)
uri
- public BandwidthUnit getBandwidthUnit()
public void setBandWidthUnit(BandwidthUnit unit)
public DelayUnit getDelayUnit()
public void setDelayUnit(DelayUnit unit)
public void setSwitchingMethod(SwitchingMethod sm)
public SwitchingMethod getSwitchingMethod()
public java.lang.String getDescription()
public void setDescription(java.lang.String description)
description
- public java.lang.String getTitle()
public void setTitle(java.lang.String title)
public java.util.Calendar getDate()
public void setDate(java.util.Calendar date)
public java.lang.String getAuthor()
public void setAuthor(java.lang.String author)
public void init(boolean removeMultipleLink, boolean useBwSharing) throws InvalidDomainException
removeMultipleLink
- true if the multiple links must be removed (@see DomainValidator)
InvalidDomainException
- If the domain is not valid (ex: if the one the LSPs has bad path)public Node getNode(java.lang.String id) throws NodeNotFoundException
id
-
NodeNotFoundException
public Node getNodeByRid(java.lang.String IP) throws NodeNotFoundException
IP
- ip address of the node
IP
.
NodeNotFoundException
- when no node exists in the domain with the given IP address.public void addNode(Node node) throws NodeAlreadyExistException
node
-
NodeAlreadyExistException
public void removeNode(Node node) throws NodeNotFoundException, LinkNotFoundException
node
-
NodeNotFoundException
LinkNotFoundException
public int getNbNodes()
public java.util.List<Node> getAllNodes()
public java.util.List<Node> getUpNodes()
public java.util.List<Link> getLinksBetweenNodes(Node srcNode, Node dstNode) throws NodeNotFoundException
srcNode
- dstNode
-
NodeNotFoundException
public java.util.List<Link> getLinksBetweenNodes(java.lang.String srcNodeId, java.lang.String dstNodeId) throws NodeNotFoundException
srcNodeId
- dstNodeId
-
NodeNotFoundException
public Link getLinkBetweenNodes(java.lang.String srcNodeId, java.lang.String srcIfId, java.lang.String dstNodeId, java.lang.String dstIfId) throws LinkNotFoundException, NodeNotFoundException, NodeInterfaceNotFoundException
srcNodeId
- The source node ID.srcIfId
- The source interface ID.dstNodeId
- The destination node ID.dstIfId
- The destination interface ID.
LinkNotFoundException
NodeNotFoundException
NodeInterfaceNotFoundException
public Link getReverseLink(Link link) throws NodeNotFoundException
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.
link
- The link to consider.
link
.
NodeNotFoundException
public java.util.List<Link> getReverseLinks(Link link) throws NodeNotFoundException
link
.
link
- The link to consider.
link
.
NodeNotFoundException
public java.util.List<Link> getReverseLinks(java.lang.String linkId) throws NodeNotFoundException, LinkNotFoundException
linkId
.
linkId
- The ID of the link to consider.
linkId
.
LinkNotFoundException
NodeNotFoundException
public Link getLink(java.lang.String id) throws LinkNotFoundException
id
-
LinkNotFoundException
public Link getLinkFrom(java.lang.String nodeId, java.lang.String nodeInterfaceId) throws NodeNotFoundException, NodeInterfaceNotFoundException, LinkNotFoundException
NodeNotFoundException
NodeInterfaceNotFoundException
LinkNotFoundException
public Link getLinkTo(java.lang.String nodeId, java.lang.String nodeInterfaceId) throws NodeNotFoundException, NodeInterfaceNotFoundException, LinkNotFoundException
NodeNotFoundException
NodeInterfaceNotFoundException
LinkNotFoundException
public int getNbLinks()
public void addLink(Link link) throws LinkAlreadyExistException, NodeNotFoundException
link
-
LinkAlreadyExistException
- if a link with the same id already exist in the domain
NodeNotFoundException
public void removeLink(Link link) throws LinkNotFoundException
link
-
LinkNotFoundException
- if the link is not found in the domainpublic java.util.List<Link> getAllLinks()
public java.util.List<Link> getUpLinks()
public java.lang.String generateLspId()
public java.lang.String generateDetourLspId(java.lang.String protectedId, int methodType, int protectionType)
protectedId
- id of the protected lspmethodType
- protectionType
-
public Lsp getLsp(java.lang.String id) throws LspNotFoundException
id
-
LspNotFoundException
public java.util.List<Lsp> getLsps(Node ingress, Node egress)
ingress
- the ingress nodeegress
- the egress node
public java.util.List<Lsp> getPrimaryLsps(Node ingress, Node egress)
public void addLsp(Lsp lsp) throws LinkCapacityExceededException, LspAlreadyExistException, LspNotFoundException, DiffServConfigurationException
lsp
-
LinkCapacityExceededException
LspAlreadyExistException
LspNotFoundException
- If it is a backup LSP and the primary LSP cannot be found.
DiffServConfigurationException
public void addLsp(Lsp lsp, boolean preemption) throws LinkCapacityExceededException, LspAlreadyExistException, LspNotFoundException, DiffServConfigurationException
lsp
- preemption
- tells if preemption should be used
LinkCapacityExceededException
LspAlreadyExistException
LspNotFoundException
- If it is a backup LSP and the primary LSP cannot be found.
DiffServConfigurationException
public void removeLsp(Lsp lsp) throws LspNotFoundException
lsp
-
LspNotFoundException
public void removeLsp(Lsp lsp, boolean isReroute) throws LspNotFoundException
LspNotFoundException
public void removeAllLsps()
Domain
.
public int getNbLsps()
public java.util.List<Lsp> getAllLsps()
public java.util.List<Lsp> getAllPrimaryLsps()
public java.util.List<Lsp> getBackupsOfPrimary(Lsp primaryLsp)
Lsp.getBackups()
primaryLsp
-
public java.util.List<Lsp> getLspsOnLink(Link link)
link
-
public java.util.List<Lsp> getLspStartingAtIngress(Node ingress)
ingress
- the ingress node
public void renameLsp(java.lang.String oldId, java.lang.String newId) throws LspNotFoundException, LspAlreadyExistException
oldId
- newId
-
LspNotFoundException
- If the lsp cannot be found in the domain
LspAlreadyExistException
- If the lsp already existspublic void renameNode(java.lang.String oldId, java.lang.String newId) throws NodeNotFoundException, IdException, NodeAlreadyExistException
NodeNotFoundException
IdException
NodeAlreadyExistException
public void renameLink(java.lang.String oldId, java.lang.String newId) throws LinkNotFoundException, LinkAlreadyExistException, IdException
LinkNotFoundException
LinkAlreadyExistException
IdException
public int getPriority(int preemption, int classtype)
preemption
- classtype
-
public boolean usePreemption()
public int getPreemptionLevel(int priority)
priority
-
public java.util.List<java.lang.Integer> getPreemptionLevels(int classType)
classType
-
public int getClassType(int priority)
priority
-
public boolean isExistingPriority(int preemptionLevel, int classType)
preemptionLevel
- classType
-
public boolean isExistingPriority(int priority)
priority
-
public int getMinPriority()
public int getMinPriority(int ctValue)
ctValue
-
public int getMaxCTvalue()
public int getMinCTValue()
public int getMaxPLValue(int ctValue)
ctValue
-
public int getMaxPLvalue()
public int getMinPLValue()
public int getNbCT()
public int[] getAllCTId()
public LinkIgp getLinkIgp(java.lang.String linkId) throws LinkNotFoundException
linkId
-
LinkNotFoundException
public int getNbPriority()
public java.util.List<Information.DiffServType.PriorityType> getAllPriorities()
public java.util.List<java.lang.Integer> getPriorities()
public int getMaxPreemptionLevel(int CT)
public int getPriorityHighPL(int priority)
priority
-
public java.util.List<java.lang.Integer> getLowerPLs(int priority)
priority
-
public java.util.List<java.lang.Integer> getLowerPLsAllCTs(int priority)
priority
-
public java.util.List<java.lang.Integer> getPrioritySameCT(int CT)
CT
-
public void addPriorityLevel(int priority, int classType, int preemptionLevel) throws DiffServConfigurationException
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.
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.public boolean removePriorityLevel(int priority) throws DiffServConfigurationException
priority
- The ID of the priority level to remove.
true
if the priority level was successfully removed
and false
if the priority level did not exist.
DiffServConfigurationException
- if the priority level is in used by some lspspublic void addBgpRouter(BgpRouter router) throws RouterAlreadyExistException
RouterAlreadyExistException
public BgpRouter getBgpRouter(java.lang.String id)
id
- the Id of the requested BGP router.
public java.util.List<BgpRouter> getAllBgpRouters()
public void removeBgpRouters()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |