Package org.jolokia.client.request

Examples of org.jolokia.client.request.J4pExecResponse


    @Override
    public List<ContainerDTO> getContainers() {
      List<ContainerDTO> containers = new ArrayList<ContainerDTO>();
      try {
            J4pExecRequest request = JolokiaHelpers.createExecRequest(FABRIC_MBEAN_URL, "containers()");
            J4pExecResponse response = getJolokiaClient().execute(request);
            List<Map<String, Object>> values = response.getValue();
            for (Map<String, Object> value : values) {
                containers.add(new ContainerDTO(this.fabricFacade, value));
            }
        } catch (Exception e) {
          Fabric8CorePlugin.getLogger().error("Failed to fetch containers from fabric8.", e);
View Full Code Here


    @Override
    public ContainerDTO getContainer(String containerId) {
      ContainerDTO container = null;
      try {
            J4pExecRequest request = JolokiaHelpers.createExecRequest(FABRIC_MBEAN_URL, "getContainer(java.lang.String)", containerId);
            J4pExecResponse response = getJolokiaClient().execute(request);
            Map<String, Object> values = response.getValue();
            container = new ContainerDTO(this.fabricFacade, values);
        } catch (Exception e) {
          Fabric8CorePlugin.getLogger().error("Failed to fetch container with ID '" + containerId + "' from fabric8.", e);
        }
      return container;
View Full Code Here

    @Override
    public ContainerDTO getCurrentContainer() {
      ContainerDTO container = null;
      try {
            J4pExecRequest request = JolokiaHelpers.createExecRequest(FABRIC_MBEAN_URL, "currentContainer()");
            J4pExecResponse response = getJolokiaClient().execute(request);
            Map<String, Object> values = response.getValue();
            container = new ContainerDTO(this.fabricFacade, values);
        } catch (Exception e) {
          Fabric8CorePlugin.getLogger().error("Failed to fetch current container from fabric8.", e);
        }
      return container;
View Full Code Here

    @Override
    public VersionDTO createVersion(String versionId) {
      VersionDTO version = null;
      try {
            J4pExecRequest request = JolokiaHelpers.createExecRequest(FABRIC_MBEAN_URL, "createVersion()");
            J4pExecResponse response = getJolokiaClient().execute(request);
            Map<String, Object> values = response.getValue();
            version = new VersionDTO(this.fabricFacade, values);
        } catch (Exception e) {
          Fabric8CorePlugin.getLogger().error("Failed to create version with id '" + versionId + "'.", e);
        }
      return version;
View Full Code Here

    @Override
    public List<VersionDTO> getVersions() {
      List<VersionDTO> versions = new ArrayList<VersionDTO>();
      try {
            J4pExecRequest request = JolokiaHelpers.createExecRequest(FABRIC_MBEAN_URL, "versions()");
            J4pExecResponse response = getJolokiaClient().execute(request);
            List<Map<String, Object>> values = response.getValue();
            for (Map<String, Object> value : values) {
              VersionDTO v = new VersionDTO(this.fabricFacade, value);
              if (v.getId().equalsIgnoreCase("master")) continue; // don't show "MASTER" version
              versions.add(new VersionDTO(this.fabricFacade, value));
            }
View Full Code Here

    @Override
    public String getGitUrl() {
      String gitUrl = null;
      try {
            J4pExecRequest request = JolokiaHelpers.createExecRequest(FABRIC_MBEAN_URL, "gitUrl()");
            J4pExecResponse response = getJolokiaClient().execute(request);
            gitUrl = response.getValue();
      } catch (Exception ex) {
        if (ex instanceof J4pRemoteException && ((J4pRemoteException)ex).getErrorType().equalsIgnoreCase("javax.management.InstanceNotFoundException")) {
          Fabric8CorePlugin.getLogger().error("The Fabric8 runtime is not compatible with this tooling version.", ex);
        } else {
              Fabric8CorePlugin.getLogger().error("Failed to fetch git url from fabric8.", ex);
View Full Code Here

    @Override
    public String getMavenProxyDownloadUrl() {
      String url = null;
      try {
            J4pExecRequest request = JolokiaHelpers.createExecRequest(FABRIC_MBEAN_URL, "mavenProxyDownloadUrl()");
            J4pExecResponse response = getJolokiaClient().execute(request);
            url = response.getValue();
        } catch (Exception e) {
          Fabric8CorePlugin.getLogger().error("Failed to fetch maven proxy download url from fabric8.", e);
        }
      return url;
    }
View Full Code Here

    @Override
    public String getMavenProxyUploadUrl() {
      String url = null;
      try {
            J4pExecRequest request = JolokiaHelpers.createExecRequest(FABRIC_MBEAN_URL, "mavenProxyUploadUrl()");
            J4pExecResponse response = getJolokiaClient().execute(request);
            url = response.getValue();
        } catch (Exception e) {
          Fabric8CorePlugin.getLogger().error("Failed to fetch maven proxy upload url from fabric8.", e);
        }
      return url;
    }
View Full Code Here

    @Override
    public String getWebUrl() {
      String url = null;
      try {
            J4pExecRequest request = JolokiaHelpers.createExecRequest(FABRIC_MBEAN_URL, "webConsoleUrl()");
            J4pExecResponse response = getJolokiaClient().execute(request);
            url = response.getValue();
        } catch (Exception e) {
          Fabric8CorePlugin.getLogger().error("Failed to fetch web console url from fabric8.", e);
        }
      return url;
    }
View Full Code Here

    @Override
    public List<ProfileDTO> getProfiles(String versionId) {
      List<ProfileDTO> profiles = new ArrayList<ProfileDTO>();
      try {
            J4pExecRequest request = JolokiaHelpers.createExecRequest(FABRIC_MBEAN_URL, "getProfiles(java.lang.String)", versionId);
            J4pExecResponse response = getJolokiaClient().execute(request);
            List<Map<String, Object>> values = response.getValue();
            for (Map<String, Object> value : values) {
              ProfileDTO p = new ProfileDTO(fabricFacade, value);
              if (p.isHidden()) {
                continue; // don't return hidden profiles
              }
View Full Code Here

TOP

Related Classes of org.jolokia.client.request.J4pExecResponse

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.