class MessageMetricsStatistics extends ChildRuntimeInfoComponentImpl implements MessageMetricsStatisticsMBean {

  @Override
  public String getTotalStringStats() {
    long timeinMillis = Calendar.getInstance().getTimeInMillis();
    StringBuffer buffer = new StringBuffer();
    buffer.append(wrappedComponent.getStats().size());
    buffer.append(" time slice(s) have been recorded.\n");

    if (wrappedComponent.getStats().size() > 0) {
      MessageStatistic timeSlice = (MessageStatistic) wrappedComponent.getStats().get(wrappedComponent.getStats().size() - 1);
      buffer.append("Current time slice statistics; \n");
      buffer.append("    Time Slice ends in  - " + (timeSlice.getEndMillis() - timeinMillis) / 1000 + " seconds.\n");
      buffer.append("    Message count - " + timeSlice.getTotalMessageCount() + "\n");
      buffer.append("    Message total size - " + timeSlice.getTotalMessageSize());
    }

    return buffer.toString();
  }

  private  MessageMetricsStatistics();
  protected  MessageMetricsStatistics(WorkflowManager owner, MessageMetricsInterceptorImpl interceptor);

}