|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbe.ac.ulg.montefiore.run.totem.domain.model.jaxb.impl.LspImpl
be.ac.ulg.montefiore.run.totem.domain.model.impl.LspImpl
public class LspImpl
A Label Switched Path in a Domain
Creation date: 19-Jan-2005 15:47:36
Nested Class Summary |
---|
Nested classes/interfaces inherited from class be.ac.ulg.montefiore.run.totem.domain.model.jaxb.impl.LspImpl |
---|
LspImpl.BackupTypeImpl, LspImpl.DiffServTypeImpl, LspImpl.PathTypeImpl, LspImpl.Unmarshaller |
Nested classes/interfaces inherited from interface be.ac.ulg.montefiore.run.totem.domain.model.jaxb.Lsp |
---|
Lsp.BackupType, Lsp.DiffServType, Lsp.PathType |
Field Summary |
---|
Fields inherited from class be.ac.ulg.montefiore.run.totem.domain.model.jaxb.impl.LspImpl |
---|
_Backup, _Bw, _DiffServ, _Id, _MaxRate, _Metric, _Path, has_Bw, has_MaxRate, has_Metric, version |
Fields inherited from interface be.ac.ulg.montefiore.run.totem.domain.model.Lsp |
---|
BYPASS_BACKUP_TYPE, DETOUR_E2E_BACKUP_TYPE, DETOUR_LOCAL_BACKUP_TYPE |
Constructor Summary | |
---|---|
LspImpl()
|
|
LspImpl(Domain domain,
java.lang.String id,
float reservation,
Path path)
Basic constructor to create a LSP with a bandwidth and a path |
|
LspImpl(Domain domain,
java.lang.String id,
float reservation,
Path path,
int classType,
int holdingPreemption,
int setupPreemption)
More advanced constructor to create a primary lsp with all diffserv parameters. |
|
LspImpl(Domain domain,
java.lang.String protectedLspId,
java.lang.String backupId,
Path path,
LspBackupType lspBackupType,
java.util.Collection<Link> protectedLinks)
Advanced constructor to create a backup lsp. |
Method Summary | |
---|---|
void |
addBackupLsp(Lsp lsp)
Add a lsp in the list of backup lsps of this primary lsp. |
boolean |
equals(java.lang.Object o)
Two LSPs are equal if they belong to the same domain and have the same id. |
java.util.Set<Lsp> |
getBackups()
returns a set of the backups lsps |
int |
getBackupType()
If the LSP is a backup LSP, get the type of Backup : - Lsp.DETOUR_E2E_BACKUP_TYPE if end to end detour backup - Lsp.DETOUR_LOCAL_BACKUP TYPE if local detour backup - Lsp.BYPASS_BACKUP_TYPE if bypass backup - -1 otherwise |
int |
getCT()
Gets the DiffServ class type of the LSP, the diffserv class of the primary lsp if it is a backup, or the class type of the minimum priority if it is not defined. |
int |
getHoldingPreemption()
Gets the holding preemption level of the LSP, the holding preemption level of the primary lsp if it is a backup, or the holding preemption level of the minimum priority if it is not defined. |
Path |
getLspPath()
Get the path of the LSP |
java.util.List<Link> |
getProtectedLinks()
If the LSP is a backup LSP and protect one or more links, this method return the list of protected links and null otherwise. |
Lsp |
getProtectedLsp()
If the LSP is a backup LSP and protect a particular LSP, this method return this protected LSP and null otherwise. |
float |
getReservation()
Get the reservation of a LSP |
int |
getSetupPreemption()
Gets the setup preemption level of the LSP, the setup preemption level of the primary lsp if it is a backup, or the setup preemption level of the minimum priority if it is not defined. |
int |
hashCode()
|
void |
init(Domain domain)
Initialise the LSP : set a reference to the domain and create the LSP path. |
boolean |
isBackupLsp()
True if the LSP is a backup LSP and false otherwise |
void |
removeBackupLsp(Lsp lsp)
Removes a LSP for the list of backups |
void |
setDomain(Domain domain)
Set the domain reference |
void |
setLspPath(Path path)
Set a new path for a LSP |
void |
setReservation(float bw)
|
Methods inherited from class be.ac.ulg.montefiore.run.totem.domain.model.jaxb.impl.LspImpl |
---|
createRawValidator, createUnmarshaller, getBackup, getBw, getDiffServ, getId, getMaxRate, getMetric, getPath, getPrimaryInterface, serializeAttributes, serializeBody, serializeURIs, setBackup, setBw, setDiffServ, setId, setMaxRate, setMetric, setPath |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface be.ac.ulg.montefiore.run.totem.domain.model.Lsp |
---|
getMaxRate, getMetric |
Methods inherited from interface be.ac.ulg.montefiore.run.totem.domain.model.DomainElement |
---|
getId |
Constructor Detail |
---|
public LspImpl()
public LspImpl(Domain domain, java.lang.String id, float reservation, Path path)
domain
- reservation
- path
- public LspImpl(Domain domain, java.lang.String id, float reservation, Path path, int classType, int holdingPreemption, int setupPreemption) throws DiffServConfigurationException
domain
- id
- reservation
- path
- classType
- holdingPreemption
- setupPreemption
-
DiffServConfigurationException
public LspImpl(Domain domain, java.lang.String protectedLspId, java.lang.String backupId, Path path, LspBackupType lspBackupType, java.util.Collection<Link> protectedLinks)
domain
- protectedLspId
- backupId
- lspBackupType
- protectedLinks
- Method Detail |
---|
public void init(Domain domain) throws InvalidPathException, DiffServConfigurationException
domain
- The domain to which the LSP belongs
InvalidPathException
- if the path is invalid (not continuous or if a link or node cannot be found)
DiffServConfigurationException
- if the setup or holding priority is not defined in the domain.public void setReservation(float bw) throws LinkCapacityExceededException
LinkCapacityExceededException
public float getReservation()
public Path getLspPath()
public void setLspPath(Path path)
path
- public void setDomain(Domain domain)
domain
- public int getCT()
public int getHoldingPreemption()
public int getSetupPreemption()
public boolean isBackupLsp()
public int getBackupType()
public Lsp getProtectedLsp() throws LspNotFoundException
LspNotFoundException
public java.util.List<Link> getProtectedLinks() throws LinkNotFoundException
LinkNotFoundException
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public void addBackupLsp(Lsp lsp)
lsp
- Backup LSP to add to this primary
java.lang.IllegalArgumentException
- if the given lsp does not correspond to a backup lsp of this onepublic void removeBackupLsp(Lsp lsp) throws LspNotFoundException
lsp
-
LspNotFoundException
public java.util.Set<Lsp> getBackups()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |