Examples of SimpleServiceRegistry


Examples of org.apache.mina.registry.SimpleServiceRegistry

    private static final int SERVER_PORT = 8080;

    public static void main( String[] args ) throws Throwable
    {
        // Create ServiceRegistry.
        ServiceRegistry registry = new SimpleServiceRegistry();

        registry.bind(
                new Service( "sumUp", TransportType.SOCKET, SERVER_PORT ),
                new ServerProtocolProvider() );

        System.out.println( "Listening on port " + SERVER_PORT );
    }
View Full Code Here

Examples of org.jboss.forge.furnace.container.simple.impl.SimpleServiceRegistry

   @Override
   public ServiceRegistry getServiceRegistry(Addon addon) throws Exception
   {
      Set<Class<?>> serviceTypes = locateServices(addon, Service.class);
      Set<Class<?>> singletonServiceTypes = locateServices(addon, SingletonService.class);
      return new SimpleServiceRegistry(furnace, addon, serviceTypes, singletonServiceTypes);
   }
View Full Code Here

Examples of org.jboss.forge.furnace.container.simple.impl.SimpleServiceRegistry

                        ClassLoaders.getClassLoadingExceptionFor(addon.getClassLoader(), serviceType));
            }
         }

      }
      return new SimpleServiceRegistry(furnace, addon, serviceTypes);
   }
View Full Code Here

Examples of org.jboss.weld.bootstrap.api.helpers.SimpleServiceRegistry

   public FlatDeployment(WeldDiscoveryEnvironment environment, Collection<EjbDescriptor<?>> ejbDescriptors)
   {
      this.beanDeploymentArchive = new JBossBeanDeploymentArchive("flat" ,environment, ejbDescriptors);
      this.beanDeploymentArchives = Collections.<BeanDeploymentArchive>singletonList(beanDeploymentArchive);
      this.services = new SimpleServiceRegistry();
   }
View Full Code Here

Examples of org.jboss.weld.bootstrap.api.helpers.SimpleServiceRegistry

      services.put(serviceType, service);
   }

   public ServiceRegistry create()
   {
      ServiceRegistry serviceRegistry = new SimpleServiceRegistry();
      serviceRegistry.addAll(services.entrySet());
      EjbServices ejbServices = null;
      try
      {
         ejbServices = (EjbServices) ejbServicesFactory.createBean();
      } catch (Throwable e)
      {
         throw new RuntimeException(e);
      }
      serviceRegistry.add(EjbServices.class, ejbServices);
      return serviceRegistry;
   }
View Full Code Here

Examples of org.jboss.weld.bootstrap.api.helpers.SimpleServiceRegistry

   public JBossBeanDeploymentArchive(String id, WeldDiscoveryEnvironment environment, Collection<EjbDescriptor<?>> ejbDescriptors)
   {
      this.environment = environment;
      this.ejbDescriptors = ejbDescriptors;
      this.services = new SimpleServiceRegistry();
      this.id = id;
   }
View Full Code Here

Examples of org.jboss.weld.bootstrap.api.helpers.SimpleServiceRegistry

    */
   public DeploymentImpl(String name, Collection<ArchiveInfo> archiveInfos, Collection<EjbDescriptor<?>> ejbs, BeanFactory ejbServicesFactory)
   {
      this.name = name;
      this.archives = new ArchiveCollection();
      this.services = new SimpleServiceRegistry();
      this.bdaServices = new SimpleServiceRegistry();
      for (ArchiveInfo archiveInfo: archiveInfos)
      {
         archives.add(ArchiveFactory.createArchive(archiveInfo, ejbs));
      }
      this.loadedBDAServiceRegistry = new ServiceRegistryFactory(ejbServicesFactory);
View Full Code Here

Examples of org.jboss.weld.bootstrap.api.helpers.SimpleServiceRegistry

    public BeanDeploymentArchiveImpl(Set<String> beanClasses, BeansXml beansXml, Module module, String id) {
        this.beanClasses = new ConcurrentSkipListSet<String>(beanClasses);
        this.beanDeploymentArchives = new CopyOnWriteArraySet<BeanDeploymentArchive>();
        this.beansXml = beansXml;
        this.id = id;
        this.serviceRegistry = new SimpleServiceRegistry();
        this.resourceLoader = new WeldModuleResourceLoader(module);
        this.serviceRegistry.add(ResourceLoader.class, resourceLoader);
        this.module = module;
        this.ejbDescriptors = new HashSet<EjbDescriptor<?>>();
    }
View Full Code Here

Examples of org.jboss.weld.bootstrap.api.helpers.SimpleServiceRegistry

        this.additionalBeanDeploymentArchive = new BeanDeploymentArchiveImpl(Collections.<String> emptySet(),
                BeansXml.EMPTY_BEANS_XML, module, getClass().getName() + ADDITIONAL_CLASSES_BDA_SUFFIX);

        this.beanDeploymentArchives = new HashSet<BeanDeploymentArchiveImpl>(beanDeploymentArchives);
        this.extensions = new HashSet<Metadata<Extension>>(extensions);
        this.serviceRegistry = new SimpleServiceRegistry();
        this.beanDeploymentsByClassName = new HashMap<String, BeanDeploymentArchiveImpl>();
        this.module = module;

        // add static services
        this.serviceRegistry.add(ProxyServices.class, new ProxyServicesImpl(module));
View Full Code Here

Examples of org.jboss.weld.bootstrap.api.helpers.SimpleServiceRegistry

    public BeanDeploymentArchiveImpl(Set<String> beanClasses, BeansXml beansXml, Module module, String id, BeanArchiveType beanArchiveType, boolean root) {
        this.beanClasses = new ConcurrentSkipListSet<String>(beanClasses);
        this.beanDeploymentArchives = new CopyOnWriteArraySet<BeanDeploymentArchive>();
        this.beansXml = beansXml;
        this.id = id;
        this.serviceRegistry = new SimpleServiceRegistry();
        this.resourceLoader = new WeldModuleResourceLoader(module);
        this.serviceRegistry.add(ResourceLoader.class, resourceLoader);
        this.serviceRegistry.add(EjbServices.class, new WeldEjbServices());
        this.module = module;
        this.ejbDescriptors = new HashSet<EjbDescriptor<?>>();
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.