Exemplo n.º 1
0
    ResolverClient(Client parent, MeemPath meemPath) {
      this.parent = parent;

      Meem resolverMeem = EssentialMeemHelper.getEssentialMeem(MeemResolver.spi.getIdentifier());
      MeemResolverClient proxy = GatewayManagerWedge.getTargetFor(this, MeemResolverClient.class);
      Filter filter = ExactMatchFilter.create(meemPath);

      this.reference = Reference.spi.create("meemResolverClient", proxy, true, filter);

      resolverMeem.addOutboundReference(reference, false);
    }
Exemplo n.º 2
0
    RegistryClient(Client parent, MeemPath meemPath) {
      this.parent = parent;
      this.meemPath = meemPath;

      this.proxy = GatewayManagerWedge.getTargetFor(this, MeemRegistryClient.class);

      reference =
          Reference.spi.create(
              "meemRegistryClient", proxy, true, ExactMatchFilter.create(meemPath));

      Meem registryMeem =
          EssentialMeemHelper.getEssentialMeem(MeemRegistryGateway.spi.getIdentifier());

      registryMeem.addOutboundReference(reference, false);
    }
Exemplo n.º 3
0
  private void createMeems() {

    // get MeemStore

    Meem meemStoreMeem = EssentialMeemHelper.getEssentialMeem(MeemStore.spi.getIdentifier());
    MeemStore meemStore =
        (MeemStore) ReferenceHelper.getTarget(meemStoreMeem, "meemStore", MeemStore.class);

    for (Iterator i = exportData.meems.entrySet().iterator(); i.hasNext(); ) {

      Map.Entry entry = (Map.Entry) i.next();

      MeemPath meemPath = (MeemPath) entry.getKey();
      ExportData.ExportedMeem meem = (ExportData.ExportedMeem) entry.getValue();

      meemStore.storeMeemDefinition(meemPath, meem.definition);

      meemStore.storeMeemContent(meemPath, meem.content);
    }
  }