Package org.objectweb.joram.client.jms.admin

Examples of org.objectweb.joram.client.jms.admin.User


      strbuf.append("<freeWriter/>\n");
    }

    List readers = getReaders();
    for (ListIterator iterator = readers.listIterator(); iterator.hasNext(); ) {
      User user = (User) (iterator.next());
      strbuf.append(XmlSerializer.indent(indent));
      strbuf.append("<reader ");
      strbuf.append(XmlSerializer.xmlAttribute(user.getName(), "user"));
      strbuf.append("/>\n");
    }

    List writers = getWriters();
    for (ListIterator iterator = writers.listIterator(); iterator.hasNext(); ) {
      User user = (User) (iterator.next());
      strbuf.append(XmlSerializer.indent(indent));
      strbuf.append("<writer ");
      strbuf.append(XmlSerializer.xmlAttribute(user.getName(), "user"));
      strbuf.append("/>\n");
    }


    strbuf.append(XmlSerializer.indent(indent));
View Full Code Here


    Hashtable users = reply.getReaders();
    if (users != null) {
      String name;
      for (Enumeration names = users.keys(); names.hasMoreElements();) {
        name = (String) names.nextElement();
        list.add(new User(name, (String) users.get(name)));
      }
    }
    return list;
  }
View Full Code Here

    Hashtable users = reply.getWriters();
    if (users != null) {
      String name;
      for (Enumeration names = users.keys(); names.hasMoreElements();) {
        name = (String) names.nextElement();
        list.add(new User(name, (String) users.get(name)));
      }
    }
    return list;
  }
View Full Code Here

    // connecting to JORAM server
    AdminModule.connect("root", "root", 60);
     
    // setting users
    User web = User.create("web", "web", 0);
    User billing = User.create("billing", "billing", 0);
    User inventory = User.create("inventory", "inventory", 0);
    User customer = User.create("customer", "customer", 0);
    User control = User.create("control", "control", 0);
    User delivery = User.create("delivery", "delivery", 0);

    // Creating the administered objects:
    javax.jms.QueueConnectionFactory qcf =
      QueueTcpConnectionFactory.create("localhost", 16010);
    javax.jms.TopicConnectionFactory tcf =
View Full Code Here

      "org.objectweb.joram.mom.dest.ClusterQueue",
      prop);
   
    System.out.println("queue = " + queue);

    User user = User.create("user"+sid, "user"+sid, id);


    javax.jms.QueueConnectionFactory cf =
      QueueTcpConnectionFactory.create("localhost", 16010+id);
View Full Code Here

        "org.objectweb.joram.shared.security.jaas.JonasIdentity");

    Queue queue = Queue.create("queue");
    Topic topic = Topic.create("topic");
   
    User user = User.create("anonymous", null, 0, "org.objectweb.joram.shared.security.jaas.JonasIdentity");

    queue.setReader(user);
    topic.setReader(user);
    queue.setWriter(user);
    topic.setWriter(user);
View Full Code Here

   */
  public String createUser(String name,
                         String password,
                         short serverId,
                         String identityClass) throws AdminException, ConnectException {
    User user = AdminModule.createUser(name, password, serverId, identityClass);
    return user.registerMBean(jmxRootName);
  }
View Full Code Here

  
      int fin =0;
      String[] ids = topic.getSubscriberIds();
      for(int i=0;i< ids.length && fin == 0 ;i++){
    if(dConfig.getShortName() !=null && (dConfig.getShortName()).equals(ids[i])){
        User u = new User("user"+i,ids[i]);
        final Subscription[] subs = u.getSubscriptions() ;
        for (int j = 0 ; j < subs.length && fin == 0 ; j++) {
      if( (subs[j].getName()).equals(dConfig.getClientID()) ){
          final String[] msgids = u.getMessageIds(dConfig.getClientID()) ;
          for(int k=0;k< msgids.length;k++)
        messages.add(u.readMessage(dConfig.getClientID(),msgids[k]));
          fin=1;
      }
        }
    }else if(dConfig.getShortName() ==null){
        throw new HermesException(new Exception("ShortName(userID) is null")) ;
View Full Code Here

    rval.put("AdminName", topic.getAdminName());
    rval.put("number of subscription",topic.getSubscriptions());

    String[] ids = topic.getSubscriberIds();
    for(int i=0;i< ids.length;i++){
        User u = new User("user"+i,ids[i]);
        final Subscription[] subs = u.getSubscriptions() ;
        for (int j = 0 ; j < subs.length ; j++) {
      rval.put("subscriber "+j,ids[i]+" : "+subs[j].getName()+"; Durable:"+subs[j].isDurable());
   
        }
    }
View Full Code Here

    Topic topic = (Topic) getHermes().getSession().createTopic(dConfig.getName());
 
    String[] ids = topic.getSubscriberIds();
    for(int i=0;i< ids.length && fin == 0 ;i++){
        if(dConfig.getShortName() !=null && (dConfig.getShortName()).equals(ids[i])){
      User u = new User("user"+i,ids[i]);
      final Subscription[] subs = u.getSubscriptions() ;
      for (int j = 0 ; j < subs.length && fin == 0 ; j++) {
          if( (subs[j].getName()).equals(dConfig.getClientID()) ){
        final String[] msgids = u.getMessageIds(dConfig.getClientID()) ;
        for(int k=0;k< msgids.length;k++)
            u.deleteMessage(dConfig.getClientID(),msgids[k]);
        fin++;
          }
      }
        }else if(dConfig.getShortName() ==null){
      throw new HermesException(new Exception("ShortName(userID) is null")) ;
View Full Code Here

TOP

Related Classes of org.objectweb.joram.client.jms.admin.User

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.