Examples of execute()


Examples of org.apache.sling.hc.api.HealthCheck.execute()

                final HealthCheck healthCheck = (HealthCheck) bundleContext.getService(metadata.getServiceReference());

                try {
                    if (healthCheck != null) {
                        resultFromHealthCheck = healthCheck.execute();
                    } else {
                        throw new IllegalStateException("Service for " + metadata + " is gone");
                    }

                } catch (final Exception e) {
View Full Code Here

Examples of org.apache.sling.hc.support.impl.DefaultLoginsHealthCheck.execute()

                }
                return null;
            }
        });
       
        return c.execute();
    }
   
    @Test
    public void testHealthCheckFails() throws Exception {
        assertFalse("Expecting failed check", getTestResult("admin:admin").isOk());
View Full Code Here

Examples of org.apache.sling.installer.api.tasks.InstallTask.execute()

                            }
                            // reset attribute
                            if ( aSyncTask.getResource() != null ) {
                                aSyncTask.getResource().setAttribute(InstallTask.ASYNC_ATTR_NAME, oldValue);
                            }
                            aSyncTask.execute(ctx);
                            logger.debug("Background thread {} ends",  Thread.currentThread().getName());
                        }
                    };
                    t.start();
                    return ACTION.SHUTDOWN;
View Full Code Here

Examples of org.apache.sling.launchpad.base.impl.bootstrapcommands.BootstrapCommandFile.execute()

        final File slingStartupDir = getSlingStartupDir(launchpadHome);

        // execute bootstrap commands, if needed
        final BootstrapCommandFile cmd = new BootstrapCommandFile(logger,
            new File(launchpadHome, BOOTSTRAP_CMD_FILENAME));
        boolean requireRestart = cmd.execute(bundleContext);

        boolean shouldInstall = false;

        // see if the loading of bundles from the package is forced
        final String fpblString = bundleContext.getProperty(SharedConstants.FORCE_PACKAGE_BUNDLE_LOADING);
View Full Code Here

Examples of org.apache.sling.replication.agent.ReplicationAgent.execute()

        ResourceResolver resourceResolver = request.getResourceResolver();

        if (agent != null) {
            try {
                ReplicationResponse replicationResponse = agent.execute(resourceResolver, replicationRequest);
                if (replicationResponse.isSuccessful()) {
                    if (ItemState.SUCCEEDED.toString().equals(replicationResponse.getStatus())) {
                        response.setStatus(200);
                    }
                    if (ItemState.QUEUED.toString().equals(replicationResponse.getStatus())
View Full Code Here

Examples of org.apache.sling.testing.tools.http.RequestExecutor.execute()

        final Request r = builder
        .buildPostRequest(subpath.toString())
        .withCredentials(username, password)
        .withCustomizer(requestCustomizer)
        .withEntity(new UrlEncodedFormEntity(opt));
        executor.execute(r).assertStatus(200);

        return executor;
    }
   
    /** If called after runTests, returns the path used to
View Full Code Here

Examples of org.apache.solr.core.SolrCore.execute()

   
    // Execute the ping query and catch any possible exception
    Throwable ex = null;
    try {
      SolrQueryResponse pingrsp = new SolrQueryResponse();
      core.execute(handler, req, pingrsp );
      ex = pingrsp.getException();
    }
    catch( Throwable th ) {
      ex = th;
    }
View Full Code Here

Examples of org.apache.stanbol.commons.jobs.api.JobManager.execute()

                return Response.status(Response.Status.NOT_FOUND).build();
            }
        }else{
            // No id have been provided, we create a new test job
            JobManager m = getJobManager();
            String id = m.execute(new Job() {
                @Override
                public JobResult call() throws Exception {
                    for (int i = 0; i < 30; i++) {
                        try {
                            log.info("Test Process is working");
View Full Code Here

Examples of org.apache.stanbol.commons.testing.http.RequestExecutor.execute()

        public void run() {
            RequestExecutor executor = new RequestExecutor(pooledHttpClient);
            long start = System.currentTimeMillis();
            Long rtt;
            try {
                executor.execute(request).assertStatus(200);
                content = null; //do not store content for successfull resutls
                rtt = System.currentTimeMillis()-start;
            } catch (Throwable e) {
                log.warn("Error while sending Request ",e);
                tracker.failed(request,content,executor);
View Full Code Here

Examples of org.apache.stanbol.entityhub.ldpath.EntityhubLDPath.execute()

            return Collections.emptyMap();
        }

        Representation representation;
        for (String context : contexts) {
            representation = ldPath.execute(vf.createReference(context), program);
            Iterator<String> fieldNames = representation.getFieldNames();
            while (fieldNames.hasNext()) {
                String fieldName = fieldNames.next();
                Iterator<Object> valueIterator = representation.get(fieldName);
                if (!valueIterator.hasNext()) continue;
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.