Handy method which runs the JmxProcess
197671
public void executeStandalone(JmxProcess process) throws Exception {
		this.masterServersList = process.getServers();

		this.serverScheduler.start();

		this.processServersIntoJobs();

		// Sleep for 10 seconds to wait for jobs to complete.
		// There should be a better way, but it seems that way isn't working
		// right now.
		Thread.sleep(MILLISECONDS.convert(10, SECONDS));
	}
347860
def run(self):
        """"""
        # Catch all possible exceptions raised by the running thread
        # and let parent process know about it.
        try:
            self._run()
        except Exception:  # pylint: disable=broad-except
            self.action.put(
                ServiceCheckDiedError(self.name, traceback.format_exc())
            )
1374322
def runner(self, classpath, main, jvm_options=None, args=None, cwd=None):
    """"""
    return self._runner(*self._scrub_args(classpath, main, jvm_options, args, cwd=cwd))
1354933
@SuppressWarnings("InfiniteLoopStatement")
	public static void main(String[] args) throws Exception {
		SimonManager.callback().addCallback(new JmxRegisterCallback("org.javasimon.examples.jmx.JmxCallbackExample"));

		Counter counter = SimonManager.getCounter("org.javasimon.examples.jmx.counter");
		Stopwatch stopwatch = SimonManager.getStopwatch("org.javasimon.examples.jmx.stopwatch");
		// these created just to have more stuff in jconsole
		SimonManager.getCounter("org.javasimon.different.counter");
		SimonManager.getStopwatch("org.javasimon.some.other.jmx.stopwatch1");
		SimonManager.getStopwatch("org.javasimon.some.other.jmx.stopwatch2");
		System.out.println("Now open jconsole and check it out...\nWatch org.javasimon.examples.jmx.stopwatch for changes.");
		while (true) {
			counter.increase();
			try (Split ignored = stopwatch.start()) {
				ExampleUtils.waitRandomlySquared(40);
			}
		}
	}
441809
def run(self):
        
        self._start_dynac_proc(stdin=subp.PIPE, stdout=subp.PIPE)
        str2write = self.name + '\r\n'
        if self._DEBUG:
            with open('pynacrun.log', 'a') as f:
                f.write(str2write)
        self.dynacProc.stdin.write(str2write.encode())  # The name field
        for pynEle in self.lattice:
            try:
                ele = pynEle.dynacRepresentation()
            except AttributeError:
                ele = pynEle
            str2write = ele[0]
            if self._DEBUG:
                with open('pynacrun.log', 'a') as f:
                    f.write(str2write + '\r\n')
            try:
                self.dynacProc.stdin.write((str2write + '\r\n').encode())
            except IOError:
                break
            for datum in ele[1]:
                str2write = ' '.join([str(i) for i in datum])
                if self._DEBUG:
                    with open('pynacrun.log', 'a') as f:
                        f.write(str2write+'\r\n')
                try:
                    self.dynacProc.stdin.write((str2write+'\r\n').encode())
                except IOError:
                    break
        self.dynacProc.stdin.close()
        if self.dynacProc.wait() != 0:
            raise RuntimeError("Errors occured during execution of Dynac")
935034
private void processOnce() throws CompilationFailedException, IOException, URISyntaxException {
        GroovyShell groovy = new GroovyShell(conf);
        setupContextClassLoader(groovy);
        groovy.run(getScriptSource(isScriptFile, script), args);
    }
675329
private void doJmxValue(HttpServletResponse httpResponse, String jmxValueParameter)
			throws IOException {
		httpResponse.setContentType("text/plain");
		httpResponse.getWriter().write(MBeans.getConvertedAttributes(jmxValueParameter));
		httpResponse.flushBuffer();
	}
459648
@AroundInvoke
    public Object execute(InvocationContext context) throws Exception {
        String methodName = "execute";

        String classOperationName = OpenTracingService.getClassOperationName(context.getMethod());
        String methodOperationName = OpenTracingService.getMethodOperationName(context.getMethod());

        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
            Tr.debug(tc, methodName + " operation names", classOperationName, methodOperationName);
        }

        boolean process = true;

        if (!OpenTracingService.isTraced(classOperationName, methodOperationName)) {
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                Tr.debug(tc, methodName + " skipping untraced method");
            }
            process = false;
        }

        if (process && isHandledByFilter(context.getMethod())) {
            // This is already processed as part of the OpentracingContainerFilter
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                Tr.debug(tc, methodName + " skipping JAXRS method");
            }
            process = false;
        }

        if (process) {

            String operationName;

            if (OpenTracingService.hasExplicitOperationName(methodOperationName)) {
                operationName = methodOperationName;
            } else {
                // If the annotated method is not a JAX-RS endpoint, the default
                // operation name of the new Span for the method is:
                // <package name>.<class name>.<method name> [...]
                // If operationName is specified on a class, that operationName will be used
                // for all methods of the class unless a method explicitly overrides it with
                // its own operationName."
                // https://github.com/eclipse/microprofile-opentracing/blob/master/spec/src/main/asciidoc/microprofile-opentracing.asciidoc#321-the-traced-annotation
                if (OpenTracingService.hasExplicitOperationName(classOperationName)) {
                    operationName = classOperationName;
                } else {
                    operationName = context.getMethod().getDeclaringClass().getName() + "." + context.getMethod().getName();
                }

                if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                    Tr.debug(tc, methodName + " setting default operationName", operationName);
                }
            }

            Tracer tracer = OpentracingTracerManager.getTracer();

            try (Scope scope = tracer.buildSpan(operationName).startActive(true)) {
                try {
                    Object result = context.proceed();
                    return result;
                } catch (Exception e) {
                    OpentracingService.addSpanErrorInfo(scope.span(), e);
                    throw e;
                } catch (Error e) {
                    OpentracingService.addSpanErrorInfo(scope.span(), e);
                    throw e;
                }
            }
        } else {
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                Tr.debug(tc, methodName + " normal processing");
            }
            return context.proceed();
        }
    }
812986
public void execute()
        throws MojoExecutionException
    {
        File jarFile = createArchive();

        String classifier = getClassifier();
        if ( classifier != null )
        {
            projectHelper.attachArtifact( getProject(), "jar", classifier, jarFile );
        }
        else
        {
            getProject().getArtifact().setFile( jarFile );
        }
    }
122618
def run_jar(self, mem=None):
        
        cmd = config.get_command('java')
        if mem:
            cmd.append('-Xmx%s' % mem)
        cmd.append('-jar')
        cmd += self.cmd
        self.run(cmd)
1093772
def execute(self, processProtocol, command, env={},
                path=None, uid=None, gid=None, usePTY=0, childFDs=None):
        
        raise NotImplementedError()
806389
private Object execute(XmlRpcMethodName methodName, String identifier) throws GreenPepperServerException
    {
        return execute(methodName, new Vector(), identifier);
    }
526767
public void execute()
            throws MojoExecutionException {
        if (extensions == null || extensions.isEmpty()) {
            extensions = ImmutableList.of("md", "markdown");
        }

        if (instance == null) {
            instance = new PegDownProcessor(Extensions.ALL);
        }

        try {
            for (File f : getResources(extensions)) {
                process(f);
            }
        } catch (IOException e) {
            throw new MojoExecutionException("Error while processing a Markdown file", e);
        }

    }
119599
def run(self, tmp=None, task_vars=None):
        
        self._connection.on_action_run(
            task_vars=task_vars,
            delegate_to_hostname=self._task.delegate_to,
            loader_basedir=self._loader.get_basedir(),
        )
        return super(ActionModuleMixin, self).run(tmp, task_vars)
641043
public static void main(String[] args) throws MalformedObjectNameException {
		// We create some example Simons
		Stopwatch stopwatch = SimonManager.getStopwatch("org.javasimon.jmx.example1");
		Counter counter = SimonManager.getCounter("org.javasimon.jmx.example2");

		// Do little measurement for stopwatch Simon ...
		try (Split ignored = stopwatch.start()) {
			Thread.sleep(632);
		} catch (InterruptedException e) { /* do nothing */ }

		// ... and few usage of counter Simon.
		counter.increase(52);
		counter.decrease(12);
		counter.increase(18);

		// Than, we register provided SimonManagerMXBean.
		// SimonManagerMXBean is part of javasimon, but register method is client responsibility
		// so look to it for more detail.
		register();

		// The following is client part of code.
		// Because, this is same VM, we don't need to create JMXConnector object and
		// than obtain MBeanServerConnection. Platform MBeanServer is a MBeanServerConnection
		// already, so it's used.
		// So we use JMX.newMXBeanProxy method to make JMX create new client proxy of SimonManagerMXBean
		// for us.
		SimonManagerMXBean simonManagerMXBean = JMX.newMXBeanProxy(ManagementFactory.getPlatformMBeanServer(),
			new ObjectName("org.javasimon.jmx.example:type=Simon"), SimonManagerMXBean.class);

		// Now, we can freely retrieve samples for counter and stopwatch example Simons
		System.out.println("counter = " + simonManagerMXBean.getCounterSample("org.javasimon.jmx.example2"));
		System.out.println("stopwatch = " + simonManagerMXBean.getStopwatchSample("org.javasimon.jmx.example1"));

		// After all, it's good manner to clean up, so we unregister MXBean
		unregister();
	}
1213995
public void execute()
        throws MojoExecutionException, MojoFailureException
    {
        try
        {
            for ( String name : getModules() )
            {
                File output = new File( getOutputDirectory(), readModule( name ).getPath() );
                clean( output );
            }
            clean( new File( getOutputDirectory(), ".gwt-tmp" ) );
        }
        catch ( GwtModuleReaderException e )
        {
            throw new MojoExecutionException( e.getMessage(), e );
        }
    }
864023
@Override
    protected void doExecute() throws Exception {
        final AnnotationHandler annotationHandler = getAnnotationHandler();

        final Set<Method> methods = findAnnotatedMethods(annotationHandler);

        final Map<String, FunctionConfiguration> configMap = getFunctionConfigurations(annotationHandler, methods);

        validateFunctionConfigurations(configMap);

        final ObjectWriter objectWriter = getObjectWriter();

        writeEmptyHostJsonFile(objectWriter);

        writeFunctionJsonFiles(objectWriter, configMap);

        copyJarsToStageDirectory();

        final CommandHandler commandHandler = new CommandHandlerImpl(this.getLog());
        final FunctionCoreToolsHandler functionCoreToolsHandler = getFunctionCoreToolsHandler(commandHandler);
        final Set<BindingEnum> bindingClasses = this.getFunctionBindingEnums(configMap);

        installExtension(functionCoreToolsHandler, bindingClasses);

        info(BUILD_SUCCESS);
    }