Package eu.mosaic_cloud.tools.transcript.core

Examples of eu.mosaic_cloud.tools.transcript.core.Transcript


  public ExtendedTestLoggingHandler(String testName, T expectedValue) {
    super(testName);
    this.testName = testName;
    this.expectedValue = expectedValue;
    final Transcript transcript = Transcript.create (this, true);
    logger = transcript.adaptAs(Logger.class);
  }
View Full Code Here


  }
  
    @Before
    public void setUp() throws IOException {
     
        final Transcript transcript = Transcript.create(this);
        final QueueingExceptionTracer exceptionsQueue = QueueingExceptionTracer
                .create(NullExceptionTracer.defaultInstance);
        final TranscriptExceptionTracer exceptions = TranscriptExceptionTracer.create(transcript,
                exceptionsQueue);
        BasicThreadingSecurityManager.initialize();
View Full Code Here

{
  @Test
  public final void test ()
      throws Exception
  {
    final Transcript transcript = Transcript.create (this);
    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);
View Full Code Here

{
  @Test
  public final void test ()
      throws Exception
  {
    final Transcript transcript = Transcript.create (this);
    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);
View Full Code Here

public final class KvTest
{
  @Test
  public final void test ()
  {
    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));
View Full Code Here

 
  public static final void main (final String[] argumentsList)
      throws Throwable
  {
    Preconditions.checkNotNull (argumentsList);
    final Transcript transcript = Transcript.create (BasicComponentHarnessMain.class);
    final BaseExceptionTracer exceptions = TranscriptExceptionTracer.create (transcript, AbortingExceptionTracer.defaultInstance);
    final ArgumentsProvider arguments = BasicComponentHarnessMain.parseArguments (argumentsList, transcript, exceptions);
    BasicComponentHarnessMain.main (arguments, null, null, transcript, exceptions);
  }
View Full Code Here

 
  private static final Environment prepareEnvironment (final ArgumentsProvider arguments, final ClassLoader classLoader_, final ThreadingContext threading_, final Transcript transcript_, final ExceptionTracer exceptions_)
      throws Throwable
  {
    BasicThreadingSecurityManager.initialize ();
    final Transcript transcript;
    if (transcript_ == null)
      transcript = Transcript.create (BasicComponentHarnessMain.class);
    else
      transcript = transcript_;
    final ExceptionTracer exceptions;
    if (exceptions_ == null)
      exceptions = TranscriptExceptionTracer.create (transcript, AbortingExceptionTracer.defaultInstance);
    else
      exceptions = exceptions_;
    final ComponentIdentifier identifier;
    {
      final String identifierData = arguments.getIdentifier ();
      if (identifierData != null) {
        transcript.traceDebugging ("parsing identifier `%s`...", identifierData);
        identifier = ComponentIdentifier.resolve (identifierData);
      } else {
        transcript.traceWarning ("running a standalone component.");
        identifier = ComponentIdentifier.standalone;
      }
    }
    final Map<String, Object> options = new HashMap<String, Object> ();
    {
      final List<String> optionsDatas = arguments.getCallbacksOptions ();
      if (optionsDatas != null) {
        for (final String optionsData : optionsDatas) {
          transcript.traceDebugging ("parsing configuration `%s`...", optionsData);
          final Object optionsObject = DefaultJsonCoder.defaultInstance.decodeFromString (optionsData);
          if (optionsObject != null) {
            Preconditions.checkArgument (optionsObject instanceof Map, "invalid configuration `%s` (not a JSON map)", optionsObject);
            for (final Map.Entry<String, Object> option : ((Map<String, Object>) optionsObject).entrySet ()) {
              transcript.traceDebugging ("defining configuration `%s` = `%s`...", option.getKey (), option.getValue ());
              options.put (option.getKey (), option.getValue ());
            }
          }
        }
      }
    }
    final ClassLoader classLoader;
    if (classLoader_ == null)
      classLoader = BasicComponentHarnessMain.prepareClassLoader (arguments, transcript, exceptions);
    else
      classLoader = classLoader_;
    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;
    {
      transcript.traceDebugging ("creating callbacks reactor...");
      reactor = BasicCallbackReactor.create (threading, exceptions);
      transcript.traceDebugging ("initializing callbacks reactor....");
      reactor.initialize ();
    }
    final Environment environment = new Environment (identifier, classLoader, reactor, threading, transcript, exceptions, options);
    return (environment);
  }
View Full Code Here

{
  @Test
  public final void test ()
      throws Throwable
  {
    final Transcript transcript = Transcript.create (this);
    BasicThreadingSecurityManager.initialize ();
    final Pipe pipe1 = Pipe.open ();
    final Pipe pipe2 = Pipe.open ();
    final QueueingExceptionTracer exceptionsQueue = QueueingExceptionTracer.create (NullExceptionTracer.defaultInstance);
    final TranscriptExceptionTracer exceptions = TranscriptExceptionTracer.create (transcript, exceptionsQueue);
View Full Code Here

    extends Object
{
  BasicComponent (final CallbackReactor callbackReactor, final ExceptionTracer exceptions)
  {
    super ();
    final Transcript transcript = Transcript.create (this, true);
    this.backend = new Backend (this, callbackReactor, transcript, exceptions);
  }
View Full Code Here

public abstract class RiakDriverTest
{
  public RiakDriverTest (final String portDefault)
  {
    final Transcript transcript = Transcript.create (this);
    final QueueingExceptionTracer exceptionsQueue = QueueingExceptionTracer.create (NullExceptionTracer.defaultInstance);
    final TranscriptExceptionTracer exceptions = TranscriptExceptionTracer.create (transcript, exceptionsQueue);
    this.exceptions = exceptions;
    BasicThreadingSecurityManager.initialize ();
    this.threadingContext = BasicThreadingContext.create (this, exceptions, exceptions.catcher);
View Full Code Here

TOP

Related Classes of eu.mosaic_cloud.tools.transcript.core.Transcript

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.