Package org.jboss.arquillian.config.descriptor.api

Examples of org.jboss.arquillian.config.descriptor.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)
      {
         if(defaultProtocol != null && protocol.equals(defaultProtocol))
         {
            registry.addProtocol(new ProtocolDefinition(protocol, defaultProtcolDef.getProperties(), true));  
         }
         else
         {
            registry.addProtocol(new ProtocolDefinition(protocol));           
         }
View Full Code Here


   {
      @SuppressWarnings("rawtypes")
      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)
      {
         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.config.descriptor.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.