@Test public void testWaitNoProcessingHandlersEver() { Assert.assertTrue(context.waitOnNoProcessingHandlings(500, 2000)); }
public boolean waitOnNoProcessingHandlings(long sampleTime, long maxSamplingTime) { long start = System.currentTimeMillis(); while (areProcessingHandlers() && (System.currentTimeMillis() - start) < maxSamplingTime) { InteractiveSpacesUtilities.delay(sampleTime); } return !areProcessingHandlers(); }
ActivityComponentContext { public boolean waitOnNoProcessingHandlings(long sampleTime, long maxSamplingTime) { long start = System.currentTimeMillis(); while (areProcessingHandlers() && (System.currentTimeMillis() - start) < maxSamplingTime) { InteractiveSpacesUtilities.delay(sampleTime); } return !areProcessingHandlers(); } }
ActivityComponentContext { public boolean waitOnNoProcessingHandlings(long sampleTime, long maxSamplingTime) { long start = System.currentTimeMillis(); while (areProcessingHandlers() && (System.currentTimeMillis() - start) < maxSamplingTime) { InteractiveSpacesUtilities.delay(sampleTime); } return !areProcessingHandlers(); } ActivityComponentContext(SupportedActivity activity, ActivityComponentFactory componentFactory); }
ActivityComponentContext { public boolean waitOnNoProcessingHandlings(long sampleTime, long maxSamplingTime) { long start = System.currentTimeMillis(); while (areProcessingHandlers() && (System.currentTimeMillis() - start) < maxSamplingTime) { InteractiveSpacesUtilities.delay(sampleTime); } return !areProcessingHandlers(); } ActivityComponentContext(SupportedActivity activity, ActivityComponentFactory componentFactory); @SuppressWarnings("unchecked") T getActivity(); ActivityComponentFactory getComponentFactory(); void beginStartupPhase(); void endStartupPhase(boolean success); void beginShutdownPhase(); boolean areHandlersAllowed(); void enterHandler(); void exitHandler(); boolean areProcessingHandlers(); boolean waitOnNoProcessingHandlings(long sampleTime, long maxSamplingTime); boolean awaitStartup(); boolean canHandlerRun(); T addComponent(T component); void addComponents(ActivityComponent... components); T addComponent(String componentType); void addComponents(String... componentTypes); void initialStartupComponents(); boolean shutdownComponents(); void clear(); boolean shutdownAndClear(); boolean shutdownAndClearRunningComponents(); boolean areAllComponentsRunning(); @SuppressWarnings("unchecked") T getActivityComponent(String componentType); T getRequiredActivityComponent(String componentType); Collection<ActivityComponent> getConfiguredComponents(); }
ActivityComponentContext { public boolean waitOnNoProcessingHandlings(long sampleTime, long maxSamplingTime) { long start = System.currentTimeMillis(); while (areProcessingHandlers() && (System.currentTimeMillis() - start) < maxSamplingTime) { InteractiveSpacesUtilities.delay(sampleTime); } return !areProcessingHandlers(); } ActivityComponentContext(SupportedActivity activity, ActivityComponentFactory componentFactory); @SuppressWarnings("unchecked") T getActivity(); ActivityComponentFactory getComponentFactory(); void beginStartupPhase(); void endStartupPhase(boolean success); void beginShutdownPhase(); boolean areHandlersAllowed(); void enterHandler(); void exitHandler(); boolean areProcessingHandlers(); boolean waitOnNoProcessingHandlings(long sampleTime, long maxSamplingTime); boolean awaitStartup(); boolean canHandlerRun(); T addComponent(T component); void addComponents(ActivityComponent... components); T addComponent(String componentType); void addComponents(String... componentTypes); void initialStartupComponents(); boolean shutdownComponents(); void clear(); boolean shutdownAndClear(); boolean shutdownAndClearRunningComponents(); boolean areAllComponentsRunning(); @SuppressWarnings("unchecked") T getActivityComponent(String componentType); T getRequiredActivityComponent(String componentType); Collection<ActivityComponent> getConfiguredComponents(); static final long STARTUP_LATCH_TIMEOUT; }