use of com.exalttech.trex.ui.views.models.TableProfile in project trex-stateless-gui by cisco-system-traffic-generator.
the class PacketTableView method loadStreamTable.
/**
* Load stream table data
*
* @param fileToLoad
* @return
* @throws Exception
*/
public Profile[] loadStreamTable(File fileToLoad) throws Exception {
this.loadedProfile = fileToLoad;
Profile[] profileList;
this.profileName = fileToLoad.getName();
try {
profileList = trafficProfile.getTrafficProfile(fileToLoad);
} catch (IOException ex) {
LOG.warn("Profile does not have any streams");
profileList = new Profile[0];
}
List<TableProfileStream> packetDataList = trafficProfile.convertProfilesToTableData(profileList);
TableProfile tableData = new TableProfile(new ArrayList<>(Arrays.asList(profileList)), packetDataList, fileToLoad.getPath());
setPacketData(tableData);
return profileList;
}
Aggregations