|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbe.ac.ulg.montefiore.run.totem.trafficMatrix.persistence.TrafficMatrixFactory
public class TrafficMatrixFactory
Factory to load and save traffic matrices.
Creation date: 28-janv.-2005
Constructor Summary | |
---|---|
TrafficMatrixFactory()
|
Method Summary | |
---|---|
static TrafficMatrixFileType |
loadInterDomainMatrix(java.lang.String netflowXMLTrafficMatrixFileName)
Load an inter Domain traffic matrix |
static TrafficMatrix |
loadTrafficMatrix(java.io.File file)
Returns the intra-domain traffic matrix contained in the given file file . |
static TrafficMatrix |
loadTrafficMatrix(java.lang.String fileName)
Returns the intra-domain traffic matrix contained in the file fileName . |
static void |
saveTrafficMatrix(java.lang.String fileName,
TrafficMatrix tm)
Saves the intra-domain traffic matrix tm to the file fileName . |
static void |
updateTrafficMatrix(java.lang.String fileName,
int tmId)
Updates the intra-domain traffic matrix tmId with the information contained in the file fileName . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TrafficMatrixFactory()
Method Detail |
---|
public static TrafficMatrix loadTrafficMatrix(java.lang.String fileName) throws InvalidDomainException, NodeNotFoundException, InvalidTrafficMatrixException
fileName
.
fileName
- The name of the file containing the intra-domain traffic matrix.
fileName
.
InvalidTrafficMatrixException
- If the matrix cannot be loaded (error in XML).
InvalidDomainException
- If there is no domain corresponding to the traffic matrix.
NodeNotFoundException
- If there is an unknown node in the traffic matrix.public static TrafficMatrix loadTrafficMatrix(java.io.File file) throws InvalidTrafficMatrixException, InvalidDomainException, NodeNotFoundException
file
.
file
- the file containing the intra-domain traffic matrix.
fileName
.
InvalidTrafficMatrixException
- If the matrix cannot be loaded (error in XML).
InvalidDomainException
- If there is no domain corresponding to the traffic matrix.
NodeNotFoundException
- If there is an unknown node in the traffic matrix.public static void saveTrafficMatrix(java.lang.String fileName, TrafficMatrix tm) throws InvalidDomainException, NodeNotFoundException
tm
to the file fileName
.
fileName
- The name of the target file.tm
- The traffic matrix to save.
InvalidDomainException
- If there is no domain corresponding to tm
.
NodeNotFoundException
- If there is an unknown node in the traffic matrix.public static void updateTrafficMatrix(java.lang.String fileName, int tmId) throws NodeNotFoundException, InvalidTrafficMatrixException
tmId
with the information contained in the file fileName
.
fileName
- The name of the file containing the update information.tmId
- The TM ID of the traffic matrix to update.
InvalidTrafficMatrixException
- If the traffic matrix to update can't be retrieved.
NodeNotFoundException
- If the information contained in the file is not consistent with the traffic matrix to update.public static TrafficMatrixFileType loadInterDomainMatrix(java.lang.String netflowXMLTrafficMatrixFileName) throws InvalidTrafficMatrixException, javax.xml.bind.JAXBException
netflowXMLTrafficMatrixFileName
-
InvalidTrafficMatrixException
- If the matrix is not an inter domain one
javax.xml.bind.JAXBException
- if JAXB cannot load the matrix
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |