Package org.jboss.services.binding

Examples of org.jboss.services.binding.ServiceBinding


         for (ServiceBinding binding : bindings)
         {
            byFQN.put(binding.getFullyQualifiedName(), binding);
         }
        
         ServiceBinding aa = byFQN.get(updated.getFullyQualifiedName());
         assertNotNull(aa);
         assertEquals(setName + "/updated/serviceName", updated.getServiceName(), aa.getServiceName());
         assertEquals(setName + "/updated/bindingName", updated.getBindingName(), aa.getBindingName());
         assertEquals(setName + "/updated/description", updated.getDescription(), aa.getDescription());
         assertEquals(setName + "/updated/hostName", bindingSet.getDefaultHostName(), aa.getHostName());
         assertEquals(setName + "/updated/port", updated.getPort() + bindingSet.getPortOffset(), aa.getPort());
        
         ServiceBinding ab = byFQN.get(AB.getFullyQualifiedName());
         assertNotNull(aa);
         assertEquals(setName + "/AB/serviceName", AB.getServiceName(), ab.getServiceName());
         assertEquals(setName + "/AB/bindingName", AB.getBindingName(), ab.getBindingName());
         assertEquals(setName + "/AB/description", AB.getDescription(), ab.getDescription());
         assertEquals(setName + "/AB/hostName", bindingSet.getDefaultHostName(), ab.getHostName());
         assertEquals(setName + "/AB/port", AB.getPort() + bindingSet.getPortOffset(), ab.getPort());
        
         ServiceBinding anull = byFQN.get(Anull.getFullyQualifiedName());
         assertNotNull(anull);
         assertEquals(setName + "/Anull/serviceName", Anull.getServiceName(), anull.getServiceName());
         assertEquals(setName + "/Anull/bindingName", Anull.getBindingName(), anull.getBindingName());
         assertEquals(setName + "/Anull/description", Anull.getDescription(), anull.getDescription());
         assertEquals(setName + "/Anull/hostName", bindingSet.getDefaultHostName(), anull.getHostName());
         assertEquals(setName + "/Anull/port", Anull.getPort() + bindingSet.getPortOffset(), anull.getPort());
        
         ServiceBinding newOne = byFQN.get(BA.getFullyQualifiedName());
         assertNotNull(newOne);
         assertEquals(setName + "/BA/serviceName", BA.getServiceName(), newOne.getServiceName());
         assertEquals(setName + "/BA/bindingName", BA.getBindingName(), newOne.getBindingName());
         assertEquals(setName + "/BA/description", BA.getDescription(), newOne.getDescription());
         assertEquals(setName + "/BA/hostName", bindingSet.getDefaultHostName(), newOne.getHostName());
         assertEquals(setName + "/BA/port", BA.getPort() + bindingSet.getPortOffset(), newOne.getPort());
      }
   }
View Full Code Here


      if (this.binding != null)
         throw new IllegalStateException("MockServiceBindingStore already has a binding");
      if (this.serverName.equals(serverName) == false)
         throw new IllegalArgumentException("Invalid serverName " + serverName);
     
      this.binding = new ServiceBinding(binding, getDefaultHostName(serverName), getDefaultPortOffset(serverName));
   }
View Full Code Here

      super.setUp();
     
      testee = new XSLTServiceBindingValueSourceImpl();     
      xsltConfig = getXSLTConfig();
      bindingMetadata.setServiceBindingValueSourceConfig(xsltConfig);
      binding = new ServiceBinding(bindingMetadata, HOST, 0);
   }
View Full Code Here

   }
  
   public void testNullConfigObject() throws Exception
   {
      bindingMetadata.setServiceBindingValueSourceConfig(null);
      binding = new ServiceBinding(bindingMetadata, HOST, 0);
      String input = getFullyQualifiedResourceName("xlst_input.xml");
      try
      {
         testee.getResourceServiceBindingValue(binding, input);
         fail("Should fail using an unknown xsltConfig");
View Full Code Here

   }
  
   public void testUnknownConfigObject() throws Exception
   {
      bindingMetadata.setServiceBindingValueSourceConfig(new Object());
      binding = new ServiceBinding(bindingMetadata, HOST, 0);
      String input = getFullyQualifiedResourceName("xlst_input.xml");
      try
      {
         testee.getResourceServiceBindingValue(binding, input);
         fail("Should fail using an unknown xsltConfig");
View Full Code Here

   }
  
   public void testUnknownConfigObject() throws Exception
   {
      bindingMetadata.setServiceBindingValueSourceConfig(new Object());
      binding = new ServiceBinding(bindingMetadata, HOST, 0);
      assertEquals(PORT, testee.getIntServiceBindingValue(binding));
   }
View Full Code Here

      super.setUp();
     
      mockStore = new MockServiceBindingStore(binding, SERVER);
      testee = new ServiceBindingManager(SERVER, mockStore);
      noNameMetadata = new ServiceBindingMetadata(SVC_NAME, null, null, PORT);
      noNameBinding = new ServiceBinding(noNameMetadata, HOST, 0);
      address = InetAddress.getByName(HOST);
   }
View Full Code Here

   public void testGetIntBindingViaGeneric() throws Exception
   {
      Integer result = new Integer(5);
      MockServiceBindingValueSource source = new MockServiceBindingValueSource(result);
      bindingMetadata.setServiceBindingValueSource(source);
      binding = new ServiceBinding(bindingMetadata, HOST, 0);
      mockStore.setBinding(binding);
      assertEquals(5, testee.getIntBinding(SVC_NAME, BINDING_NAME));
      Object[] params = source.getParams();
      assertNull(params);
   }
View Full Code Here

   public void testGetInetAddressBindingViaGeneric() throws Exception
   {
      InetAddress result = InetAddress.getByName("localhost");
      MockServiceBindingValueSource source = new MockServiceBindingValueSource(result);
      bindingMetadata.setServiceBindingValueSource(source);
      binding = new ServiceBinding(bindingMetadata, HOST, 0);
      mockStore.setBinding(binding);
      assertEquals(result, testee.getInetAddressBinding(SVC_NAME, BINDING_NAME));
      Object[] params = source.getParams();
      assertNull(params);
   }
View Full Code Here

  
   public void testGetStringBindingViaGeneric() throws Exception
   {
      MockServiceBindingValueSource source = new MockServiceBindingValueSource(SVC_NAME);
      bindingMetadata.setServiceBindingValueSource(source);
      binding = new ServiceBinding(bindingMetadata, HOST, 0);
      mockStore.setBinding(binding);
      assertEquals(SVC_NAME, testee.getStringBinding(SVC_NAME, BINDING_NAME, INPUT));
      Object[] params = source.getParams();
      assertNotNull(params);
      assertEquals(1, params.length);
View Full Code Here

TOP

Related Classes of org.jboss.services.binding.ServiceBinding

Copyright © 2018 www.massapicom. 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.