Package eu.mosaic_cloud.tools.threading.implementations.basic

Examples of eu.mosaic_cloud.tools.threading.implementations.basic.BasicThreadingContext.initialize()


    BasicThreadingSecurityManager.initialize ();
    final Pipe pipe = Pipe.open ();
    final QueueingExceptionTracer exceptionsQueue = QueueingExceptionTracer.create (NullExceptionTracer.defaultInstance);
    final TranscriptExceptionTracer exceptions = TranscriptExceptionTracer.create (transcript, exceptionsQueue);
    final BasicThreadingContext threading = BasicThreadingContext.create (this, exceptions, exceptions.catcher);
    Assert.assertTrue (threading.initialize (BasicChannelTest.defaultPollTimeout));
    final BasicCallbackReactor reactor = BasicCallbackReactor.create (threading, exceptions);
    Assert.assertTrue (reactor.initialize (BasicChannelTest.defaultPollTimeout));
    final DefaultChannelMessageCoder coder = DefaultChannelMessageCoder.defaultInstance;
    final BasicChannel channel = BasicChannel.create (pipe.source (), pipe.sink (), coder, reactor, threading, exceptions);
    Assert.assertTrue (channel.initialize (BasicChannelTest.defaultPollTimeout));
View Full Code Here


    BasicThreadingSecurityManager.initialize ();
    final Pipe pipe = Pipe.open ();
    final QueueingExceptionTracer exceptionsQueue = QueueingExceptionTracer.create (NullExceptionTracer.defaultInstance);
    final TranscriptExceptionTracer exceptions = TranscriptExceptionTracer.create (transcript, exceptionsQueue);
    final BasicThreadingContext threading = BasicThreadingContext.create (this, exceptions, exceptions.catcher);
    Assert.assertTrue (threading.initialize (BasicComponentTest.defaultPollTimeout));
    final BasicCallbackReactor reactor = BasicCallbackReactor.create (threading, exceptions);
    Assert.assertTrue (reactor.initialize (BasicComponentTest.defaultPollTimeout));
    final DefaultChannelMessageCoder coder = DefaultChannelMessageCoder.defaultInstance;
    final BasicChannel channel = BasicChannel.create (pipe.source (), pipe.sink (), coder, reactor, threading, exceptions);
    final BasicComponent component = BasicComponent.create (reactor, exceptions);
View Full Code Here

    final Transcript transcript = Transcript.create (this);
    BasicThreadingSecurityManager.initialize ();
    final QueueingExceptionTracer exceptionsQueue = QueueingExceptionTracer.create (NullExceptionTracer.defaultInstance);
    final TranscriptExceptionTracer exceptions = TranscriptExceptionTracer.create (transcript, exceptionsQueue);
    final BasicThreadingContext threading = BasicThreadingContext.create (this, exceptions, exceptions.catcher);
    Assert.assertTrue (threading.initialize (KvTest.defaultPollTimeout));
    final String serverIdentity = UUID.randomUUID ().toString ();
    final String clientIdentity = UUID.randomUUID ().toString ();
    final ZeroMqChannel serverChannel = ZeroMqChannel.create (serverIdentity, threading, exceptions);
    serverChannel.register (KvSession.Server);
    serverChannel.accept (KvTest.defaultServerEndpoint);
View Full Code Here

    final ThreadingContext threading;
    if (threading_ == null) {
      transcript.traceDebugging ("creating threading context...");
      final BasicThreadingContext threading1 = BasicThreadingContext.create (BasicComponentHarnessMain.class, exceptions, UncaughtExceptionHandler.create (exceptions), classLoader);
      transcript.traceDebugging ("initializing threading context...");
      threading1.initialize ();
      threading = threading1;
    } else
      threading = threading_;
    final BasicCallbackReactor reactor;
    {
View Full Code Here

    final Pipe pipe1 = Pipe.open ();
    final Pipe pipe2 = Pipe.open ();
    final QueueingExceptionTracer exceptionsQueue = QueueingExceptionTracer.create (NullExceptionTracer.defaultInstance);
    final TranscriptExceptionTracer exceptions = TranscriptExceptionTracer.create (transcript, exceptionsQueue);
    final BasicThreadingContext threading = BasicThreadingContext.create (this, exceptions, exceptions.catcher);
    Assert.assertTrue (threading.initialize (AbacusTest.defaultPollTimeout));
    final BasicCallbackReactor reactor = BasicCallbackReactor.create (threading, exceptions);
    Assert.assertTrue (reactor.initialize (AbacusTest.defaultPollTimeout));
    final DefaultChannelMessageCoder coder = DefaultChannelMessageCoder.defaultInstance;
    final BasicChannel serverChannel = BasicChannel.create (pipe1.source (), pipe2.sink (), coder, reactor, threading, exceptions);
    final BasicChannel clientChannel = BasicChannel.create (pipe2.source (), pipe1.sink (), coder, reactor, threading, exceptions);
View Full Code Here

    Preconditions.checkNotNull (componentConfiguration);
    BasicThreadingSecurityManager.initialize ();
    final BaseExceptionTracer exceptions = AbortingExceptionTracer.defaultInstance;
    final ClassLoader classLoader = ClassLoader.getSystemClassLoader ();
    final BasicThreadingContext threading = BasicThreadingContext.create (BasicComponentHarnessMain.class, exceptions, exceptions.catcher, classLoader);
    threading.initialize ();
    BasicComponentLocalLauncher.launch (controllerBaseUrl, channelAddress, componentCallbacks, componentConfiguration, classLoader, threading, exceptions);
    threading.destroy ();
  }
 
  public static final void launch (final URL controllerBaseUrl, final InetSocketAddress channelAddress, final String componentCallbacks, final List<String> componentConfiguration, final ClassLoader classLoader, final ThreadingContext threading, final ExceptionTracer exceptions)
View Full Code Here

    Preconditions.checkNotNull (arguments);
    BasicThreadingSecurityManager.initialize ();
    final BaseExceptionTracer exceptions = AbortingExceptionTracer.defaultInstance;
    final ClassLoader classLoader = ClassLoader.getSystemClassLoader ();
    final BasicThreadingContext threading = BasicThreadingContext.create (BasicComponentHarnessMain.class, exceptions, exceptions.catcher, classLoader);
    threading.initialize ();
    BasicComponentLauncherMain.main (arguments, classLoader, threading, exceptions);
    threading.destroy ();
  }
 
  public static final void main (final String[] arguments, final ClassLoader classLoader, final ThreadingContext threading, final ExceptionTracer exceptions)
View Full Code Here

    final Transcript transcript = Transcript.create (this);
    BasicThreadingSecurityManager.initialize ();
    final QueueingExceptionTracer exceptionsQueue = QueueingExceptionTracer.create (NullExceptionTracer.defaultInstance);
    final TranscriptExceptionTracer exceptions = TranscriptExceptionTracer.create (transcript, exceptionsQueue);
    final BasicThreadingContext threading = BasicThreadingContext.create (this, exceptions, exceptions.catcher);
    Assert.assertTrue (threading.initialize (ZeroMqChannelTest.defaultPollTimeout));
    final String serverIdentifier = UUID.randomUUID ().toString ();
    final String clientIdentifier = UUID.randomUUID ().toString ();
    final ZeroMqChannelSocket server = ZeroMqChannelSocket.create (serverIdentifier, null, threading, exceptions);
    final ZeroMqChannelSocket client = ZeroMqChannelSocket.create (clientIdentifier, null, threading, exceptions);
    server.accept (ZeroMqChannelTest.defaultServerEndpoint);
View Full Code Here

    final Transcript transcript = Transcript.create (this);
    BasicThreadingSecurityManager.initialize ();
    final QueueingExceptionTracer exceptionsQueue = QueueingExceptionTracer.create (NullExceptionTracer.defaultInstance);
    final TranscriptExceptionTracer exceptions = TranscriptExceptionTracer.create (transcript, exceptionsQueue);
    final BasicThreadingContext threading = BasicThreadingContext.create (this, exceptions, exceptions.catcher);
    Assert.assertTrue (threading.initialize (BasicCallbackReactorTest.defaultPollTimeout));
    final BasicCallbackReactor reactor = BasicCallbackReactor.create (threading, exceptions);
    Assert.assertTrue (reactor.initialize (BasicCallbackReactorTest.defaultPollTimeout));
    final CallbackIsolate isolate = reactor.createIsolate ();
    Assert.assertNotNull (isolate);
    final LinkedList<QueueCallbacks<Integer>> triggers = new LinkedList<QueueCallbacks<Integer>> ();
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.