Package org.objectweb.joram.shared.admin

Examples of org.objectweb.joram.shared.admin.GetRightsReply


   * @exception ConnectException  If the administration connection is closed or broken.
   * @exception AdminException  If the request fails.
   */
  public List getReaders() throws ConnectException, AdminException {
    GetRightsRequest request = new GetRightsRequest(getName());
    GetRightsReply reply = (GetRightsReply) doRequest(request);

    Vector list = new Vector();
    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)));
View Full Code Here


   *
   * @see org.objectweb.joram.client.jms.DestinationMBean#getReaderList()
   */
  public List getReaderList() throws ConnectException, AdminException {
    GetRightsRequest request = new GetRightsRequest(getName());
    GetRightsReply reply = (GetRightsReply) doRequest(request);

    Vector list = new Vector();
    Hashtable users = reply.getReaders();
    if (users != null) {
      for (Enumeration names = users.keys(); names.hasMoreElements();) {
        list.add(names.nextElement());
      }
    }
View Full Code Here

   * @exception ConnectException  If the administration connection is closed or broken.
   * @exception AdminException  If the request fails.
   */
  public List getWriters() throws ConnectException, AdminException {
    GetRightsRequest request = new GetRightsRequest(getName());
    GetRightsReply reply = (GetRightsReply) doRequest(request);

    Vector list = new Vector();
    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)));
View Full Code Here

   *
   * @see org.objectweb.joram.client.jms.DestinationMBean#getWriterList()
   */
  public List getWriterList() throws ConnectException, AdminException {
    GetRightsRequest request = new GetRightsRequest(getName());
    GetRightsReply reply = (GetRightsReply) doRequest(request);

    Vector list = new Vector();
    Hashtable users = reply.getWriters();
    if (users != null) {
      for (Enumeration names = users.keys(); names.hasMoreElements();) {
        list.add(names.nextElement());
      }
    }
View Full Code Here

   * @exception ConnectException  If the administration connection is closed or broken.
   * @exception AdminException  If the request fails.
   */
  public boolean isFreelyReadable() throws ConnectException, AdminException {
    GetRightsRequest request = new GetRightsRequest(getName());
    GetRightsReply reply = (GetRightsReply) doRequest(request);

    return reply.isFreeReading();
  }
View Full Code Here

   * @exception ConnectException  If the administration connection is closed or broken.
   * @exception AdminException  If the request fails.
   */
  public boolean isFreelyWriteable() throws ConnectException, AdminException {
    GetRightsRequest request = new GetRightsRequest(getName());
    GetRightsReply reply = (GetRightsReply) doRequest(request);

    return reply.isFreeWriting();
  }
View Full Code Here

    Vector readers = not.getReaders();
    Vector writers = not.getWriters();

    String name;
    AgentId proxyId;
    GetRightsReply reply = new GetRightsReply(not.getSuccess(), not.getInfo(), not.isFreeReading(), not.isFreeWriting());

    for (Iterator names = proxiesTable.keySet().iterator(); names.hasNext();) {
      name = (String) names.next();
      proxyId = (AgentId) proxiesTable.get(name);

      if (readers.contains(proxyId))
        reply.addReader(name, proxyId.toString());
      if (writers.contains(proxyId))
        reply.addWriter(name, proxyId.toString());
    }
    return reply;
  }
View Full Code Here

TOP

Related Classes of org.objectweb.joram.shared.admin.GetRightsReply

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.