Package org.jboss.services.binding.impl

Examples of org.jboss.services.binding.impl.PojoServiceBindingStore.start()


   public void testGetServiceBinding() throws Exception
   {
      PojoServiceBindingStore store = new PojoServiceBindingStore();     
      store.setServiceBindingSets(bindingSets);
      store.setStandardBindings(bindings);
      store.start();
     
      assertEquals(getServiceBinding(AA, SET_A), store.getServiceBinding(A, A, A));     
      assertEquals(getServiceBinding(AA, SET_B), store.getServiceBinding(B, A, A));    
      assertEquals(getServiceBinding(AA, SET_C), store.getServiceBinding(C, A, A));
     
View Full Code Here


   public void testAddServiceBinding() throws Exception
   {
      PojoServiceBindingStore store = new PojoServiceBindingStore();     
      store.setServiceBindingSets(bindingSets);
      store.setStandardBindings(bindings);
      store.start();
     
      ServiceBindingMetadata new1 = new ServiceBindingMetadata(B, A, "localhost", 1, false, false);
      store.addServiceBinding(A, new1);
      store.addServiceBinding(B, new1);
      store.addServiceBinding(C, new1);
View Full Code Here

   public void testRemoveServiceBinding() throws Exception
   {
      PojoServiceBindingStore store = new PojoServiceBindingStore();     
      store.setServiceBindingSets(bindingSets);
      store.setStandardBindings(bindings);
      store.start();
     
      store.removeServiceBinding(A, AA);
     
      try
      {
View Full Code Here

      ServiceBindingSet newSetC = new ServiceBindingSet(C, "192.168.0.10", 30, set);
      ourSets.add(newSetC);
     
      PojoServiceBindingStore store = new PojoServiceBindingStore();
      store.setServiceBindingSets(ourSets);
      store.start();
     
      ServiceBindingMetadata new1 = new ServiceBindingMetadata(B, A, "192.168.0.22", 1, false, true);
      store.addServiceBinding(new1);
     
      InetAddress address = InetAddress.getByName("192.168.0.22");
View Full Code Here

   public void testRemoveServiceBindingFromAll() throws Exception
   {
      PojoServiceBindingStore store = new PojoServiceBindingStore();     
      store.setServiceBindingSets(bindingSets);
      store.setStandardBindings(bindings);
      store.start();
     
      store.removeServiceBinding(AA);
     
      try
      {
View Full Code Here

   public void testDefaultDefaults() throws Exception
   {
      PojoServiceBindingStore store = new PojoServiceBindingStore();     
      store.setServiceBindingSets(bindingSets);
      store.setStandardBindings(bindings);
      store.start();
     
      String[] names = {A, B, C};
     
      for (String name :names)
      {
View Full Code Here

      sbs.add(new ServiceBindingSet(B, "localhost", 20, set));     
      sbs.add(new ServiceBindingSet(C, "192.168.0.10", 30, set));
     
      PojoServiceBindingStore store = new PojoServiceBindingStore();
      store.setServiceBindingSets(sbs);
      store.start();
     
      assertNull(store.getDefaultHostName(A));
      assertEquals(10, store.getDefaultPortOffset(A));
     
      assertEquals("localhost", store.getDefaultHostName(B));
View Full Code Here

   public void testGetServiceBindings() throws Exception
   {
      PojoServiceBindingStore store = new PojoServiceBindingStore();     
      store.setServiceBindingSets(bindingSets);
      store.setStandardBindings(bindings);
      store.start();
     
      String[] servers = {A, B, C};
      for (String server : servers)
      {
         Set<ServiceBinding> set = store.getServiceBindings(server);
View Full Code Here

      sbs.add(setB);    
      ServiceBindingSet setC = new ServiceBindingSet(C, "192.168.0.10", 30);
      sbs.add(setC);
     
      PojoServiceBindingStore store = new PojoServiceBindingStore(sbs, set);
      store.start();
     
      Set<ServiceBindingMetadata> updatedSet =
         new HashSet<ServiceBindingMetadata>(store.getStandardBindings());
      assertEquals(3, updatedSet.size());
      ServiceBindingMetadata updated = new ServiceBindingMetadata(AA);
View Full Code Here

      sbs.add(setA);
      ServiceBindingSet setB = new ServiceBindingSet(B, "localhost", 20);     
      sbs.add(setB);
     
      PojoServiceBindingStore store = new PojoServiceBindingStore(sbs, set);
      store.start();
     
      Set<ServiceBindingSet> updated = new HashSet<ServiceBindingSet>(store.getServiceBindingSets());
     
      Set<ServiceBindingMetadata> overrides = new HashSet<ServiceBindingMetadata>();
      overrides.add(BA);
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.