public CompositeData getStatistic() {
SessionFilter[] filters = session.getSessionFilters();
for (int i = 0; i < filters.length; i++) {
if (filters[i] instanceof StatisticFilter) {
StatisticFilter stat = (StatisticFilter) filters[i];
try {
return new CompositeDataSupport(STAT_COMPOSITE_TYPE,
STAT_NAMES, new Object[] {
new Long(stat.getReceivedBytes()),
new Long(stat.getSentBytes()),
new Long(stat.getElapsedTime()),
new Double(stat.getAvgReceiveSpeed()),
new Double(stat.getAvgSendSpeed()),
new Double(stat.getReceiveSpeed()),
new Double(stat.getSendSpeed()) });
} catch (OpenDataException e) {
log.error(e, e);
}
}
}