Examples of Producer


Examples of by.bsuir.hypermarket.entity.Producer

    category.setUid(resultSet.getInt("c_uid"));
    category.setName(resultSet.getString("c_name"));
    category.setDescription(resultSet.getString("c_description"));
    goods.setCategory(category);
   
    Producer producer = new Producer();
    producer.setUid(resultSet.getInt("p_uid"));
    producer.setName(resultSet.getString("p_name"));
    producer.setPhoneNumber(resultSet.getString("p_phone"));
    producer.setEmail(resultSet.getString("p_email"));
    goods.setProducer(producer);
    return goods;
  }
View Full Code Here

Examples of com.aliyun.openservices.ons.api.Producer

    public static void main(String[] args) {
        Properties properties = new Properties();
        // ProducerId,代表一类Producer,请向MetaQ运维人员申请
        properties.put(PropertyKeyConst.ProducerId, "ProducerId1");
        properties.put(PropertyKeyConst.ProducerId, "ProducerId1");
        Producer producer = ONSFactory.createProducer(properties);
        producer.start();
        Message msg = new Message(//
            "TopicTestONS", // Topic, 请向ONS运维人员申请
            "TagA", // Tag, 相当于子Topic概念,应用可以自由设置,Consumer消费时,可以通过他来过滤消息
            "Hello ONS".getBytes()// 消息内容,二进制形式
                );
        SendResult sendResult = producer.send(msg);
        System.out.println(sendResult);
        producer.shutdown();
       
       

    }
View Full Code Here

Examples of com.google.code.kaptcha.Producer

        String randomSecretKey = UUID.randomUUID().toString()//random string for the captcha.
        String imagePath = StratosConstants.CAPTCHA_IMAGES_PATH + RegistryConstants.PATH_SEPARATOR +
                           randomSecretKey + ".jpg";

        Config config = new Config(new Properties());
        Producer captchaProducer = config.getProducerImpl();
        String captchaText = captchaProducer.createText();

        BufferedImage image = captchaProducer.createImage(captchaText);

        File tempFile = File.createTempFile("temp-", ".jpg");

        try {
            ImageIO.write(image, "jpg", tempFile);
View Full Code Here

Examples of com.packtpub.java7.concurrency.chapter2.recipe2.task.Producer

   
    // Creates an event storage
    EventStorage storage=new EventStorage();
   
    // Creates a Producer and a Thread to run it
    Producer producer=new Producer(storage);
    Thread thread1=new Thread(producer);

    // Creates a Consumer and a Thread to run it
    Consumer consumer=new Consumer(storage);
    Thread thread2=new Thread(consumer);
View Full Code Here

Examples of com.packtpub.java7.concurrency.chapter2.recipe6.task.Producer

    Buffer buffer=new Buffer(20);
   
    /**
     * Creates a producer and a thread to run it
     */
    Producer producer=new Producer(mock, buffer);
    Thread threadProducer=new Thread(producer,"Producer");
   
    /**
     * Creates three consumers and threads to run them
     */
 
View Full Code Here

Examples of com.packtpub.java7.concurrency.chapter3.recipe7.task.Producer

   
    // Creates the exchanger
    Exchanger<List<String>> exchanger=new Exchanger<>();
   
    // Creates the producer
    Producer producer=new Producer(buffer1, exchanger);
    // Creates the consumer
    Consumer consumer=new Consumer(buffer2, exchanger);
   
    // Creates and starts the threads
    Thread threadProducer=new Thread(producer);
View Full Code Here

Examples of com.packtpub.java7.concurrency.chapter6.recipe03.task.Producer

   
    /*
     * Launch 100 Producer tasks
     */
    for (int i=0; i<THREADS; i++) {
      Producer producer=new Producer("Producer: "+i,buffer);
      producerThreads[i]=new Thread(producer);
      producerThreads[i].start();
    }
   
    /*
 
View Full Code Here

Examples of com.packtpub.java7.concurrency.chapter7.recipe09.task.Producer

    MyPriorityTransferQueue<Event> buffer=new MyPriorityTransferQueue<>();
   
    /*
     * Create a Producer object
     */
    Producer producer=new Producer(buffer);
   
    /*
     * Launch 10 producers
     */
    Thread producerThreads[]=new Thread[10];
View Full Code Here

Examples of com.sun.messaging.jmq.jmsserver.core.Producer

  }

  int count = 0;
  while (producers.hasNext()) {
      ProducerUID pid = (ProducerUID)producers.next();
      Producer oneProd = Producer.getProducer(pid);

      /*
       * If wildcard param is not null, check for matches
       * If it is null, return total count of wildcards
       */
      if (wildcard != null)  {
          DestinationUID id = oneProd.getDestinationUID();
          if (id.getName().equals(wildcard))  {
              count++;
          }
      } else  {
          count++;
View Full Code Here

Examples of javax.enterprise.inject.spi.Producer

                            Bean<?> oldBean = creationalContext.putBean(bean);
                            try {
                                if (AbstractOwbBean.class.isInstance(bean)) {
                                    final AbstractOwbBean<?> aob = AbstractOwbBean.class.cast(bean);

                                    final Producer producer = aob.getProducer();
                                    implementor = producer.produce(creationalContext);
                                    if (producer instanceof InjectionTarget) {
                                        final InjectionTarget injectionTarget = (InjectionTarget) producer;
                                        injectionTarget.inject(implementor, creationalContext);
                                        injector = injectCxfResources(implementor); // we need it before postconstruct
                                        injectionTarget.postConstruct(implementor);
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.