Package eu.mosaic_cloud.tools.exceptions.core

Examples of eu.mosaic_cloud.tools.exceptions.core.ExceptionTracer


    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;
View Full Code Here


    final Class<?> cloudletCallbacksClass = this.resolveCloudletCallbacksClass ();
    final Class<?> cloudletContextClass = this.resolveCloudletStateClass ();
    final IConfiguration cloudletConfiguration = this.resolveCloudletConfiguration ();
    // FIXME: Currently exceptions from cloudlets are not deferred anywhere.
    //-- Thus any deferred exception should be treated as an ignored one.
    final ExceptionTracer exceptions = new CloudletExceptionTracer ();
    final ConnectorEnvironment connectorEnvironment = ConnectorEnvironment.create (this.reactor, this.threading, exceptions, this.channelFactory, this.channelResolver);
    final IConnectorsFactory connectorFactory = DefaultConnectorsFactory.create (connectorEnvironment, null);
    final CloudletEnvironment environment = CloudletEnvironment.create (cloudletConfiguration, cloudletCallbacksClass, cloudletContextClass, this.classLoader, connectorFactory, connectorEnvironment, this.componentConnector, this.reactor, this.threading, exceptions);
    final Cloudlet<?> cloudlet = Cloudlet.create (environment);
    return (cloudlet);
View Full Code Here

      this.trace_ (resolution, exception);
    } catch (final Throwable exception1) {
      // NOTE: intentional
    }
    try {
      final ExceptionTracer delegate = this.getDelegateSafe ();
      if (delegate != null)
        delegate.trace (resolution, exception);
    } catch (final Throwable exception1) {
      // NOTE: intentional
    }
  }
View Full Code Here

      this.trace_ (resolution, exception, message);
    } catch (final Throwable exception1) {
      // NOTE: intentional
    }
    try {
      final ExceptionTracer delegate = this.getDelegateSafe ();
      if (delegate != null)
        delegate.trace (resolution, exception, message);
    } catch (final Throwable exception1) {
      // NOTE: intentional
    }
  }
View Full Code Here

      this.trace_ (resolution, exception, format, tokens);
    } catch (final Throwable exception1) {
      // NOTE: intentional
    }
    try {
      final ExceptionTracer delegate = this.getDelegateSafe ();
      if (delegate != null)
        delegate.trace (resolution, exception, format, tokens);
    } catch (final Throwable exception1) {
      // NOTE: intentional
    }
  }
View Full Code Here

 
  protected abstract ExceptionTracer getDelegate ();
 
  protected final ExceptionTracer getDelegateSafe ()
  {
    final ExceptionTracer directDelegate = this.getDelegate ();
    if (directDelegate == this)
      return (null);
    if (directDelegate == FallbackExceptionTracer.defaultInstance) {
      final ExceptionTracer fallbackDelegate = FallbackExceptionTracer.defaultInstance.resolveDelegate ();
      if (fallbackDelegate == this)
        return (null);
      if (fallbackDelegate == FallbackExceptionTracer.defaultInstance)
        return (null);
      return (fallbackDelegate);
View Full Code Here

 
  final ExceptionTracer resolveExceptions (final Thread thread)
  {
    Preconditions.checkNotNull (thread);
    Preconditions.checkArgument (this.isManaged (thread));
    final ExceptionTracer threadExceptions;
    {
      if (thread instanceof BasicThread)
        threadExceptions = ((BasicThread) thread).configuration.exceptions;
      else
        threadExceptions = null;
    }
    if (threadExceptions != null)
      return (threadExceptions);
    final ExceptionTracer groupExceptions;
    {
      for (ThreadGroup group = thread.getThreadGroup (); true; group = group.getParent ()) {
        if (group == null) {
          groupExceptions = null;
          break;
        }
        if (group instanceof BasicThreadGroup) {
          final ExceptionTracer groupExceptions2 = ((BasicThreadGroup) group).configuration.exceptions;
          if (groupExceptions2 != null) {
            groupExceptions = groupExceptions2;
            break;
          }
        }
View Full Code Here

    public final void run ()
    {
      Preconditions.checkState (this == Thread.currentThread ());
      Preconditions.checkState (this.running.compareAndSet (false, true));
      Preconditions.checkState (Threading.getCurrentContext () == BasicThreadingContext.this);
      final ExceptionTracer exceptions = BasicThreadingContext.this.resolveExceptions (this);
      if ((exceptions != null) && (exceptions != FallbackExceptionTracer.defaultInstance))
        FallbackExceptionTracer.defaultInstance.setThreadTracer (exceptions);
      super.run ();
    }
View Full Code Here

TOP

Related Classes of eu.mosaic_cloud.tools.exceptions.core.ExceptionTracer

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.