Esempio n. 1
0
  /**
   * @see org.openmaji.meem.filter.FilterChecker#invokeMethodCheck(org.openmaji.meem.filter.Filter,
   *     java.lang.String, java.lang.Object[])
   */
  public boolean invokeMethodCheck(Filter filter, String methodName, Object[] args)
      throws IllegalFilterException {
    if (!(filter instanceof ExactMatchFilter)) {
      throw new IllegalFilterException("Can't check filter: " + filter);
    }

    if (methodName.equals("meemDefinitionChanged")
        || methodName.equals("meemContentChanged")
        || methodName.equals("meemDestroyed")) {

      MeemPath meemPath = (MeemPath) args[0];
      if (meemPath != null) {
        ExactMatchFilter exactMatchFilter = (ExactMatchFilter) filter;
        return meemPath.equals(exactMatchFilter.getTemplate());
      }
    }

    return false;
  }
Esempio n. 2
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);
    }
Esempio n. 3
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);
    }