@Test(expected = ServiceException.class) public void testService_WithException() throws Exception { PooledSplitJoinService service = new PooledSplitJoinService(); service.setAggregator(new AppendingMessageAggregator()); service.setSplitter(new LineCountSplitter(1)); service.setPoolsize(10); service.setTimeout(new TimeInterval(5L, TimeUnit.SECONDS)); service.setService(new ThrowExceptionService(new ConfiguredException("always-fail"))); service.registerEventHandler(LifecycleHelper.initAndStart(new DefaultEventHandler())); AdaptrisMessage msg = createLineCountMessageInput(50); try { ExampleServiceCase.execute(service, msg); } catch (ServiceException e) { assertEquals("always-fail", e.getMessage()); throw e; } }
@Override public void registerEventHandler(EventHandler eh) { eventHandler = eh; }
PooledSplitJoinService extends ServiceImp implements EventHandlerAware, ServiceWrapper { @Override public void registerEventHandler(EventHandler eh) { eventHandler = eh; } }
PooledSplitJoinService extends ServiceImp implements EventHandlerAware, ServiceWrapper { @Override public void registerEventHandler(EventHandler eh) { eventHandler = eh; }  }
PooledSplitJoinService extends ServiceImp implements EventHandlerAware, ServiceWrapper { @Override public void registerEventHandler(EventHandler eh) { eventHandler = eh; }  @Override void prepare(); @Override void start(); @Override void stop(); @Override void doService(AdaptrisMessage msg); @Override void registerEventHandler(EventHandler eh); @Override Service[] wrappedServices(); }
PooledSplitJoinService extends ServiceImp implements EventHandlerAware, ServiceWrapper { @Override public void registerEventHandler(EventHandler eh) { eventHandler = eh; }  @Override void prepare(); @Override void start(); @Override void stop(); @Override void doService(AdaptrisMessage msg); @Override void registerEventHandler(EventHandler eh); @Override Service[] wrappedServices();  }