Package org.jrebirth.af.core.concurrent

Examples of org.jrebirth.af.core.concurrent.AbstractJrbRunnable


    // @Test
    public void testJIT() {

        final AtomicBoolean ok = new AtomicBoolean(false);

        JRebirth.runIntoJIT(new AbstractJrbRunnable("JIT test") {

            @Override
            protected void runInto() throws JRebirthThreadException {
                LOGGER.info("Running into " + Thread.currentThread().getName());
                ok.set(JRebirth.isJIT());
View Full Code Here


    // @Test
    public void testJTP() {

        final AtomicBoolean ok = new AtomicBoolean(false);

        JRebirth.runIntoJTP(new AbstractJrbRunnable("JTP test") {

            @Override
            protected void runInto() throws JRebirthThreadException {
                LOGGER.info("Running into " + Thread.currentThread().getName());
                ok.set(JRebirth.isJTPSlot());
View Full Code Here

                // Nothing to do yet

            }
        });

        JRebirth.runIntoJIT(new AbstractJrbRunnable("Send Wave " + wave.toString()) {
            @Override
            public void runInto() throws JRebirthThreadException {
                StageTest.globalFacade.getNotifier().sendWave(wave);
            }
        });
View Full Code Here

     *
     * @return the right JRebirth Runnable
     */
    private JRebirthRunnable buildWaveRunnable(final Wave wave, final Method customMethod, final RunnablePriority priority) {

        return new AbstractJrbRunnable(getWaveReady().getClass().getSimpleName() + " handle wave " + wave.toString(), priority) {

            /**
             * {@inheritDoc}
             */
            @Override
View Full Code Here

        // Initialize the default uncaught exception handler for all other threads
        Thread.setDefaultUncaughtExceptionHandler(getDefaultUncaughtExceptionHandler());

        // Initialize the uncaught exception handler for JavaFX Application Thread
        JRebirth.runIntoJAT(new AbstractJrbRunnable(ATTACH_JAT_UEH.getText()) {
            @Override
            public void runInto() throws JRebirthThreadException {
                Thread.currentThread().setUncaughtExceptionHandler(getJatUncaughtExceptionHandler());
            }
        });

        // Initialize the uncaught exception handler for JRebirth Internal Thread
        JRebirth.runIntoJIT(new AbstractJrbRunnable(ATTACH_JIT_UEH.getText()) {
            @Override
            public void runInto() throws JRebirthThreadException {
                Thread.currentThread().setUncaughtExceptionHandler(getJitUncaughtExceptionHandler());
            }
        });
View Full Code Here

        final WaveReady<?> waveReady = this;

        LOGGER.trace(LinkMessages.LISTEN_WAVE_TYPE, getWaveTypesString(waveTypes), waveReady.getClass().getSimpleName());

        // Use the JRebirth Thread to add new subscriptions for given Wave Type
        JRebirth.runIntoJIT(new AbstractJrbRunnable(LISTEN_WAVE_TYPE.getText(getWaveTypesString(waveTypes), waveReady.getClass().getSimpleName())) {
            @Override
            public void runInto() throws JRebirthThreadException {
                getNotifier().listen(waveReady, waveChecker, method, waveTypes);
            }
        });
View Full Code Here

        final WaveReady waveReady = this;

        LOGGER.trace(LinkMessages.UNLISTEN_WAVE_TYPE, getWaveTypesString(waveTypes), waveReady.getClass().getSimpleName());

        // Use the JRebirth Thread to manage Waves
        JRebirth.runIntoJIT(new AbstractJrbRunnable(UNLISTEN_WAVE_TYPE.getText(getWaveTypesString(waveTypes), waveReady.getClass().getSimpleName())) {

            @Override
            protected void runInto() throws JRebirthThreadException {
                getNotifier().unlisten(waveReady, waveTypes);
            }
View Full Code Here

        CheckerUtility.checkWave(wave);

        wave.setStatus(Status.Sent);

        // Use the JRebirth Thread to manage Waves
        JRebirth.runIntoJIT(new AbstractJrbRunnable(SEND_WAVE.getText(wave.toString())) {
            @Override
            public void runInto() throws JRebirthThreadException {
                getNotifier().sendWave(wave);
            }
        });
View Full Code Here

     * @param progressBar graphical progress bar
     */
    private void bindProgressBar(final ServiceTask<?> task, final ProgressBar progressBar) {

        // Perform this binding into the JAT to respect widget and task API
        JRebirth.runIntoJAT(new AbstractJrbRunnable("Bind ProgressBar to " + task.getServiceHandlerName()) {

            /**
             * {@inheritDoc}
             */
            @Override
View Full Code Here

     * @param titleProperty the title presenter
     */
    private void bindTitle(final ServiceTask<?> task, final StringProperty titleProperty) {

        // Perform this binding into the JAT to respect widget and task API
        JRebirth.runIntoJAT(new AbstractJrbRunnable("Bind Title for " + task.getServiceHandlerName()) {

            /**
             * {@inheritDoc}
             */
            @Override
View Full Code Here

TOP

Related Classes of org.jrebirth.af.core.concurrent.AbstractJrbRunnable

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.