@Test public void testPrefix() throws Exception { Context context = new Context(); context.put(UUIDInterceptor.HEADER_NAME, ID); context.put(UUIDInterceptor.PREFIX_NAME, "bar#"); Event event = new SimpleEvent(); assertTrue(build(context).intercept(event).getHeaders().get(ID).startsWith("bar#")); }
@Override public Event intercept(Event event) { Map<String, String> headers = event.getHeaders(); if (preserveExisting && headers.containsKey(headerName)) { } else if (isMatch(event)) { headers.put(headerName, generateUUID()); } return event; }
UUIDInterceptor implements Interceptor { @Override public Event intercept(Event event) { Map<String, String> headers = event.getHeaders(); if (preserveExisting && headers.containsKey(headerName)) { } else if (isMatch(event)) { headers.put(headerName, generateUUID()); } return event; } }
UUIDInterceptor implements Interceptor { @Override public Event intercept(Event event) { Map<String, String> headers = event.getHeaders(); if (preserveExisting && headers.containsKey(headerName)) { } else if (isMatch(event)) { headers.put(headerName, generateUUID()); } return event; } protected  UUIDInterceptor(Context context); }
UUIDInterceptor implements Interceptor { @Override public Event intercept(Event event) { Map<String, String> headers = event.getHeaders(); if (preserveExisting && headers.containsKey(headerName)) { } else if (isMatch(event)) { headers.put(headerName, generateUUID()); } return event; } protected  UUIDInterceptor(Context context); @Override void initialize(); @Override Event intercept(Event event); @Override List<Event> intercept(List<Event> events); @Override void close(); }
UUIDInterceptor implements Interceptor { @Override public Event intercept(Event event) { Map<String, String> headers = event.getHeaders(); if (preserveExisting && headers.containsKey(headerName)) { } else if (isMatch(event)) { headers.put(headerName, generateUUID()); } return event; } protected  UUIDInterceptor(Context context); @Override void initialize(); @Override Event intercept(Event event); @Override List<Event> intercept(List<Event> events); @Override void close(); static final String HEADER_NAME; static final String PRESERVE_EXISTING_NAME; static final String PREFIX_NAME; }