Package org.jboss.arquillian.impl.configuration.api

Examples of org.jboss.arquillian.impl.configuration.api.DefaultProtocolDef


   public void createRegistry(@Observes ArquillianDescriptor event) throws Exception
   {
      Collection<Protocol> protocols = serviceLoader.get().all(Protocol.class);

      Protocol<?> defaultProtocol = null;
      DefaultProtocolDef defaultProtcolDef = event.getDefaultProtocol();
      if(defaultProtcolDef != null)
      {
         defaultProtocol = findMatch(new ProtocolDescription(defaultProtcolDef.getType()), protocols);
         if(defaultProtocol == null)
         {
            // TODO: add printout of found protocols
            throw new IllegalStateException("Defined default protocol " + defaultProtcolDef.getType() + " can not be found on classpath");
         }
      }
      ProtocolRegistry registry = new ProtocolRegistry();
      for(Protocol<?> protocol : protocols)
      {
         injector.get().inject(protocol); // TODO: should be moved to ServiceRegistry, during Service creation
         if(defaultProtocol != null && protocol.equals(defaultProtocol))
         {
            registry.addProtocol(new ProtocolDefinition(protocol, defaultProtcolDef.getProperties(), true));  
         }
         else
         {
            registry.addProtocol(new ProtocolDefinition(protocol));           
         }
View Full Code Here

TOP

Related Classes of org.jboss.arquillian.impl.configuration.api.DefaultProtocolDef

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.