private HostPortRestrictionHandler getHostPortRestrictionHandler() {
    if (hostPortRestrictionHandler == null) {
      HostPortRestrictionHandler hostPortRestrictionHandlerTmp =
          new HostPortRestrictionHandler(viewContext.getAmbariProperty(Configuration.PROXY_ALLOWED_HOST_PORTS.getKey()));
      hostPortRestrictionHandler = hostPortRestrictionHandlerTmp;
    }
    return hostPortRestrictionHandler;
  }
Get an instance of HostPortRestrictionHandler

@return
ambari-server/src/main/java/org/apache/ambari/server/view/ViewURLStreamProvider.java