Examples of createInject()


Examples of org.jboss.beans.metadata.spi.builder.BeanMetaDataBuilder.createInject()

            final String name = metaData.getName();
            final BeanMetaDataBuilder builder = BeanMetaDataBuilder.createBuilder(name, ThreadGroup.class.getName());
            builder.setMode(ControllerMode.ON_DEMAND);
            final String parent = metaData.getParent();
            if (parent != null && parent.length() > 0) {
                builder.addConstructorParameter(ThreadGroup.class.getName(), builder.createInject(parent));
            }
            builder.addConstructorParameter(String.class.getName(), builder.createValue(name));
            if (metaData.isDaemon() != null) {
                builder.addPropertyMetaData("daemon", builder.createValue(metaData.isDaemon()));
            }
View Full Code Here

Examples of org.jboss.beans.metadata.spi.builder.BeanMetaDataBuilder.createInject()

        for (ThreadFactoryMetaData metaData : threadFactories) {
            final String name = metaData.getName();
            final BeanMetaDataBuilder builder = BeanMetaDataBuilder.createBuilder(name, JBossThreadFactory.class.getName());
            builder.setMode(ControllerMode.ON_DEMAND);
            final String group = metaData.getGroup();
            builder.addConstructorParameter(ThreadGroup.class.getName(), group == null ? builder.createNull() : builder.createInject(group));
            final Boolean daemon = metaData.getDaemon();
            builder.addConstructorParameter(Boolean.class.getName(), daemon == null ? builder.createNull() : builder.createValue(daemon));
            final Integer priorityMeta = metaData.getInitialPriority();
            final Integer actualPriorityMeta;
            if (priorityMeta != null) {
View Full Code Here

Examples of org.jboss.beans.metadata.spi.builder.BeanMetaDataBuilder.createInject()

            }
            builder.addConstructorParameter(Integer.class.getName(), actualPriorityMeta == null ? builder.createNull() : builder.createValue(actualPriorityMeta));
            builder.addConstructorParameter(String.class.getName(), builder.createValue(metaData.getThreadNamePattern()));
            final List<ValueMetaData> interruptHandlers = builder.createArray(InterruptHandler[].class.getName(), InterruptHandler.class.getName());
            for (InterruptHandlerRefMetaData ihmd : metaData.getInterruptHandlers()) {
                interruptHandlers.add(builder.createInject(ihmd.getName()));
            }
            builder.addConstructorParameter(InterruptHandler[].class.getName(), (ValueMetaData) interruptHandlers);
            final ExceptionHandlerRefMetaData ehmd = metaData.getExceptionHandler();
            builder.addConstructorParameter(Thread.UncaughtExceptionHandler.class.getName(), ehmd == null ? builder.createNull() : builder.createInject(ehmd.getName()));
            final Long stackSize = metaData.getStackSize();
View Full Code Here

Examples of org.jboss.beans.metadata.spi.builder.BeanMetaDataBuilder.createInject()

            for (InterruptHandlerRefMetaData ihmd : metaData.getInterruptHandlers()) {
                interruptHandlers.add(builder.createInject(ihmd.getName()));
            }
            builder.addConstructorParameter(InterruptHandler[].class.getName(), (ValueMetaData) interruptHandlers);
            final ExceptionHandlerRefMetaData ehmd = metaData.getExceptionHandler();
            builder.addConstructorParameter(Thread.UncaughtExceptionHandler.class.getName(), ehmd == null ? builder.createNull() : builder.createInject(ehmd.getName()));
            final Long stackSize = metaData.getStackSize();
            builder.addConstructorParameter(Long.class.getName(), stackSize == null ? builder.createNull() : builder.createValue(stackSize));
            beanMetaDataList.add(builder.getBeanMetaData());
        }
        for (ThreadPoolExecutorMetaData metaData : threadPoolExecutors) {
View Full Code Here

Examples of org.jboss.beans.metadata.spi.builder.BeanMetaDataBuilder.createInject()

                } else if ("discard-oldest".equals(policyName)) {
                    rejectionPolicy = RejectionPolicy.DISCARD_OLDEST;
                    handoffExecutorValue = executorBuilder.createNull();
                } else if ("handoff".equals(policyName)) {
                    rejectionPolicy = RejectionPolicy.HANDOFF;
                    handoffExecutorValue = executorBuilder.createInject(rejectPolicyMetaData.getExecutorName());
                } else {
                    throw new IllegalStateException();
                }
                final Queue<Runnable> queue;
                if (queueLength == null) {
View Full Code Here

Examples of org.jboss.beans.metadata.spi.builder.BeanMetaDataBuilder.createInject()

                executorBuilder.addConstructorParameter("int", Integer.valueOf(corePoolSize));
                executorBuilder.addConstructorParameter("int", Integer.valueOf(maxPoolSize));
                executorBuilder.addConstructorParameter("long", Long.valueOf(time));
                executorBuilder.addConstructorParameter(TimeUnit.class.getName(), unit);
                executorBuilder.addConstructorParameter(Queue.class.getName(), executorBuilder.createValue(queue));
                executorBuilder.addConstructorParameter(ThreadFactory.class.getName(), executorBuilder.createInject(threadFactory));
                executorBuilder.addConstructorParameter(RejectionPolicy.class.getName(), rejectionPolicy);
                executorBuilder.addConstructorParameter(Executor.class.getName(), handoffExecutorValue);
                if (metaData.isAllowCoreTimeout()) {
                    executorBuilder.addPropertyMetaData("allowCoreTimeout", Boolean.TRUE);
                }
View Full Code Here

Examples of org.jboss.beans.metadata.spi.builder.BeanMetaDataBuilder.createInject()

                    policyValue = executorBuilder.createValue(JBossExecutors.discardOldestPolicy());
                } else if ("handoff".equals(policyName)) {
                    final BeanMetaDataBuilder policyBuilder = BeanMetaDataBuilder.createBuilder(RejectedExecutionHandler.class.getName());
                    policyBuilder.setFactoryClass(JBossExecutors.class.getName());
                    policyBuilder.setFactoryMethod("handoffPolicy");
                    policyBuilder.addConstructorParameter(Executor.class.getName(), policyBuilder.createInject(rejectPolicyMetaData.getExecutorName()));
                    policyValue = policyBuilder.getBeanMetaData();
                } else {
                    throw new IllegalStateException();
                }
                final BlockingQueue<Runnable> queue;
View Full Code Here

Examples of org.jboss.beans.metadata.spi.builder.BeanMetaDataBuilder.createInject()

            final String name = metaData.getName();
            final BeanMetaDataBuilder builder = BeanMetaDataBuilder.createBuilder(name, DirectExecutor.class.getName());
            builder.setMode(ControllerMode.ON_DEMAND);
            builder.setFactoryClass(JBossExecutors.class.getName());
            builder.setFactoryMethod("notatingExecutor");
            builder.addConstructorParameter(Executor.class.getName(), builder.createInject(metaData.getParent()));
            builder.addConstructorParameter(String.class.getName(), metaData.getNote());
            beanMetaDataList.add(builder.getBeanMetaData());
        }
        for (ScheduledThreadPoolExecutorMetaData metaData : scheduledThreadPoolExecutors) {
            final String name = metaData.getName();
View Full Code Here

Examples of org.jboss.beans.metadata.spi.builder.BeanMetaDataBuilder.createInject()

                size = 1;
            }
            builder.addConstructorParameter("int", Integer.valueOf(size));
            final String threadFactoryName = metaData.getThreadFactory();
            if (threadFactoryName != null) {
                builder.addConstructorParameter(ThreadFactory.class.getName(), builder.createInject(threadFactoryName));
            }
            beanMetaDataList.add(builder.getBeanMetaData());
        }
        return beanMetaDataList;
    }
View Full Code Here

Examples of org.jboss.beans.metadata.spi.builder.BeanMetaDataBuilder.createInject()

         {
            String entryName = getName() + "$" + i++;
            BeanMetaDataBuilder entryBuilder = AOPBeanMetaDataBuilder.createBuilder(entryName, CFlowStackEntry.class.getName());
            entryBuilder.addPropertyMetaData("called", entry.getCalled());
            entryBuilder.addPropertyMetaData("expr", entry.getExpr());
            ValueMetaData injectEntry = entryBuilder.createInject(entryName);
            entryList.add(injectEntry);
            result.add(entryBuilder.getBeanMetaData());
         }
      }
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.