Examples of Created


Examples of com.sun.jini.start.NonActivatableServiceDescriptor.Created

      if (transformer != null) {
    desc = (NonActivatableServiceDescriptor)
           transformer.transform(desc);
      }
      try {
    Created created = (Created) desc.create(starterConfig);
    serviceList.add(created);
    return created.proxy;
      } catch (Exception e) {
    throw new RemoteException("Create failed", e);
      }
View Full Code Here

Examples of com.sun.jini.start.SharedActivatableServiceDescriptor.Created

    private static void destroy(ServiceDescriptor[] srvArray,
        Configuration config) throws Exception
    {
        logger.entering(DestroySharedGroup.class.getName(), "destroy",
      new Object[] {Arrays.asList(srvArray), config} );
  Created created = null;
        SharedActivatableServiceDescriptor desc = null;
  ActivationSystem activationSystem = null;
     
        for (int i=0; i < srvArray.length; i++) {
      if (srvArray[i] instanceof SharedActivatableServiceDescriptor) {
View Full Code Here

Examples of com.sun.jini.start.SharedActivatableServiceDescriptor.Created

                impl,
                sga.getSharedGroupLog().toString(),
                new String[] { config },
    true);
        try {
            Created created =
                (Created)badCodebase.create(EmptyConfiguration.INSTANCE);
      throw new TestException(
          "Created proxy: " + created.proxy
    + " with a badcodebase descriptor: " + badCodebase);
        } catch (UnmarshalException e) {
      logger.log(Level.INFO, "Expected Failure -- with a badcodebase descriptor: "
          + badCodebase);
            e.printStackTrace();
        }

  SharedActivatableServiceDescriptor badPolicy =
            new SharedActivatableServiceDescriptor(
                codebase,
                policy.replaceAll("policy", "policy_bogus"),
                classpath,
                impl,
                sga.getSharedGroupLog().toString(),
                new String[] { config },
    true);
        try {
            Created created =
                (Created)badPolicy.create(EmptyConfiguration.INSTANCE);
      throw new TestException(
          "Created proxy: " + created.proxy
    + " with a bad policy descriptor: " + badPolicy);
        } catch (ActivationException e) {
      logger.log(Level.INFO, "Expected Failure with a bad policy descriptor: "
          + badPolicy);
            e.printStackTrace();
        }

  SharedActivatableServiceDescriptor badClasspath =
            new SharedActivatableServiceDescriptor(
                codebase,
                policy,
                classpath.replaceAll("mercury", "mercury_bogus"),
                impl,
                sga.getSharedGroupLog().toString(),
                new String[] { config },
    true);
        try {
            Created created =
                (Created)badClasspath.create(EmptyConfiguration.INSTANCE);
      throw new TestException(
          "Created proxy: " + created.proxy
    + " with a bad classpath descriptor: " + badClasspath);
        } catch (ActivationException ae) {
      if (ae.getCause() instanceof ClassNotFoundException) {
          logger.log(Level.INFO,
        "Expected Failure with a bad classpath descriptor: "
              + badClasspath, ae);
      } else {
          logger.log(Level.INFO,
        "Unexpected Failure with a bad classpath descriptor: "
              + badClasspath);
          throw new TestException(
              "Unexpected exception"
        + " with a bad classpath descriptor: " + badClasspath, ae);
      }
        }

  SharedActivatableServiceDescriptor badImpl =
            new SharedActivatableServiceDescriptor(
                codebase,
                policy,
                classpath,
                impl.replaceAll("Impl", "Impl_bogus"),
                sga.getSharedGroupLog().toString(),
                new String[] { config },
    true);
        try {
            Created created =
                (Created)badImpl.create(EmptyConfiguration.INSTANCE);
      throw new TestException(
          "Created proxy: " + created.proxy
    + " with a bad impl descriptor: " + badImpl);
        } catch (ActivationException ae) {
      if (ae.getCause() instanceof ClassNotFoundException) {
          logger.log(Level.INFO,
        "Expected Failure with a bad impl descriptor: "
              + badImpl, ae);

      } else {
          logger.log(Level.INFO,
        "Unexpected Failure with a bad impl descriptor: "
              + badImpl);
          throw new TestException(
              "Unexpected exception"
        + " with a bad impl descriptor: " + badImpl, ae);
      }
        }

  SharedActivatableServiceDescriptor badLog =
            new SharedActivatableServiceDescriptor(
                codebase,
                policy,
                classpath,
                impl,
                sga.getSharedGroupLog().toString() + "bogus",
                new String[] { config },
    true);
        try {
            Created created =
                (Created)badLog.create(EmptyConfiguration.INSTANCE);
      throw new TestException(
          "Created proxy: " + created.proxy
    + " with a bad log descriptor: " + badLog);
        } catch (IOException e) {
      logger.log(Level.INFO, "Expected Failure with a bad log descriptor: "
          + badLog, e);
        }

  SharedActivatableServiceDescriptor badConfig =
            new SharedActivatableServiceDescriptor(
                codebase,
                policy,
                classpath,
                impl,
                sga.getSharedGroupLog().toString(),
                new String[] { sga.getSharedGroupLog().toString() },
    true);
        try {
            Created created =
                (Created)badConfig.create(EmptyConfiguration.INSTANCE);
      throw new TestException(
          "Created proxy: " + created.proxy
    + " with a bad config descriptor: " + badConfig);
        } catch (ActivationException e) {
View Full Code Here

Examples of com.sun.jini.start.SharedActivatableServiceDescriptor.Created

                                                       noopServiceClasspath,
                                                       noopServiceImplName,
                                                       sharedVMDir,
                                                       noopServiceArgsArray,
                                                       false);
            Created createdObj = (Created)destroyVMServiceDescriptor.create
                                                              (starterConfig);
            vmProxy[v] = (SharedGroup)createdObj.proxy;//to destroy service VM
            /* start TestService-v in same shared VM as no-op service */
            SharedActivatableServiceDescriptor serviceDescriptor =
                new SharedActivatableServiceDescriptor(serviceCodebase,
View Full Code Here

Examples of com.sun.jini.start.SharedActivatableServiceDescriptor.Created

    private static void destroy(ServiceDescriptor[] srvArray,
        Configuration config) throws Exception
    {
        logger.entering(DestroySharedGroup.class.getName(), "destroy",
      new Object[] {Arrays.asList(srvArray), config} );
  Created created = null;
        SharedActivatableServiceDescriptor desc = null;
  ActivationSystem activationSystem = null;
     
        for (int i=0; i < srvArray.length; i++) {
      if (srvArray[i] instanceof SharedActivatableServiceDescriptor) {
View Full Code Here

Examples of com.tinkerpop.frames.domain.incidences.Created

        CreatedBy createdBy = lop.getCreatedBy().iterator().next();
        assertEquals(lop, createdBy.getDomain());
        assertTrue(createdBy.getRange().equals(marko) || createdBy.getRange().equals(peter) || createdBy.getRange().equals(josh));
       
        Created created = marko.getCreated().iterator().next();
        //Please note: the below results are actually incorrect: the domain and range are incorrectly tagged
        // in Created for usage with @Incidence. I'm not going to fix that in the test-cases as Domain and
        // Range are deprecated now. The incorrect annotations probable show better than anything that
        // the now deprecated annotations are quite confusing:
        assertEquals(lop, created.getRange()); //range actually returns a Person, not a Project...
        assertEquals(marko, created.getDomain()); //domain actually returns a Project, not a Person...
       



    }
View Full Code Here

Examples of com.tinkerpop.frames.domain.incidences.Created

    @Test
    public void testEquality() {

        //Deprecated Domain/Range:
        Created created = marko.getCreated().iterator().next();
        WeightedEdge weightedEdge = framedGraph.frame(created.asEdge(), Direction.OUT, WeightedEdge.class);
        assertEquals(created, weightedEdge);
       
        //Initial/Terminal:
        CreatedInfo createdInfo = marko.getCreatedInfo().iterator().next();
        assertEquals(createdInfo, weightedEdge);
View Full Code Here

Examples of com.tinkerpop.frames.domain.incidences.Created

    /**
     * Uses deprecated Domain/Range annotations
     */
    @Test
    public void testAddingIncidencesDeprecated() {
        Created markoCreatedRipple = marko.addCreated(ripple);
        assertEquals(newHashSet(markoCreatedRipple, markoCreatedLop),
                     newHashSet(marko.getCreated()));
        assertNull(markoCreatedRipple.getWeight());
        markoCreatedRipple.setWeight(0.0f);
        assertEquals(0.0f, markoCreatedRipple.getWeight(), 0.01f);
    }
View Full Code Here

Examples of com.tinkerpop.frames.domain.incidences.Created

        assertEquals(lop.getLanguage(), "java");

        CreatedInfo markoCreatedLopInfo = framedGraph.getEdge(9, CreatedInfo.class);
        assertEquals(markoCreatedLopInfo.getWeight(), 0.4f, 0.1f);
        //Same with using deprecated Domain/Range annotations:
        Created markoCreatedLop = framedGraph.getEdge(9, Direction.OUT, Created.class);
        assertEquals(markoCreatedLop.getWeight(), 0.4f, 0.1f);
        CreatedBy lopCreatedByMarko = framedGraph.getEdge(9, Direction.IN, CreatedBy.class);
        assertEquals(lopCreatedByMarko.getWeight(), 0.4f, 0.1f);

        Person temp = framedGraph.frame(graph.addVertex(null), Person.class);
        assertNull(temp.getName());
View Full Code Here

Examples of com.tinkerpop.frames.domain.incidences.Created

        markoCreatedLopInfo.setWeight(99.0f);
        assertEquals(markoCreatedLopInfo.getWeight(), 99.0f, 0.1f);
        markoCreatedLopInfo.setWeight(0.4f);
       
        //Same with deprecated Domain/Range annotations:
        Created markoCreatedLop = framedGraph.getEdge(9, Direction.OUT, Created.class);
        assertEquals(markoCreatedLop.getWeight(), 0.4f, 0.1f);
        markoCreatedLop.setWeight(99.0f);
        assertEquals(markoCreatedLop.getWeight(), 99.0f, 0.1f);
    }
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.