Examples of Topic


Examples of org.objectweb.joram.client.jms.Topic

   */
  public String createTopic(short serverId,
                            String name,
                            String className,
                            Properties prop) throws AdminException, ConnectException {
    Topic topic = null;

    try {
      Context ctx = new InitialContext();
      topic = (Topic) ctx.lookup(name);
    } catch (javax.naming.NamingException exc) {
      String shortName = removePrefix(name);
      topic = (Topic) AdminModule.createTopic(serverId, shortName, className, prop);
      topic.setFreeReading();
      topic.setFreeWriting();

      if (logger.isLoggable(BasicLevel.INFO))
        logger.log(BasicLevel.INFO,
                   "  - Topic [" + shortName + "] has been created.");

      bind(name, topic);
    }

    return topic.registerMBean(jmxRootName);
  }
View Full Code Here

Examples of org.objectweb.joram.client.jms.Topic

    AdminModule.connect("root", "root", 60);

    // Creating the JMS administered objects:       
    ConnectionFactory connFactory = TcpConnectionFactory.create("localhost", 16010);

    Topic topic = Topic.create(0);

    // Creating an access for user anonymous:
    User.create("anonymous", "anonymous", 0);

    // Setting free access to the topic:
    topic.setFreeReading();
    topic.setFreeWriting();

    // Binding objects in JNDI:
    javax.naming.Context jndiCtx = new javax.naming.InitialContext();
    jndiCtx.bind("factoryChat", connFactory);
    jndiCtx.bind("topicChat", topic);
View Full Code Here

Examples of org.objectweb.joram.client.jms.Topic

    ConnectionFactory cf = HATcpConnectionFactory.create("hajoram://localhost:2560,localhost:2561,localhost:2562");
    ((HATcpConnectionFactory)cf).getParameters().connectingTimer = 30;
   
    AdminModule.connect(cf, "root", "root");
   
    Topic topic = Topic.create(0,"topic");

    AdminModule.disconnect();

    Connection cnx = cf.createConnection("anonymous", "anonymous");
    Session sess = cnx.createSession(false, Session.AUTO_ACKNOWLEDGE);
View Full Code Here

Examples of org.objectweb.joram.mom.dest.Topic

      if (DestinationConstants.isQueue(req.getType())) {
        // Create a local queue.
        dest = new Queue();
      } else if (DestinationConstants.isTopic(req.getType())) {
        // Create a local topic.
        dest = new Topic();
      } else {
        throw new RequestException("Could not create destination, unknown type:" + req.getType());
      }
      dest.setName(req.getName());
      dest.setAdminId(getId());
View Full Code Here

Examples of org.optaplanner.examples.examination.domain.Topic

            afterMap = new LinkedHashMap<Topic, Set<Topic>>();
            Map<Integer, Student> studentMap = new HashMap<Integer, Student>();
            int examSize = readHeaderWithNumber("Exams");
            List<Topic> topicList = new ArrayList<Topic>(examSize);
            for (int i = 0; i < examSize; i++) {
                Topic topic = new Topic();
                topic.setId((long) i);
                String line = bufferedReader.readLine();
                String[] lineTokens = line.split(SPLIT_REGEX);
                topic.setDuration(Integer.parseInt(lineTokens[0]));
                List<Student> topicStudentList = new ArrayList<Student>(lineTokens.length - 1);
                for (int j = 1; j < lineTokens.length; j++) {
                    topicStudentList.add(findOrCreateStudent(studentMap, Integer.parseInt(lineTokens[j])));
                }
                topic.setStudentList(topicStudentList);
                topic.setFrontLoadLarge(false);
                topicList.add(topic);
                coincidenceMap.put(topic, new HashSet<Topic>());
                exclusionMap.put(topic, new HashSet<Topic>());
                afterMap.put(topic, new HashSet<Topic>());
            }
View Full Code Here

Examples of org.osforce.connect.entity.discussion.Topic

      model.put("post", blogPost);
    } else if(StringUtils.equals(Forum.NAME, activity.getEntity())){
      Forum forum = forumService.getForum(activity.getLinkedId());
      model.put("forum", forum);
    } else if(StringUtils.equals(Topic.NAME, activity.getEntity())) {
      Topic topic = topicService.getTopic(activity.getLinkedId());
      model.put("topic", topic);
    } else if(StringUtils.equals(Reply.NAME, activity.getEntity())) {
      Reply reply = replyService.getReply(activity.getLinkedId());
      model.put("reply", reply);
    } else if(StringUtils.equals(TeamMember.NAME, activity.getEntity())) {
View Full Code Here

Examples of org.qi4j.samples.forum.data.entity.Topic

        @Structure
        Module module;

        Topic createTopic( String subject, String message, BoardViewer poster )
        {
            Topic topic = module.currentUnitOfWork().newEntity( Topic.class );

            topic.subject().set( subject );

            Post post = module.currentUnitOfWork().newEntity( Post.class );
            post.message().set( message );

            // Moderation checks
View Full Code Here

Examples of org.richfaces.application.push.Topic

    @Override
    public synchronized void destroy() {
        active = false;

        for (TopicKey key : successfulSubscriptions) {
            Topic topic = topicsContext.getTopic(key);
            topic.publishEvent(new SessionUnsubscriptionEvent(topic, key, this));
        }

        try {
            disconnect();
        } catch (Exception e) {
View Full Code Here

Examples of org.springframework.data.redis.listener.Topic

        verify(listenerContainer).addMessageListener(any(MessageListener.class), collectionCaptor.capture());

        Collection<ChannelTopic> topics = collectionCaptor.getValue();
        Iterator<ChannelTopic> topicIterator = topics.iterator();

        Topic firstTopic = topicIterator.next();
        Topic twoTopic = topicIterator.next();

        assertEquals("one", firstTopic.getTopic());
        assertEquals("two", twoTopic.getTopic());
    }
View Full Code Here

Examples of org.wso2.event.Topic

   
    public TopicNode getTopicTree() throws EventException {
        try {
            String topicIndexPath = getSubscriptionStoragePath();
            Resource root = registry.get(topicIndexPath);
            TopicNode rootTopic = new TopicNode(new Topic("/", false));
            buildTopicTree(rootTopic, (Collection)root);
            return rootTopic;
        } catch (RegistryException e) {
            throw new EventException(e.getMessage(),e);
        }
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.