Lines Matching refs:Service
19 import com.google.common.util.concurrent.Service.State;
52 NullService service = new NullService();
53 assertFalse(service.startUpCalled);
55 service.start().get();
56 assertTrue(service.startUpCalled);
57 assertEquals(Service.State.RUNNING, service.state());
59 service.stop().get();
60 assertTrue(service.shutDownCalled);
61 assertEquals(Service.State.TERMINATED, service.state());
67 NullService service = new NullService();
68 assertEquals("NullService [" + Service.State.NEW + "]", service.toString());
69 service.start().get();
70 assertEquals("NullService [" + Service.State.RUNNING + "]", service.toString());
71 service.stop().get();
72 assertEquals("NullService [" + Service.State.TERMINATED + "]", service.toString());
76 // Create a service whose executor will never run its commands
77 Service service = new NullService() {
78 @Override protected Executor executor(Service.State state) {
87 service.start().get(1, TimeUnit.MILLISECONDS);
113 @Override protected Executor executor(Service.State state) {