All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.metamx.emitter.core.FeedUriExtractor Maven / Gradle / Ivy

There is a newer version: 1.3.8
Show newest version
package com.metamx.emitter.core;

import java.net.URI;
import java.net.URISyntaxException;

public class FeedUriExtractor implements UriExtractor
{
  private String uriPattern;

  public FeedUriExtractor(String uriPattern)
  {
    this.uriPattern = uriPattern;
  }

  @Override
  public URI apply(Event event) throws URISyntaxException
  {
    return new URI(String.format(uriPattern, event.getFeed()));
  }

  @Override
  public String toString()
  {
    return "FeedUriExtractor{" +
           "uriPattern='" + uriPattern + '\'' +
           '}';
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy