Examples of Bindings


Examples of org.erlide.util.erlang.Bindings

        Assert.assertNotNull(r);
    }

    @Test
    public void testMatch_ellipsis_2() throws Exception {
        final Bindings r = OtpErlang.match("[X | T]", "[x,y,z]");
        Assert.assertNotNull(r);
        Assert.assertEquals(new OtpErlangAtom("x"), r.get("X"));
        Assert.assertEquals(termParser.parse("[y,z]"), r.get("T"));
    }
View Full Code Here

Examples of org.erlide.util.erlang.Bindings

        Assert.assertEquals(termParser.parse("[y,z]"), r.get("T"));
    }

    @Test()
    public void testMatch_ellipsis_4() throws Exception {
        final Bindings r = OtpErlang.match("[X | y]", "[x,y,z]");
        Assert.assertNull(r);
    }
View Full Code Here

Examples of org.erlide.util.erlang.Bindings

        OtpErlang.match("[X | Y, Z]", "[x,y,z]");
    }

    @Test
    public void testMatch_t() throws Exception {
        final Bindings r = OtpErlang.match("[W:a, V:i]", "[a, 1]");
        Assert.assertEquals(r.getAs("W", String.class), "a");
        Assert.assertEquals(r.getAs("V", Integer.class), Integer.valueOf(1));
    }
View Full Code Here

Examples of org.hornetq.core.postoffice.Bindings

      if (address.equals(managementAddress))
      {
         return new BindingQueryResult(true, names);
      }

      Bindings bindings = postOffice.getMatchingBindings(address);

      for (Binding binding : bindings.getBindings())
      {
         if (binding.getType() == BindingType.LOCAL_QUEUE || binding.getType() == BindingType.REMOTE_QUEUE)
         {
            names.add(binding.getUniqueName());
         }
View Full Code Here

Examples of org.hornetq.core.postoffice.Bindings

   {
      SimpleString expiryAddress = addressSettingsRepository.getMatch(address.toString()).getExpiryAddress();

      if (expiryAddress != null)
      {
         Bindings bindingList = postOffice.getBindingsForAddress(expiryAddress);

         if (bindingList.getBindings().isEmpty())
         {
            QueueImpl.log.warn("Message has expired. No bindings for Expiry Address " + expiryAddress +
                               " so dropping it");
         }
         else
View Full Code Here

Examples of org.hornetq.core.postoffice.Bindings

   {
      SimpleString deadLetterAddress = addressSettingsRepository.getMatch(address.toString()).getDeadLetterAddress();

      if (deadLetterAddress != null)
      {
         Bindings bindingList = postOffice.getBindingsForAddress(deadLetterAddress);

         if (bindingList.getBindings().isEmpty())
         {
            QueueImpl.log.warn("Message has exceeded max delivery attempts. No bindings for Dead Letter Address " + deadLetterAddress +
                               " so dropping it");
         }
         else
View Full Code Here

Examples of org.hornetq.core.postoffice.Bindings

   public Bindings getMatchingBindings(final SimpleString address) throws Exception
   {
      Address add = new AddressImpl(address);

      Bindings bindings = bindingsFactory.createBindings(address);

      for (Binding binding : nameMap.values())
      {
         Address addCheck = new AddressImpl(binding.getAddress());

         if (addCheck.matches(add))
         {
            bindings.addBinding(binding);
         }
      }

      return bindings;
   }
View Full Code Here

Examples of org.hornetq.core.postoffice.Bindings

      mappings.clear();
   }

   protected void removeBindingInternal(final SimpleString address, final SimpleString bindableName)
   {
      Bindings bindings = mappings.get(address);

      if (bindings != null)
      {
         removeMapping(bindableName, bindings);

         if (bindings.getBindings().isEmpty())
         {
            mappings.remove(address);
         }
      }
   }
View Full Code Here

Examples of org.hornetq.core.postoffice.Bindings

      return theBinding;
   }

   protected boolean addMappingInternal(final SimpleString address, final Binding binding) throws Exception
   {
      Bindings bindings = mappings.get(address);

      Bindings prevBindings = null;

      if (bindings == null)
      {
         bindings = bindingsFactory.createBindings(address);
View Full Code Here

Examples of org.hornetq.core.postoffice.Bindings

      return binding;
   }

   public Bindings getBindingsForAddress(final SimpleString address) throws Exception
   {
      Bindings bindings = addressManager.getBindingsForRoutingAddress(address);

      if (bindings == null)
      {
         bindings = createBindings(address);
      }
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.