Examples of ResultHandler


Examples of org.jboss.as.controller.ResultHandler

                for(final ProxyController proxy : proxies) {
                    final PathAddress proxyAddress = proxy.getProxyNodeAddress();
                    final ModelNode newOperation = operation.clone();
                    newOperation.get(OP_ADDR).set(address.subAddress(proxyAddress.size()).toModelNode());
                    final Operation operationContext = OperationBuilder.Factory.create(newOperation).build();
                    proxy.execute(operationContext, new ResultHandler() {
                        @Override
                        public void handleResultFragment(String[] location, ModelNode result) {
                            synchronized(failureResult) {
                                if(status.get() == 0) {
                                    // Addresses are aggregated as list by the controller
View Full Code Here

Examples of org.jboss.as.controller.ResultHandler

                            if(handler != null) {
                                // Create the attribute operation
                                final ModelNode attributeOperation = readOperation.clone();
                                attributeOperation.get(NAME).set(attributeName);
                                // TODO this assumes the ResultHandler is invoked synchronously
                                handler.execute(context, attributeOperation, new ResultHandler() {
                                    @Override
                                    public void handleResultFragment(final String[] location, final ModelNode attributeResult) {
                                        result.get(attributeName).set(attributeResult);
                                    }
                                    @Override
View Full Code Here

Examples of org.jboss.as.controller.ResultHandler

                            readOp.get(OP_ADDR).set(childAddress.toModelNode());

                            if(operation.hasDefined(INCLUDE_RUNTIME))
                                readOp.get(INCLUDE_RUNTIME).set(operation.get(INCLUDE_RUNTIME).asBoolean());

                            final ModelNode readResult = readModel(context, readOp, new ResultHandler() {
                                public void handleResultFragment(String[] location, ModelNode result) {
                                    // TODO
                                }
                                public void handleResultComplete() {
                                    // TODO
View Full Code Here

Examples of org.jboss.as.controller.ResultHandler

            if (rollbackOperation == null || !rollbackOperation.isDefined()) {
                delegate.handleFailed(failureDescription);
                return;
            }

            final ResultHandler rollbackHandler = new ResultHandler() {

                @Override
                public void handleResultFragment(String[] location, ModelNode result) {
                    // ignore fragments from rollback
                }
View Full Code Here

Examples of org.jenkinsci.plugins.workflow.cps.steps.ParallelStep.ResultHandler

        // see the corresponding hack in DSL.invokeMethod

        CpsStepContext cps = (CpsStepContext) getContext();
        CpsThread t = CpsThread.current();

        ResultHandler r = new ResultHandler(cps);

        for (Entry<String,Closure> e : parallelStep.closures.entrySet()) {
            BodyExecution body = cps.invokeBodyLater(
                    t.getGroup().export(e.getValue()),
                    Collections.singletonList(new ParallelLabelAction(e.getKey()))
            );
            body.addCallback(r.callbackFor(e.getKey()));
            bodies.add(body);
        }

        return false;
    }
View Full Code Here

Examples of uk.gov.nationalarchives.droid.core.interfaces.ResultHandler

        BinarySignatureIdentifier droid = new BinarySignatureIdentifier();
        SubmissionGateway submissionGateway = new SubmissionGateway();
        submissionGateway.setDroidCore(droid);
       
        droid.setSignatureFile("test_sig_files/DROID_SignatureFile_V26.xml");
        ResultHandler resultHandler = mock(ResultHandler.class);
        submissionGateway.setResultHandler(resultHandler);
        submissionGateway.setProcessArchives(true);
        submissionGateway.setExecutorService(Executors.newFixedThreadPool(2));
       
        SubmissionQueue submissionQueue = mock(SubmissionQueue.class);
View Full Code Here

Examples of uk.gov.nationalarchives.droid.core.interfaces.ResultHandler

        SubmissionQueue submissionQueue = mock(SubmissionQueue.class);
        submissionGateway.setSubmissionQueue(submissionQueue);
        submissionGateway.setDroidCore(droid);
       
        droid.setSignatureFile("test_sig_files/DROID_SignatureFile_V26.xml");
        ResultHandler resultHandler = mock(ResultHandler.class);
        submissionGateway.setResultHandler(resultHandler);
        submissionGateway.setExecutorService(Executors.newFixedThreadPool(2));
        try {
            droid.init();
        } catch (SignatureParseException e) {
View Full Code Here

Examples of uk.gov.nationalarchives.droid.core.interfaces.ResultHandler

        when(requestFactory.newRequest(any(RequestMetaData.class), any(RequestIdentifier.class)))
            .thenReturn(request);
       
        fileEventHandler.setRequestFactory(requestFactory);
       
        ResultHandler resultHandler = mock(ResultHandler.class);
       
        fileEventHandler.setResultHandler(resultHandler);
       
        SubmissionThrottle throttle = mock(SubmissionThrottle.class);
        fileEventHandler.setSubmissionThrottle(throttle);
View Full Code Here

Examples of uk.gov.nationalarchives.droid.core.interfaces.ResultHandler

        final IOException ioException = new IOException("Can't read me!");
        doThrow(ioException).when(request).open(any(InputStream.class));
       
        fileEventHandler.setRequestFactory(requestFactory);
       
        ResultHandler resultHandler = mock(ResultHandler.class);
       
        fileEventHandler.setResultHandler(resultHandler);
       
        SubmissionThrottle throttle = mock(SubmissionThrottle.class);
        fileEventHandler.setSubmissionThrottle(throttle);
View Full Code Here

Examples of uk.gov.nationalarchives.droid.core.interfaces.ResultHandler

        AsynchDroid droidCore = mock(AsynchDroid.class);

       
       
        ZipArchiveHandler handler = new ZipArchiveHandler();
        ResultHandler resultHandler = mock(ResultHandler.class);
        when(resultHandler.handleDirectory(any(IdentificationResult.class), eq(parentId),
                 eq(false))).thenReturn(nodeId);
        handler.setResultHandler(resultHandler);

        handler.setFactory(factory);
        handler.setDroidCore(droidCore);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.