activateMethodStatistics(ejb);
}
private void activatePoolStatistics(String ejb) {
PoolView beansCreatedView = new PoolView();
PoolPresenter beansCreatedPresenter = (PoolPresenter) beansCreatedView.getPresenter();
beansCreatedPresenter.monitor((PoolStatistics p) ->
p.getTotalBeansCreated()
, "Created beans", "Number of beans", this.monitoredApplication, ejb);
PoolView beansDestroyedView = new PoolView();
PoolPresenter beansDestroyedViewPresenter = (PoolPresenter) beansDestroyedView.getPresenter();
beansDestroyedViewPresenter.monitor((PoolStatistics p) ->
p.getTotalBeansDestroyed()
, "Destroyed beans", "Number of beans", this.monitoredApplication, ejb);
PoolView totalThreadsWaitingView = new PoolView();
PoolPresenter totalThreadsWaitingViewPresenter = (PoolPresenter) totalThreadsWaitingView.getPresenter();
totalThreadsWaitingViewPresenter.monitor((PoolStatistics p) ->
p.getCurrentThreadsWaiting()
, "Total Threads Waiting", "Number of beans", this.monitoredApplication, ejb);
PoolView totalThreadsWaitingHighView = new PoolView();
PoolPresenter totalThreadsWaitingViewPresenterHigh = (PoolPresenter) totalThreadsWaitingHighView.getPresenter();
totalThreadsWaitingViewPresenterHigh.monitor((PoolStatistics p) ->
p.getThreadsWaitingHighwatermark()
, "Total Threads Waiting High", "Number of beans", this.monitoredApplication, ejb);
this.statisticsPane.getChildren().clear();
this.statisticsPane.add(beansCreatedView.getView(),0,0);