@Test public void testMarkerStatusOneServiceDown() { Collection<GWTLocationMonitor> monitors = new ArrayList<GWTLocationMonitor>(); Collection<GWTLocationSpecificStatus> statuses = new ArrayList<GWTLocationSpecificStatus>(); for (int i = 0; i< 5; i++) { GWTLocationMonitor monitor = getMonitor("STARTED"); monitors.add(monitor); GWTLocationSpecificStatus status = new GWTLocationSpecificStatus(); status.setId(++count); status.setLocationMonitor(monitor); status.setMonitoredService(getService(++count, "HTTP")); status.setPollResult(GWTPollResult.down("completely wacked")); statuses.add(status); } LocationMonitorState lms = new LocationMonitorState(monitors, statuses); assertEquals("status should be down when one (of one) service is down across all monitors", Status.DOWN, lms.getStatusDetails().getStatus()); }
public StatusDetails getStatusDetails() { if (m_statusDetails == null) { m_statusDetails = getStatusDetailsUncached(); } return m_statusDetails; }
LocationMonitorState implements Serializable, IsSerializable { public StatusDetails getStatusDetails() { if (m_statusDetails == null) { m_statusDetails = getStatusDetailsUncached(); } return m_statusDetails; } }
LocationMonitorState implements Serializable, IsSerializable { public StatusDetails getStatusDetails() { if (m_statusDetails == null) { m_statusDetails = getStatusDetailsUncached(); } return m_statusDetails; } LocationMonitorState();  LocationMonitorState(Collection<GWTLocationSpecificStatus> statuses);  LocationMonitorState(Collection<GWTLocationMonitor> monitors, Collection<GWTLocationSpecificStatus> statuses); }
LocationMonitorState implements Serializable, IsSerializable { public StatusDetails getStatusDetails() { if (m_statusDetails == null) { m_statusDetails = getStatusDetailsUncached(); } return m_statusDetails; } LocationMonitorState();  LocationMonitorState(Collection<GWTLocationSpecificStatus> statuses);  LocationMonitorState(Collection<GWTLocationMonitor> monitors, Collection<GWTLocationSpecificStatus> statuses); StatusDetails getStatusDetails(); boolean allMonitorsStarted(); boolean atLeastOneMonitorStarted(); boolean allButOneMonitorsDisconnected(); boolean allMonitorsDisconnected(); boolean noMonitorsStarted(); int getMonitorsStarted(); int getMonitorsStopped(); int getMonitorsDisconnected(); Collection<GWTMonitoredService> getServices(); Collection<String> getServicesDown(); Collection<GWTLocationMonitor> getMonitorsWithServicesDown(); boolean noMonitorsExist(); String toString(); }
LocationMonitorState implements Serializable, IsSerializable { public StatusDetails getStatusDetails() { if (m_statusDetails == null) { m_statusDetails = getStatusDetailsUncached(); } return m_statusDetails; } LocationMonitorState();  LocationMonitorState(Collection<GWTLocationSpecificStatus> statuses);  LocationMonitorState(Collection<GWTLocationMonitor> monitors, Collection<GWTLocationSpecificStatus> statuses); StatusDetails getStatusDetails(); boolean allMonitorsStarted(); boolean atLeastOneMonitorStarted(); boolean allButOneMonitorsDisconnected(); boolean allMonitorsDisconnected(); boolean noMonitorsStarted(); int getMonitorsStarted(); int getMonitorsStopped(); int getMonitorsDisconnected(); Collection<GWTMonitoredService> getServices(); Collection<String> getServicesDown(); Collection<GWTLocationMonitor> getMonitorsWithServicesDown(); boolean noMonitorsExist(); String toString();  }