@Test public void testCreatesNewTimeSliceAfterTimeDelay() throws Exception { LifecycleHelper.init(interceptor); LifecycleHelper.start(interceptor); AdaptrisMessage message = createMessage(true); interceptor.setTimesliceDuration(new TimeInterval(-1L, TimeUnit.SECONDS)); assertEquals(0, interceptor.getStats().size()); submitMessage(message); interceptor.setTimesliceDuration(new TimeInterval(1L, TimeUnit.SECONDS)); assertEquals(1, interceptor.getStats().size()); submitMessage(message); submitMessage(message); assertEquals(2, interceptor.getStats().size()); assertEquals(1, ((MessageStatistic) interceptor.getStats().get(0)).getTotalMessageCount()); assertEquals(2, ((MessageStatistic) interceptor.getStats().get(1)).getTotalMessageCount()); }
public void init() throws CoreException { try { Args.notNull(getMetadataElement(), "metadataElement"); super.init(); } catch (Exception e) { throw ExceptionHelper.wrapCoreException(e); } }
MessageMetricsInterceptorByMetadata extends MessageMetricsInterceptorImpl { public void init() throws CoreException { try { Args.notNull(getMetadataElement(), "metadataElement"); super.init(); } catch (Exception e) { throw ExceptionHelper.wrapCoreException(e); } } }
MessageMetricsInterceptorByMetadata extends MessageMetricsInterceptorImpl { public void init() throws CoreException { try { Args.notNull(getMetadataElement(), "metadataElement"); super.init(); } catch (Exception e) { throw ExceptionHelper.wrapCoreException(e); } } MessageMetricsInterceptorByMetadata();  MessageMetricsInterceptorByMetadata(MetadataElement element); }
MessageMetricsInterceptorByMetadata extends MessageMetricsInterceptorImpl { public void init() throws CoreException { try { Args.notNull(getMetadataElement(), "metadataElement"); super.init(); } catch (Exception e) { throw ExceptionHelper.wrapCoreException(e); } } MessageMetricsInterceptorByMetadata();  MessageMetricsInterceptorByMetadata(MetadataElement element); void init(); KeyValuePair getMetadataElement(); void setMetadataElement(KeyValuePair m); @Override synchronized void workflowStart(AdaptrisMessage inputMsg); @Override synchronized void workflowEnd(AdaptrisMessage inputMsg, AdaptrisMessage outputMsg); }
MessageMetricsInterceptorByMetadata extends MessageMetricsInterceptorImpl { public void init() throws CoreException { try { Args.notNull(getMetadataElement(), "metadataElement"); super.init(); } catch (Exception e) { throw ExceptionHelper.wrapCoreException(e); } } MessageMetricsInterceptorByMetadata();  MessageMetricsInterceptorByMetadata(MetadataElement element); void init(); KeyValuePair getMetadataElement(); void setMetadataElement(KeyValuePair m); @Override synchronized void workflowStart(AdaptrisMessage inputMsg); @Override synchronized void workflowEnd(AdaptrisMessage inputMsg, AdaptrisMessage outputMsg);  }