Package flex.samples.qos

Source Code of flex.samples.qos.FlexClientConfigService$Attribute

package flex.samples.qos;

import java.util.ArrayList;
import java.util.Enumeration;
import java.util.List;

import flex.messaging.FlexContext;
import flex.messaging.client.FlexClient;

public class FlexClientConfigService
{

  public void setAttribute(String name, Object value)
  {
    FlexClient flexClient = FlexContext.getFlexClient();
    flexClient.setAttribute(name, value);
  }

  public List getAttributes()
  {
    FlexClient flexClient = FlexContext.getFlexClient();
    List attributes = new ArrayList();
    Enumeration attrNames = flexClient.getAttributeNames();
    while (attrNames.hasMoreElements())
    {
      String attrName = (String) attrNames.nextElement();
      attributes.add(new Attribute(attrName, flexClient.getAttribute(attrName)));
    }

    return attributes;
   
  }
 
  public class Attribute {
   
    private String name;
    private Object value;

    public Attribute(String name, Object value) {
      this.name = name;
      this.value = value;
    }
    public String getName() {
      return name;
    }
    public void setName(String name) {
      this.name = name;
    }
    public Object getValue() {
      return value;
    }
    public void setValue(Object value) {
      this.value = value;
    }
   
  }
 
}
TOP

Related Classes of flex.samples.qos.FlexClientConfigService$Attribute

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.