Package org.jolokia.client.request

Examples of org.jolokia.client.request.J4pExecRequest


        String expandedConfig = expandPlaceholders(configFileContents);
        String data = Base64Encoder.encode(expandedConfig);
        String mbeanName = "io.fabric8:type=Fabric";
        getLog().info("Uploading file " + relativePath + " to invoke mbean " + mbeanName + " on jolokia URL: " + jolokiaUrl + " with user: " + fabricServer.getUsername());
        try {
            J4pExecRequest request = new J4pExecRequest(mbeanName, "setConfigurationFile", versionId, profileId, relativePath, data);
            J4pResponse<J4pExecRequest> response = client.execute(request, "POST");
            Object value = response.getValue();
            if (value != null) {
                getLog().info("Upload returned result: " + value);
            }
View Full Code Here


                + (requirements.isUseResolver() ? " using OSGi resolver" : "")
                + (requirements.isLocked() ? " locked" : ""));
        getLog().info("About to invoke mbean " + mbeanName + " on jolokia URL: " + jolokiaUrl + " with user: " + fabricServer.getUsername());
        getLog().debug("JSON: " + json);
        try {
            J4pExecRequest request = new J4pExecRequest(mbeanName, "deployProjectJson", json);
            J4pResponse<J4pExecRequest> response = client.execute(request, "POST");
            Object value = response.getValue();
            if (value == null) {
                return null;
            } else {
View Full Code Here

        String versionId = results.getVersionId();
        ObjectName mbeanName = new ObjectName(FABRIC_MBEAN);
        if (!Strings.isNullOrBlank(profileId) && !Strings.isNullOrBlank(versionId)) {
            getLog().info("Performing profile refresh on mbean: " + mbeanName + " version: " + versionId + " profile: " + profileId);
            try {
                J4pExecRequest request = new J4pExecRequest(mbeanName, "refreshProfile", versionId, profileId);
                J4pResponse<J4pExecRequest> response = client.execute(request, "POST");
                response.getValue();
            } catch (J4pRemoteException e) {
                getLog().error("Failed to refresh profile " + profileId + " on mbean " + mbeanName + " on jolokia URL: " + jolokiaUrl + " with user: " + fabricServer.getUsername() + ". Error: " + e.getErrorType());
                getLog().error("Stack: " + e.getRemoteStackTrace());
View Full Code Here

    // Helpers

    private String decodeSentConfig() throws J4pException {
        verify(jolokiaClient).execute(jolokiaRequest.capture(), anyString());
        J4pExecRequest capturedRequest = jolokiaRequest.getValue();
        String encodedConfig = (String) capturedRequest.getArguments().get(3);
        return decode(encodedConfig);
    }
View Full Code Here

                    client.execute(writeReq);
                    return null;
                } else {
                    Object[] params = marshalParameters(method, args);
                    String operation = getOperationInfo(method).getName();
                    J4pExecRequest execReq = new J4pExecRequest(objectName, operation, params);
                    execReq.setPreferredHttpMethod("POST");
                    Object result = client.execute(execReq).getValue();
                    return unmarshalResult(method, result);
                }
            } catch (Throwable th) {
                LOGGER.error("Proxy invocation error on: " + method.getDeclaringClass().getName() + "." + method.getName(), th);
View Full Code Here

TOP

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

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.