|
||||||||||
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 A LspImpl is in UP state when all its links are UP. It is in DOWN state when one of its link is DOWN. Change in link status are signalled through the "nodeUpEvent"-like methods
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.AcceptedCosTypeImpl, 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.AcceptedCosType, Lsp.BackupType, Lsp.DiffServType, Lsp.PathType |
Field Summary |
---|
Fields inherited from class be.ac.ulg.montefiore.run.totem.domain.model.jaxb.impl.LspImpl |
---|
_AcceptedCos, _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, STATUS_DOWN, STATUS_UP |
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 backupId,
float bw,
Path path,
java.util.Collection<Link> protectedLinks)
Advanced constructor to create a backup bypass lsp. |
|
LspImpl(Domain domain,
java.lang.String backupId,
float bw,
Path path,
java.util.Collection<Link> protectedLinks,
int classType)
Advanced constructor to create a backup bypass lsp, specifying the classtype |
|
LspImpl(Domain domain,
java.lang.String backupId,
float bw,
Path path,
java.util.Collection<Link> protectedLinks,
int classType,
int holdingPreemption,
int setupPreemption)
Advanced constructor to create a backup bypass lsp, specifying diffserv parameters |
|
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 detour backup lsp. |
Method Summary | |
---|---|
boolean |
acceptClassOfService(java.lang.String name)
|
void |
activateBackup(Lsp backupLsp)
|
void |
addAcceptedClassOfService(java.lang.String name)
|
void |
addBackupLsp(Lsp lsp)
Add a lsp in the list of backup lsps of this primary lsp. |
void |
deactivateBackup(Lsp backupLsp)
|
boolean |
equals(java.lang.Object o)
Two LSPs are equal if they belong to the same domain and have the same id. |
java.util.List<java.lang.String> |
getAcceptedClassesOfService()
|
java.util.List<Lsp> |
getActivatedBackups()
Returns a list of activated backup sorted by ingress |
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. |
Domain |
getDomain()
returns the associated domain |
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 |
int |
getLspStatus()
|
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. |
Path |
getWorkingPath()
Returns a path for the LSP that is routable, i.e. |
Path |
getWorkingPath(boolean nocheck)
If nocheck is true, returns the current working path even if some links are down. |
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 |
boolean |
isBypassLsp()
|
boolean |
isDetourActivated()
|
boolean |
isDetourLsp()
|
void |
linkDownEvent(Link link)
Maintain the status of the lsp. |
void |
linkUpEvent(Link link)
|
void |
makePrimary()
|
void |
nodeDownEvent(Node node)
|
void |
nodeUpEvent(Node node)
|
void |
removeAcceptedClassOfService(java.lang.String name)
|
void |
removeBackupLsp(Lsp lsp)
Removes a LSP for the list of backups |
void |
setDomain(Domain domain)
Set the domain reference |
void |
setElementId(java.lang.String id)
Sets the id of the element. |
void |
setInitParameters(LSPRoutingParameter param)
Initilise the lsp with the given parameters |
void |
setLspPath(Path path)
Set a new path for a LSP. |
void |
setProtectedLsp(java.lang.String lspId)
|
void |
setReservation(float bw)
Change the reservation of the lsp. |
Methods inherited from class be.ac.ulg.montefiore.run.totem.domain.model.jaxb.impl.LspImpl |
---|
createRawValidator, createUnmarshaller, getAcceptedCos, getBackup, getBw, getDiffServ, getId, getMaxRate, getMetric, getPath, getPrimaryInterface, isSetAcceptedCos, isSetBackup, isSetBw, isSetDiffServ, isSetId, isSetMaxRate, isSetMetric, isSetPath, serializeAttributes, serializeBody, serializeURIs, setAcceptedCos, setBackup, setBw, setDiffServ, setId, setMaxRate, setMetric, setPath, unsetAcceptedCos, unsetBackup, unsetBw, unsetDiffServ, unsetId, unsetMaxRate, unsetMetric, unsetPath |
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
- should be LspBackupType.DETOUR_LOCAL
or LspBackupType.DETOUR_E_2_E
protectedLinks
- public LspImpl(Domain domain, java.lang.String backupId, float bw, Path path, java.util.Collection<Link> protectedLinks)
domain
- backupId
- protectedLinks
- public LspImpl(Domain domain, java.lang.String backupId, float bw, Path path, java.util.Collection<Link> protectedLinks, int classType) throws DiffServConfigurationException
domain
- backupId
- protectedLinks
-
DiffServConfigurationException
public LspImpl(Domain domain, java.lang.String backupId, float bw, Path path, java.util.Collection<Link> protectedLinks, int classType, int holdingPreemption, int setupPreemption) throws DiffServConfigurationException
domain
- backupId
- protectedLinks
-
DiffServConfigurationException
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 setInitParameters(LSPRoutingParameter param) throws java.lang.IllegalArgumentException
param
-
java.lang.IllegalArgumentException
public void setElementId(java.lang.String id) throws IdException
DomainElement
setElementId
in interface DomainElement
IdException
public Domain getDomain()
DomainElement
getDomain
in interface DomainElement
public void setReservation(float bw) throws LinkCapacityExceededException
bw
-
LinkCapacityExceededException
public float getReservation()
public Path getLspPath()
public Path getWorkingPath(boolean nocheck) throws InvalidPathException
nocheck
-
InvalidPathException
public Path getWorkingPath() throws InvalidPathException
InvalidPathException
- If no path can be foundpublic java.util.List<Lsp> getActivatedBackups()
public boolean isDetourActivated()
public void activateBackup(Lsp backupLsp) throws LspNotFoundException
LspNotFoundException
public void deactivateBackup(Lsp backupLsp) throws LspNotFoundException
LspNotFoundException
public void linkDownEvent(Link link)
link
- public void nodeDownEvent(Node node)
public void linkUpEvent(Link link)
public void nodeUpEvent(Node node)
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 boolean isDetourLsp()
public boolean isBypassLsp()
public int getBackupType()
Lsp.DETOUR_E2E_BACKUP_TYPE
if end to end detour backupLsp.DETOUR_LOCAL_BACKUP_TYPE
if local detour backupLsp.BYPASS_BACKUP_TYPE
if bypass backup
public Lsp getProtectedLsp() throws LspNotFoundException
LspNotFoundException
public void setProtectedLsp(java.lang.String lspId) throws BadLspTypeException
BadLspTypeException
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()
public void makePrimary()
public int getLspStatus()
public void addAcceptedClassOfService(java.lang.String name) throws ClassOfServiceNotFoundException, ClassOfServiceAlreadyExistException
ClassOfServiceNotFoundException
ClassOfServiceAlreadyExistException
public void removeAcceptedClassOfService(java.lang.String name) throws ClassOfServiceNotFoundException
ClassOfServiceNotFoundException
public java.util.List<java.lang.String> getAcceptedClassesOfService()
public boolean acceptClassOfService(java.lang.String name)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |