@Test public void testStatus() throws KernelException { MatcherAssert.assertThat( new SequentialExecution<Object>( new Kernel.Fake(new Status.Fake()), new Kernel.Fake(new Status.Fake((short) 1, 2, 1, 1))) .status() .code(), Matchers.is((short) 1)); }
@Override public Status status() throws KernelException { final List<Status> results = new ArrayList<>(); for (Kernel<Listener> kernel : this.elements) { results.add(kernel.status()); } return new CompositeStatus(results); }
SequentialExecution implements Kernel<Listener> { @Override public Status status() throws KernelException { final List<Status> results = new ArrayList<>(); for (Kernel<Listener> kernel : this.elements) { results.add(kernel.status()); } return new CompositeStatus(results); } }
SequentialExecution implements Kernel<Listener> { @Override public Status status() throws KernelException { final List<Status> results = new ArrayList<>(); for (Kernel<Listener> kernel : this.elements) { results.add(kernel.status()); } return new CompositeStatus(results); } @SafeVarargs  SequentialExecution(Kernel<Listener>... kernels);  SequentialExecution(List<Kernel<Listener>> kernels); }
SequentialExecution implements Kernel<Listener> { @Override public Status status() throws KernelException { final List<Status> results = new ArrayList<>(); for (Kernel<Listener> kernel : this.elements) { results.add(kernel.status()); } return new CompositeStatus(results); } @SafeVarargs  SequentialExecution(Kernel<Listener>... kernels);  SequentialExecution(List<Kernel<Listener>> kernels); @Override Status status(); @Override Kernel<Listener> with(Listener... listeners); }
SequentialExecution implements Kernel<Listener> { @Override public Status status() throws KernelException { final List<Status> results = new ArrayList<>(); for (Kernel<Listener> kernel : this.elements) { results.add(kernel.status()); } return new CompositeStatus(results); } @SafeVarargs  SequentialExecution(Kernel<Listener>... kernels);  SequentialExecution(List<Kernel<Listener>> kernels); @Override Status status(); @Override Kernel<Listener> with(Listener... listeners);  }