Package io.fabric8.api

Examples of io.fabric8.api.ZooKeeperClusterBootstrap


  protected void createEndpoint(String uri) {
    if (!Strings.isBlank(uri)) {
      try {
        // TODO when there is a method on the facade do it...
        CamelContextMBean mbean = getCamelContextNode().getCamelContextMBean();
        mbean.createEndpoint(uri);
       
        Display.getDefault().syncExec(new Runnable() {
          public void run() {
            refresh();
          }
View Full Code Here


          traceList.addBackLogTraceMessages(traceMessages);
        } else {
          // TODO should we highlight in the UI that there's no tracer enabled?
        }
      } else {
        CamelFabricTracerMBean fabricTracer = (CamelFabricTracerMBean)tracer;
        if (fabricTracer != null) {
          String traceXml = fabricTracer.dumpAllTracedMessagesAsXml();
          List<BacklogTracerEventMessage> traceMessages;
          if (id == null) {
            traceMessages = getTraceMessagesFromXml(traceXml);
          } else {
            traceMessages = getTraceMessagesFromXml(traceXml, id);
View Full Code Here

  }

  @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

     * 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

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

    int column = 0;
    clearColumns();
    Function1 function = new Function1() {
      @Override
      public Object apply(Object element) {
        LogEvent log = toLogEvent(element);
        if (log != null) {
          return log.getTimestamp();
        }
        return null;
      }
    };
    column = addColumnFunction(bounds, column, function, "Time");
    function = new Function1() {
      @Override
      public Object apply(Object element) {
        LogEvent log = toLogEvent(element);
        if (log != null) {
          return log.getHost();
        }
        return null;
      }
    };
    column = addColumnFunction(bounds, column, function, "Host");
    function = new Function1() {
      @Override
      public Object apply(Object element) {
        LogEvent log = toLogEvent(element);
        if (log != null) {
          return log.getContainerName();
        }
        return null;
      }
    };
    column = addColumnFunction(bounds, column, function, "Container");
    function = new Function1() {
      @Override
      public Object apply(Object element) {
        LogEvent log = toLogEvent(element);
        if (log != null) {
          return log.getLevel();
        }
        return null;
      }
    };
    column = addColumnFunction(bounds, column, function, "Level", new LogLevelImageProvider());
    function = new Function1() {
      @Override
      public Object apply(Object element) {
        LogEvent log = toLogEvent(element);
        if (log != null) {
          return log.getLogger();
        }
        return null;
      }
    };
    column = addColumnFunction(bounds, column, function, "Logger");
    function = new Function1() {
      @Override
      public Object apply(Object element) {
        LogEvent log = toLogEvent(element);
        if (log != null) {
          return log.getThread();
        }
        return null;
      }
    };
    column = addColumnFunction(bounds, column, function, "Thread");
    function = new Function1() {
      @Override
      public Object apply(Object element) {
        LogEvent log = toLogEvent(element);
        if (log != null) {
          return log.getMessage();
        }
        return null;
      }
    };
    column = addColumnFunction(bounds, column, function, "Message");
    function = new Function1() {
      @Override
      public Object apply(Object element) {
        return element;
      }
    };
    column = addColumnFunction(bounds, column, function, "Location", new LocationLabelProvider());
    function = new Function1() {
      @Override
      public Object apply(Object element) {
        LogEvent log = toLogEvent(element);
        if (log != null) {
          return log.getProperties();
        }
        return null;
      }
    };
    column = addColumnFunction(bounds, column, function, "Properties");
    function = new Function1() {
      @Override
      public Object apply(Object element) {
        LogEvent log = toLogEvent(element);
        if (log != null) {
          return log.getSeq();
        }
        return null;
      }
    };
    column = addColumnFunction(bounds, column, function, "ID");
    function = new Function1() {
      @Override
      public Object apply(Object element) {
        LogEvent log = toLogEvent(element);
        if (log != null && log.getException() != null) {
          StringBuffer sb = new StringBuffer();
          for (String s : log.getException()) {
            sb.append(s);
            sb.append('\n');
          }
          return sb.toString();
        }
View Full Code Here

TOP

Related Classes of io.fabric8.api.ZooKeeperClusterBootstrap

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.