class ViewURLStreamProvider implements org.apache.ambari.view.URLStreamProvider, URLConnectionProvider {

  @Override
  public HttpURLConnection getConnectionAs(String spec,
                                           String requestMethod,
                                           String body,
                                           Map<String, String> headers,
                                           String userName) throws IOException {
    return getConnection(addDoAs(spec, userName), requestMethod, body, headers);
  }

  protected  ViewURLStreamProvider(ViewContext viewContext, URLStreamProvider streamProvider);

}