Package org.rhq.core.clientapi.server.content

Examples of org.rhq.core.clientapi.server.content.ContentServiceResponse


    // Runnable Implementation  --------------------------------------------

    public void run() {
        // Create the response
        ContentServiceResponse response = new ContentServiceResponse(request.getRequestId());

        InputStream inputStream = null;
        try {
            // Perform the request on the plugin
            inputStream = contentManager.performGetPackageBits(request.getResourceId(), request.getPackageDetails());

            // If the input stream was gotten, we're successful. Otherwise, the call failed.
            if (inputStream == null) {
                response.setErrorMessage("Null input stream received from plugin");
                response.setStatus(ContentRequestStatus.FAILURE);
            } else {
                response.setStatus(ContentRequestStatus.SUCCESS);
            }
        } catch (Throwable throwable) {
            response.setErrorMessageFromThrowable(throwable);
            response.setStatus(ContentRequestStatus.FAILURE);
        }

        // Notify the server that the request has been completed
        ContentServerService serverService = contentManager.getContentServerService();
        if (serverService != null) {
View Full Code Here

TOP

Related Classes of org.rhq.core.clientapi.server.content.ContentServiceResponse

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.