Package io.fabric8.gateway.fabric.support.http

Examples of io.fabric8.gateway.fabric.support.http.HttpMappingRuleBase


  }

  @Override
  public INodeStatistics getNodeStats(String nodeId) {
    if (nodeId != null) {
      CamelProcessorMBean processorMBean = camelContextNode.getProcessorMBean(nodeId);
      if (processorMBean != null) {
        return new ProcessorNodeStatistics(processorMBean);
      }
    }
    return null;
View Full Code Here


        TcpClientRequestFacade requestFacade = new TcpClientRequestFacade(socket);
        String path = pathLoadBalancer.choose(paths, requestFacade);
        if (path != null) {
            List<ServiceDetails> services = serviceMap.getServices(path);
            if (!services.isEmpty()) {
                ServiceDetails serviceDetails = serviceLoadBalancer.choose(services, requestFacade);
                if (serviceDetails != null) {
                    List<String> urlStrings = serviceDetails.getServices();
                    for (String urlString : urlStrings) {
                        if (Strings.notEmpty(urlString)) {
                            // lets create a client for this request...
                            try {
                                URI uri = new URI(urlString);
View Full Code Here

        assertEquals("mapping size"2, httpGateway.getMappedServices().size());
    }

    protected void setUriTemplate(String uriTemplate, String version) {
        config = new HttpMappingRuleBase(
                new SimplePathTemplate(uriTemplate), version, enabledVersion, loadBalancer, reverseHeaders);
        httpGateway.addMappingRuleConfiguration(config);
    }
View Full Code Here

                + " enabledVersion: " + enabledVersion + " with load balancer: " + loadBalancer);

        if (httpMappingRuleBase != null) {
            gateway.removeMappingRuleConfiguration(httpMappingRuleBase);
        }
        httpMappingRuleBase = new HttpMappingRuleBase(
                new SimplePathTemplate(uriTemplate),
                gateway.getGatewayVersion(),
                enabledVersion, loadBalancer, reverseHeaders);

        CuratorFramework curator = gateway.getCurator();
View Full Code Here

                + " enabledVersion: " + enabledVersion + " with load balancer: " + loadBalancer);

        if (httpMappingRuleBase != null) {
            gateway.get().removeMappingRuleConfiguration(httpMappingRuleBase);
        }
        httpMappingRuleBase = new HttpMappingRuleBase(
                new SimplePathTemplate(uriTemplate),
                gateway.get().getGatewayVersion(),
                enabledVersion, loadBalancer, reverseHeaders);

        mappingTree = new HttpMappingZooKeeperTreeCache(curator.get(), httpMappingRuleBase, zooKeeperPath);
View Full Code Here

            assertTrue("Did not find expected '" + expectedLine + "' in generated file " + outputFile, found);
        }
    }

    protected void setUriTemplate(String uriTemplate, String version) {
        config = new HttpMappingRuleBase(
                new SimplePathTemplate(uriTemplate), version, enabledVersion, loadBalancer, reverseHeaders);
        gateway.addMappingRuleConfiguration(config);
    }
View Full Code Here

     * as to reverse the URIs {@link io.fabric8.gateway.handlers.http.policy.ReverseUriPolicy} or
     * add metering, limits, security or contract checks etc.
     */
    public Handler<HttpClientResponse> wrapResponseHandlerInPolicies(HttpServerRequest request, Handler<HttpClientResponse> responseHandler, ProxyMappingDetails proxyMappingDetails) {
        if (reverseHeaders) {
            responseHandler = new ReverseUriPolicy(this, request, responseHandler, proxyMappingDetails);
        }
        return responseHandler;
    }
View Full Code Here

   * @see
   * org.eclipse.jface.viewers.ColumnLabelProvider#getImage(java.lang.Object)
   */
  @Override
  public Image getImage(Object element) {
    LogEvent le = LogViewTabSection.toLogEvent(element);
    if (le != null) {
      return getLevelImage(le);
    }
    return super.getImage(element);
  }
View Full Code Here

   * @see
   * org.eclipse.jface.viewers.ColumnLabelProvider#getText(java.lang.Object)
   */
  @Override
  public String getText(Object element) {
    LogEvent le = LogViewTabSection.toLogEvent(element);
    if (le != null) {
      return le.getLevel();
    }
    return super.getText(element);
  }
View Full Code Here

   * org.eclipse.jface.viewers.CellLabelProvider#getToolTipText(java.lang.
   * Object)
   */
  @Override
  public String getToolTipText(Object element) {
    LogEvent le = LogViewTabSection.toLogEvent(element);
    if (le != null) {
      return le.getMessage();
    }
    return super.getToolTipText(element);
  }
View Full Code Here

TOP

Related Classes of io.fabric8.gateway.fabric.support.http.HttpMappingRuleBase

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.