|
||||||||||
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.facade.InterDomainManagerObserver
be.ac.ulg.montefiore.run.totem.domain.facade.InterDomainManager
public class InterDomainManager
The InterDomainManager provide the access to all the domains. This class is a singleton and the single instance can be obtain using getInstance() method.
Creation date: 12-Jan-2005 18:11:45
Method Summary | |
---|---|
void |
addDomain(Domain domain)
Adds the domain domain to the InterDomainManager . |
SimplifiedDomain |
buildSimplifiedDomain(int ASID)
Build a simplified topology of the ASID domain |
void |
changeAsId(int oldASID,
int newASID)
|
Domain[] |
getAllDomains()
|
Domain |
getDefaultDomain()
Return the default domain |
Domain |
getDomain(int ASID)
Return the domain with ASID as autonomous system ID |
static InterDomainManager |
getInstance()
Get the single instance of the InterDomainManager. |
int |
getNbDomains()
|
Domain |
loadDomain(java.io.InputStream is,
boolean isDefaultDomain)
|
Domain |
loadDomain(java.lang.String fileName,
boolean isDefaultDomain,
boolean removeMultipleLinks)
Load a domain from a file |
Domain |
loadDomain(java.lang.String fileName,
boolean isDefaultDomain,
boolean removeMultipleLinks,
boolean useBwSharing)
Load a domain from a file |
Domain |
loadDomain(java.lang.String host,
int port,
boolean isDefaultDomain,
boolean removeMultipleLinks,
boolean useBwSharing)
Load a domain from network. |
void |
removeAllDomains()
Removes all the domains from the InterDomainManager . |
void |
removeDefaultDomain()
Removes the default domain from the InterDomainManager . |
void |
removeDomain(int asId)
Removes the domain asId from the InterDomainManager . |
void |
saveDomain(int ASID,
java.lang.String fileName)
Save the domain ASID in the specified file |
void |
setDefaultDomain(int ASID)
Set the ASID domain as the default domain |
void |
uploadSimplifiedDomain(int ASID,
SimplifiedDomain sDomain)
Upload a simplified topology to the ASID domain. |
Methods inherited from class be.ac.ulg.montefiore.run.totem.domain.facade.InterDomainManagerObserver |
---|
addListener, getNbListeners, notifyAddDomain, notifyChangeDefaultDomain, notifyRemoveDomain, removeListener |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static InterDomainManager getInstance()
public void addDomain(Domain domain) throws DomainAlreadyExistException
domain
to the InterDomainManager
.
domain
- The Domain
to add.
DomainAlreadyExistException
- If there is already a domain with the same AS ID as domain
.public Domain getDefaultDomain()
public void setDefaultDomain(int ASID) throws InvalidDomainException
ASID
-
InvalidDomainException
- if the ASID domain is not loaded in the InterDomainManagerpublic Domain getDomain(int ASID) throws InvalidDomainException
ASID
-
InvalidDomainException
- if the ASID domain is not loaded in the InterDomainManagerpublic Domain loadDomain(java.lang.String host, int port, boolean isDefaultDomain, boolean removeMultipleLinks, boolean useBwSharing) throws InvalidDomainException, java.io.IOException, DomainAlreadyExistException
host
- port
- isDefaultDomain
- removeMultipleLinks
- useBwSharing
-
InvalidDomainException
java.io.IOException
DomainAlreadyExistException
public Domain loadDomain(java.io.InputStream is, boolean isDefaultDomain) throws InvalidDomainException, DomainAlreadyExistException
InvalidDomainException
DomainAlreadyExistException
public Domain loadDomain(java.lang.String fileName, boolean isDefaultDomain, boolean removeMultipleLinks) throws DomainAlreadyExistException, InvalidDomainException
fileName
- the domain file nameisDefaultDomain
- true if the domain must be the default domain and false otherwiseremoveMultipleLinks
- true if you want to remove the multiple links and false otherwise
DomainAlreadyExistException
- If there is already a domain with the same ASID.
InvalidDomainException
- If the domain fails to initialize.public Domain loadDomain(java.lang.String fileName, boolean isDefaultDomain, boolean removeMultipleLinks, boolean useBwSharing) throws DomainAlreadyExistException, InvalidDomainException
fileName
- the domain file nameisDefaultDomain
- true if the domain must be the default domain and false otherwiseremoveMultipleLinks
- true if you want to remove the multiple links and false otherwiseuseBwSharing
- true if you want to use BW sharing and false otherwise.
DomainAlreadyExistException
- If there is already a domain with the same ASID.
InvalidDomainException
- If the domain fails to initialize.public void saveDomain(int ASID, java.lang.String fileName) throws InvalidDomainException
ASID
- of the domain to savefileName
- in which saving the domain
InvalidDomainException
- if the ASID domain is not loaded in the InterDomainManagerpublic SimplifiedDomain buildSimplifiedDomain(int ASID) throws InvalidDomainException
ASID
-
InvalidDomainException
- if the ASID domain is not loaded in the InterDomainManagerpublic void uploadSimplifiedDomain(int ASID, SimplifiedDomain sDomain) throws InvalidDomainException, SimplifiedDomainException
ASID
- the ASID in which load the simplified topologysDomain
- the simplified topology
InvalidDomainException
SimplifiedDomainException
public void removeDefaultDomain() throws InvalidDomainException
InterDomainManager
.
InvalidDomainException
- If there is no default domain.public void removeDomain(int asId) throws InvalidDomainException
asId
from the InterDomainManager
.
Also remove all change listeners of the domain.
asId
- The domain to remove.
InvalidDomainException
- If there is no domain asId
.public void removeAllDomains()
InterDomainManager
.
Also remove all change listeners of the domain.
Warning: this method does not signal the listeners that domain are removed. Use with caution.
public Domain[] getAllDomains()
public int getNbDomains()
public void changeAsId(int oldASID, int newASID) throws InvalidDomainException, DomainAlreadyExistException
InvalidDomainException
DomainAlreadyExistException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |