Package org.jboss.as.domain.controller

Examples of org.jboss.as.domain.controller.StreamedResponse


            final Marshaller marshaller = getMarshaller();
            marshaller.start(createByteOutput(output));

            BlockingQueue<List<StreamedResponse>> responseQueue = new LinkedBlockingQueue<List<StreamedResponse>>();
            domainController.executeDeploymentPlan(deploymentPlan, responseQueue);
            StreamedResponse rsp;
            do {
                rsp = null;
                List<StreamedResponse> rspList;
                try {
                    rspList = responseQueue.take();
                }
                catch (InterruptedException ie) {
                    Thread.currentThread().interrupt();
                    throw new IOException("Interrupted while reading deployment plan execution responses", ie);
                }
                for (StreamedResponse item : rspList) {
                    rsp = item;
                    marshaller.writeByte(rsp.getProtocolValue());
                    log.tracef("Marshalling StreamedResponse %s", rsp.getProtocolValue());
                    if (rsp.getValue() != null) {
                        marshaller.writeObject(rsp.getValue());
                    }
                }
            }
            while (rsp != null && !rsp.isLastInStream());

            marshaller.finish();
        }
View Full Code Here

TOP

Related Classes of org.jboss.as.domain.controller.StreamedResponse

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.