Package eu.mosaic_cloud.components.core

Examples of eu.mosaic_cloud.components.core.ComponentIdentifier


    final ComponentCallbacks componentCallbacksProxy = reactor.createProxy (ComponentCallbacks.class);
    Assert.assertTrue (componentController.bind (componentCallbacksProxy, channel.getController ()).await (BasicComponentTest.defaultPollTimeout));
    final QueueingComponentCallbacks componentCallbacks = QueueingComponentCallbacks.create (componentController, exceptions);
    final CallbackIsolate componentCallbacksIsolate = reactor.createIsolate ();
    Assert.assertTrue (reactor.assignHandler (componentCallbacksProxy, componentCallbacks, componentCallbacksIsolate).await (BasicComponentTest.defaultPollTimeout));
    final ComponentIdentifier peer = ComponentIdentifier.resolve (Strings.repeat ("00", 20));
    for (int index = 0; index < BasicComponentTest.defaultTries; index++) {
      final ComponentCallRequest outboundRequest = RandomMessageGenerator.defaultInstance.generateComponentCallRequest ();
      Assert.assertTrue (componentController.call (peer, outboundRequest).await (BasicComponentTest.defaultPollTimeout));
      final ComponentCallRequest inboundRequest = (ComponentCallRequest) componentCallbacks.queue.poll (BasicComponentTest.defaultPollTimeout, TimeUnit.MILLISECONDS);
      Assert.assertNotNull (inboundRequest);
View Full Code Here


    this.cast (ComponentIdentifier.resolve (component), ComponentCastRequest.create (operation, inputs));
  }
 
  public final ComponentIdentifier getGroup ()
  {
    final ComponentIdentifier group = JettyComponentContext.selfGroup;
    Preconditions.checkState (group != null);
    return (group);
  }
View Full Code Here

    return (group);
  }
 
  public final ComponentIdentifier getIdentifier ()
  {
    final ComponentIdentifier identifier = JettyComponentContext.selfIdentifier;
    Preconditions.checkState (identifier != null);
    return (identifier);
  }
View Full Code Here

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

    final QueueingComponentCallbacks clientComponentCallbacks = QueueingComponentCallbacks.create (clientComponentController, exceptions);
    final CallbackIsolate serverComponentCallbacksIsolate = reactor.createIsolate ();
    final CallbackIsolate clientComponentCallbacksIsolate = reactor.createIsolate ();
    Assert.assertTrue (reactor.assignHandler (serverComponentCallbacksProxy, serverComponentCallbacks, serverComponentCallbacksIsolate).await (AbacusTest.defaultPollTimeout));
    Assert.assertTrue (reactor.assignHandler (clientComponentCallbacksProxy, clientComponentCallbacks, clientComponentCallbacksIsolate).await (AbacusTest.defaultPollTimeout));
    final ComponentIdentifier peer = ComponentIdentifier.resolve (Strings.repeat ("00", 20));
    for (int index = 0; index < AbacusTest.defaultTries; index++) {
      final double operandA = (int) (Math.random () * 10);
      final double operandB = (int) (Math.random () * 10);
      final ComponentCallRequest request = ComponentCallRequest.create ("+", Arrays.asList (Double.valueOf (operandA), Double.valueOf (operandB)), ByteBuffer.allocate (0), ComponentCallReference.create ());
      Assert.assertTrue (clientComponentController.call (peer, request).await (AbacusTest.defaultPollTimeout));
View Full Code Here

  private final ComponentIdentifier resolveSelfGroup ()
  {
    this.transcript.traceDebugging ("resolving the cloudlet component self-group...");
    final String groupName = ConfigUtils.resolveParameter (this.configuration, ConfigProperties.getString ("CloudletComponent.3"), String.class, ConfigProperties.getString ("CloudletComponent.14")); // $NON-NLS-1$
    Preconditions.checkNotNull (groupName, "unknown cloudlet component self group");
    final ComponentIdentifier group = ComponentIdentifier.resolve (groupName);
    return (group);
  }
View Full Code Here

      Preconditions.checkNotNull (target);
      Preconditions.checkNotNull (callbacks);
      CloudletComponent.this.transcript.traceDebugging ("resolving the interoperability channel endpoint for target `%s`...", target);
      // FIXME: This should be done in `Active` state
      // FIXME: This should be done in an `FsmAccess`
      final ComponentIdentifier identifier = ComponentIdentifier.resolve (target);
      final String operation = ConfigProperties.getString ("CloudletComponent.7");
      final ComponentCallReference reference = ComponentCallReference.create ();
      final ComponentCallRequest request = ComponentCallRequest.create (operation, null, reference);
      final DeferredFuture<ComponentCallReply> future = DeferredFuture.create (ComponentCallReply.class);
      CloudletComponent.this.componentPendingOutboundCalls.put (reference, future.trigger);
View Full Code Here

TOP

Related Classes of eu.mosaic_cloud.components.core.ComponentIdentifier

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.