Package org.rhq.coregui.client.util.async

Examples of org.rhq.coregui.client.util.async.CountDownLatch.countDown()


            // there are either 2 or 3 setPreference calls depending on prefs.explicitBeginEnd
            final CountDownLatch latch = CountDownLatch.create(prefs.explicitBeginEnd ? 2 : 3, callback);
            persistCallback = new AsyncCallback<Subject>() {
                @Override
                public void onFailure(Throwable arg0) {
                    latch.countDown();
                }

                @Override
                public void onSuccess(Subject arg0) {
                    latch.countDown();
View Full Code Here


                    latch.countDown();
                }

                @Override
                public void onSuccess(Subject arg0) {
                    latch.countDown();
                }
            };
        }
        userPrefs.setPreference(PREF_METRIC_RANGE_BEGIN_END_FLAG, String.valueOf(prefs.explicitBeginEnd), allowRefresh, persistCallback);
        if (prefs.explicitBeginEnd) {
View Full Code Here

                            measurementUserPrefs.getMetricRangePreferences().end,
                            new AsyncCallback<ArrayList<MetricDisplaySummary>>() {
                                @Override
                                public void onSuccess(ArrayList<MetricDisplaySummary> metricDisplaySummaries) {
                                    setMetricDisplaySummaries(metricDisplaySummaries);
                                    countDownLatch.countDown();
                                }

                                @Override
                                public void onFailure(Throwable caught) {
                                    CoreGUI.getErrorHandler().handleError("Cannot load metrics", caught);
View Full Code Here

                                }

                                @Override
                                public void onFailure(Throwable caught) {
                                    CoreGUI.getErrorHandler().handleError("Cannot load metrics", caught);
                                    countDownLatch.countDown();
                                }
                            }

                    );
                }
View Full Code Here

                                                        new AsyncCallback<List<List<MeasurementDataNumericHighLowComposite>>>() {
                                                            @Override
                                                            public void onFailure(Throwable caught) {
                                                                CoreGUI.getErrorHandler().handleError(
                                                                        MSG.view_resource_monitor_graphs_loadFailed(), caught);
                                                                countDownLatch.countDown();
                                                            }

                                                            @Override
                                                            public void onSuccess(
                                                                    List<List<MeasurementDataNumericHighLowComposite>> measurements) {
View Full Code Here

                                                            @Override
                                                            public void onSuccess(
                                                                    List<List<MeasurementDataNumericHighLowComposite>> measurements) {
                                                                addMeasurementForEachResource(childResource.getName(),
                                                                        childResource.getId(), measurements.get(0));
                                                                countDownLatch.countDown();
                                                            }
                                                        });
                                            }
                                        }
                                    });
View Full Code Here

                resourceComposite.getResource().getId(), start, end, PageControl.getUnlimitedInstance(),
                new AsyncCallback<PageList<CreateResourceHistory>>() {
                    @Override
                    public void onSuccess(final PageList<CreateResourceHistory> createList) {
                        fullList.addAll(createList);
                        latch.countDown();
                    }

                    @Override
                    public void onFailure(Throwable caught) {
                        CoreGUI.getErrorHandler().handleError("Failed to load child create history", caught);
View Full Code Here

                    }

                    @Override
                    public void onFailure(Throwable caught) {
                        CoreGUI.getErrorHandler().handleError("Failed to load child create history", caught);
                        latch.countDown();
                    }
                });

            GWTServiceLookup.getResourceService().findDeleteChildResourceHistory(
                resourceComposite.getResource().getId(), start, end, PageControl.getUnlimitedInstance(),
View Full Code Here

                resourceComposite.getResource().getId(), start, end, PageControl.getUnlimitedInstance(),
                new AsyncCallback<PageList<DeleteResourceHistory>>() {
                    @Override
                    public void onSuccess(final PageList<DeleteResourceHistory> deleteList) {
                        fullList.addAll(deleteList);
                        latch.countDown();
                    }

                    @Override
                    public void onFailure(Throwable caught) {
                        CoreGUI.getErrorHandler().handleError("Failed to load child delete history", caught);
View Full Code Here

                    }

                    @Override
                    public void onFailure(Throwable caught) {
                        CoreGUI.getErrorHandler().handleError("Failed to load child delete history", caught);
                        latch.countDown();
                    }
                });
        }

        private void processResults(DSRequest request, DSResponse response, List<Object> fullList) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.