Examples of ExecutionContext


Examples of ch.qos.logback.core.joran.spi.ExecutionContext

  final public void doConfigure(final InputSource inputSource) {
    // This line is needed here because there is logging from inside this method.
    selfInitialize(this.context);
   
    ExecutionContext ec = joranInterpreter.getExecutionContext();


    SAXParser saxParser = null;
    try {
        SAXParserFactory spf = SAXParserFactory.newInstance();
        spf.setValidating(false);
        spf.setNamespaceAware(true);
        saxParser = spf.newSAXParser();
    } catch (Exception pce) {
      String errMsg = "Parser configuration error occured";
      ec.addError(errMsg, pce);
      return;
    }
   
    try {
      // attachListAppender(context);
      saxParser.parse(inputSource, joranInterpreter);
    } catch(IOException ie) {
      final String errMsg = "I/O error occurred while parsing xml file";
      ec.addError(errMsg, ie);
    } catch (Exception ex) {
      final String errMsg = "Problem parsing XML document. See previously reported errors. Abandoning all further processing.";
      addError(errMsg, ex);
      return;
    } finally {
View Full Code Here

Examples of ch.tatool.exec.ExecutionContext

  public void startExecutionAWT() {
    regionsContainer = ContainerUtils.getRegionsContainer();
    display = ExecutionDisplayUtils.getDisplay(getExecutionContext());
    ContainerUtils.showRegionsContainer(display);
    ExecutionContext context = getExecutionContext();
   
    // get current stimulus
    getCurrentStimulus();
   
    // check for question dependency
    if (!stimulusInfo[1].equals("")) {
      int questionID = Integer.parseInt(stimulusInfo[1]);
      String oldResponse = trialResponses.get(questionID);
      if (!oldResponse.equals(stimulusInfo[2])) {
        // skip this question
        if (getFinishExecutionLock()) {
          cancelExecutionAWT();
          finishExecution();
          return;
        }
      }
    }

    // create trial
    currentTrial = context.getExecutionData().getCreateLastTrial();
    currentTrial.setParentId(getId());
    Timing.getStartTimeProperty().setValue(this, new Date());


    item = stimulusInfo[3];
View Full Code Here

Examples of com.amazonaws.http.ExecutionContext

    public void removeRequestHandler(RequestHandler requestHandler) {
        requestHandlers.remove(requestHandler);
    }

    protected ExecutionContext createExecutionContext() {
        ExecutionContext executionContext = new ExecutionContext(requestHandlers);
        return executionContext;
    }
View Full Code Here

Examples of com.asakusafw.yaess.core.ExecutionContext

        HadoopScriptHandler handler = handler(
                "env.ASAKUSA_HOME", getAsakusaHome().getAbsolutePath(),
                "prop.hello", "handler",
                "prop.bar", "moga");
        ExecutionContext context = new ExecutionContext(
                "tbatch", "tflow", "texec", ExecutionPhase.MAIN, map());
        execute(context, script, handler);

        List<String> results = getOutput(shell);
        assertThat(results.subList(0, 5), is(Arrays.asList(
                "com.example.Client",
                "tbatch",
                "tflow",
                "texec",
                context.getArgumentsAsString())));

        List<String> rest = results.subList(5, results.size());
        int hello = rest.indexOf("hello=world");
        assertThat(hello, greaterThanOrEqualTo(1));
        assertThat(rest.get(hello - 1), is("-D"));
View Full Code Here

Examples of com.betfair.cougar.api.ExecutionContext

    public void initialiseExecutionContext() {
        final Identity transportIdentity = new EventTransportIdentityImpl(JmsEventTransportImpl.this, transportIdentifier);

        if (executionContext == null) {
            executionContext = new ExecutionContext() {

                @Override
                public GeoLocationDetails getLocation() { return null; }

                @Override
                public IdentityChain getIdentity() {
                    return new IdentityChain() {
                        List<Identity> identities= new ArrayList<Identity>(1) {{ add(transportIdentity);}};

                        @Override
                        public List<Identity> getIdentities() {
                            return identities;
                        }

                        @Override
                        public void addIdentity(Identity identity) {
                            identities.add(identity);
                        }

                        @SuppressWarnings({"unchecked"})
                        @Override
                        public <T extends Identity> List<T> getIdentities(Class<T> clazz) {
                            List<T> filteredIdentityList = new ArrayList<T>();
                            for (Identity identity : identities) {
                                if (clazz.isAssignableFrom(identity.getClass())) {
                                    filteredIdentityList.add((T)identity);
                                }
                            }
                            return filteredIdentityList;
                        }

                        public String toString() {
                            StringBuffer sb = new StringBuffer("Sonic IdentityChain_");
                            for (int i=0; i<identities.size(); i++) {
                                sb.append("Identity:").append(i).append(" ").append(identities.get(i)).append(" ");
                            }
                            return sb.toString();
                        }
                    };
                }

                @Override
                public RequestUUID getRequestUUID() { return null; }

                @Override
                public Date getReceivedTime() { return null; }

                @Override
                public Date getRequestTime() { return null; }

                @Override
                public boolean traceLoggingEnabled() { return false;}

                @Override
                public int getTransportSecurityStrengthFactor() {
                    return 0// todo: where do we get this from??
                }

                @Override
                public boolean isTransportSecure() {
                    return getTransportSecurityStrengthFactor() > 1;
                }
            };
        } else {
            if (executionContext.getIdentity() != null &&
                    executionContext.getIdentity().getIdentities(EventTransportIdentity.class).isEmpty()) {

                final ExecutionContext delegateExecutionContext = executionContext;
                final List<Identity> augmentedIdentityChainList = new ArrayList<Identity>(delegateExecutionContext.getIdentity().getIdentities());
                augmentedIdentityChainList.add(transportIdentity);

                executionContext = new ExecutionContext() {
                    @Override
                    public IdentityChain getIdentity() {
                        IdentityChain ic = new IdentityChain() {
                            @Override
                            public List<Identity> getIdentities() {
                                return augmentedIdentityChainList;
                            }

                            @Override
                            public void addIdentity(Identity identity) {
                                augmentedIdentityChainList.add(identity);
                            }

                            @Override
                            public <T extends Identity> List<T> getIdentities(Class<T> clazz) {
                                List<T> filteredIdentityChain = new ArrayList<T>();
                                for (Identity identity : augmentedIdentityChainList) {
                                    if (clazz.isAssignableFrom(identity.getClass())) {
                                        filteredIdentityChain.add((T)identity);
                                    }
                                }
                                return filteredIdentityChain;
                            }

                            public String toString() {
                                StringBuffer sb = new StringBuffer("Sonic IdentityChain_\n");
                                for (int i=0; i<augmentedIdentityChainList.size(); i++) {
                                    sb.append("Identity:").append(i).append(" ").append(augmentedIdentityChainList.get(i)).append(" ");
                                }
                                return sb.toString();
                            }
                        };
                        return ic;
                    }
                    @Override
                    public RequestUUID getRequestUUID() { return delegateExecutionContext.getRequestUUID(); }
                    @Override
                    public Date getReceivedTime() { return delegateExecutionContext.getReceivedTime(); }
                    @Override
                    public Date getRequestTime() { return delegateExecutionContext.getRequestTime(); }
                    @Override
                    public boolean traceLoggingEnabled() { return delegateExecutionContext.traceLoggingEnabled(); }
                    @Override
                    public GeoLocationDetails getLocation() { return delegateExecutionContext.getLocation(); }
                    @Override
                    public int getTransportSecurityStrengthFactor() { return delegateExecutionContext.getTransportSecurityStrengthFactor(); }
                    @Override
                    public boolean isTransportSecure() { return delegateExecutionContext.isTransportSecure(); }
                };
            }
        }
    }
View Full Code Here

Examples of com.codebullets.sagalib.context.ExecutionContext

    private void handleSagaMessage(final Object invokeParam) throws InvocationTargetException, IllegalAccessException {
        Collection<SagaInstanceDescription> sagaDescriptions = sagaFactory.create(invokeParam);
        if (sagaDescriptions.isEmpty()) {
            LOG.warn("No saga found to handle message. {}", invokeParam);
        } else {
            ExecutionContext context = contextProvider.get();

            for (SagaInstanceDescription sagaDescription : sagaDescriptions) {
                Saga saga = sagaDescription.getSaga();
                setSagaExecutionContext(saga, context);

                invoker.invoke(saga, invokeParam);
                updateStateStorage(sagaDescription);

                if (context.dispatchingStopped()) {
                    LOG.debug("Handler dispatching stopped after invoking saga {}.", sagaDescription.getSaga().getClass().getSimpleName());
                    break;
                }
            }
        }
View Full Code Here

Examples of com.cognifide.slice.api.execution.ExecutionContext

    this.resourceResolver = resourceResolver;
  }

  @Override
  public Resource get() {
    final ExecutionContext executionItem = currentExecutionContext.peek();
    if (executionItem.getResource() != null) {
      return executionItem.getResource();
    } else {
      final Resource resource = resourceResolver.getResource(executionItem.getPath());
      return ResourceUtil.getValidResourceOrNull(resource);
    }
  }
View Full Code Here

Examples of com.dtolabs.rundeck.core.execution.ExecutionContext

                    executionItem1 instanceof testWorkflowCmdItem);
                testWorkflowCmdItem execItem = (testWorkflowCmdItem) executionItem1;
                assertNotNull(execItem.getNodeStepType());
                assertEquals("my-type", execItem.getNodeStepType());

                final ExecutionContext executionContext = interpreterMock.executionContextList.get(0);
                assertEquals(TEST_PROJECT, executionContext.getFrameworkProject());
                assertNotNull(executionContext.getDataContext());
                assertNotNull(executionContext.getDataContext().get("node"));
                assertEquals(0, executionContext.getLoglevel());
                assertEquals("user1", executionContext.getUser());
                assertEquals(SelectorUtils.singleNode("test1"), executionContext.getNodeSelector());
            }
            {

                final StepExecutionItem executionItem1 = interpreterMock.executionItemList.get(1);
                assertTrue("wrong class: " + executionItem1.getClass().getName(),
                    executionItem1 instanceof testWorkflowCmdItem);
                testWorkflowCmdItem execItem = (testWorkflowCmdItem) executionItem1;
                assertNotNull(execItem.getNodeStepType());
                assertEquals("my-type", execItem.getNodeStepType());

                final ExecutionContext executionContext = interpreterMock.executionContextList.get(1);
                assertEquals(TEST_PROJECT, executionContext.getFrameworkProject());

                assertNotNull(executionContext.getDataContext());
                assertNotNull(executionContext.getDataContext().get("node"));
                assertEquals(0, executionContext.getLoglevel());
                assertEquals("user1", executionContext.getUser());
                assertEquals(SelectorUtils.singleNode("testnode2"), executionContext.getNodeSelector());
            }
            {

                final StepExecutionItem executionItem1 = interpreterMock.executionItemList.get(2);
                assertTrue("wrong class: " + executionItem1.getClass().getName(),
                    executionItem1 instanceof testWorkflowCmdItem);
                testWorkflowCmdItem execItem = (testWorkflowCmdItem) executionItem1;
                assertNotNull(execItem.getNodeStepType());
                assertEquals("my-type", execItem.getNodeStepType());

                final ExecutionContext executionContext = interpreterMock.executionContextList.get(2);
                assertEquals(TEST_PROJECT, executionContext.getFrameworkProject());

                assertNotNull(executionContext.getDataContext());
                assertNotNull(executionContext.getDataContext().get("node"));
                assertEquals(0, executionContext.getLoglevel());
                assertEquals("user1", executionContext.getUser());
                assertEquals(SelectorUtils.singleNode("testnode3"), executionContext.getNodeSelector());
            }
        }
    }
View Full Code Here

Examples of com.founder.fix.fixflow.core.runtime.ExecutionContext

    TokenEntity token = processInstanceImpl.getTokenMap().get(tokenId);

    processInstanceImpl.getContextInstance().setTransientVariableMap(
        transientVariables);

    ExecutionContext executionContext = ProcessObjectFactory.FACTORYINSTANCE
        .createExecutionContext(token);

    if (taskCommand != null && taskCommand.getExpression() != null) {
      try {
View Full Code Here

Examples of com.hp.hpl.jena.sparql.engine.ExecutionContext

            // And the contains was true??!!!!!!
            if ( g == null )
                return null ;
                //throw new ARQInternalErrorException(".containsGraph was true but .getGraph is null") ;
           
            ExecutionContext cxt2 = new ExecutionContext(outerCxt, g) ;
            QueryIterator subInput = QueryIterSingleton.create(binding, cxt2) ;
            return QC.execute(op, subInput, cxt2) ;
        }
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.