Package fi.jumi.actors.eventizers.dynamic

Examples of fi.jumi.actors.eventizers.dynamic.DynamicEventizerProvider


    public void setup() throws IOException {
        daemonDir = new DaemonDir(tempDir.getRoot().toPath());
        commandDir = daemonDir.createCommandDir();
        Actors actors = new MultiThreadedActors(
                executor,
                new DynamicEventizerProvider(),
                new CrashEarlyFailureHandler(),
                new NullMessageListener()
        );
        actorThread = actors.startActorThread();
    }
View Full Code Here


        // listen for commands through IPC files
        DaemonDir daemonDir = new DaemonDir(config.getDaemonDir());
        Executor executor = Executors.newCachedThreadPool(new PrefixedThreadFactory("jumi-ipc-"));
        MultiThreadedActors actors = new MultiThreadedActors(
                executor,
                new DynamicEventizerProvider(), // TODO: use ComposedEventizerProvider
                new PrintStreamFailureLogger(logOutput),
                actorMessageLogger
        );
        executor.execute(new CommandsDirectoryObserver(daemonDir, executor, actors.startActorThread(), new MyCommandListener(suiteFactory)));
View Full Code Here

        NetworkServer networkServer = createNetworkServer();
        OutputStream daemonOutputListener = createDaemonOutputListener();

        Actors actors = new MultiThreadedActors(
                actorsThreadPool,
                new DynamicEventizerProvider(),
                new PrintStreamFailureLogger(System.out),
                new NullMessageListener()
        );
        ActorThread actorThread = startActorThread(actors);
View Full Code Here

        return results;
    }

    public void run(SuiteListener suiteListener, Class<?>... testClasses) {
        SingleThreadedActors actors = new SingleThreadedActors(
                new DynamicEventizerProvider(),
                actorsFailureHandler,
                actorsMessageListener
        );
        ActorThread actorThread = actors.startActorThread();
        Executor testExecutor = actors.getExecutor();
View Full Code Here

    }

    @Test
    public void provides_an_asynchronous_executor() {
        final StringBuilder spy = new StringBuilder();
        SingleThreadedActors actors = new SingleThreadedActors(new DynamicEventizerProvider(), defaultFailureHandler, defaultMessageListener);

        Executor executor = actors.getExecutor();
        executor.execute(new Runnable() {
            @Override
            public void run() {
View Full Code Here

    @Override
    protected void setUp() throws Exception {
        MultiThreadedActors actors = new MultiThreadedActors(
                executor,
                new DynamicEventizerProvider(),
                new CrashEarlyFailureHandler(),
                new NullMessageListener()
        );
        ActorThread actorThread = actors.startActorThread();
View Full Code Here

                this.result = result;
            }
        }
        SpyListener spy = new SpyListener();
        SingleThreadedActors actors = new SingleThreadedActors(
                new DynamicEventizerProvider(),
                // Will rethrow any exceptions to this test thread
                new CrashEarlyFailureHandler(),
                new NullMessageListener()
        );
        Executor workersThreadPool = actors.getExecutor(); // Also single-threaded, runs in this same test thread
View Full Code Here

    public void timeMultiThreadedActors(int reps) throws Exception {
        for (int i = 0; i < reps; i++) {
            MultiThreadedActors actors = new MultiThreadedActors(
                    executor,
                    new DynamicEventizerProvider(),
                    new CrashEarlyFailureHandler(),
                    new NullMessageListener()
            );
            ActorThread actorThread = actors.startActorThread();
View Full Code Here

    }

    public void timeSingleThreadedActors(int reps) {
        for (int i = 0; i < reps; i++) {
            SingleThreadedActors actors = new SingleThreadedActors(
                    new DynamicEventizerProvider(),
                    new CrashEarlyFailureHandler(),
                    new NullMessageListener()
            );
            ActorThread actorThread = actors.startActorThread();
View Full Code Here

        // On failure, log the error and keep on processing more messages
        FailureHandler failureHandler = new PrintStreamFailureLogger(System.out);

        // Supports all actor interfaces using reflection
        EventizerProvider eventizerProvider = new DynamicEventizerProvider();

        // Multi-threaded actors implementation for production use
        MultiThreadedActors actors = new MultiThreadedActors(actorsThreadPool, eventizerProvider, failureHandler, messageListener);

View Full Code Here

TOP

Related Classes of fi.jumi.actors.eventizers.dynamic.DynamicEventizerProvider

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.