[Bindable]
public class Configuration extends EventDispatcher
{
public static const URL_CHANGED:String = "urlChanged";
private var _host:String;
private var _port:String;
private var _context:String;
public function Configuration(host:String, port:String, context:String)
{
this.host = host;
this.port = port;
this.context = context;
}
public function get host():String
{
return _host;
}
public function set host(value:String):void
{
_host = value;
dispatchEvent(new Event(URL_CHANGED));
}
public function get port():String
{
return _port;
}
public function set port(value:String):void
{
_port = value;
dispatchEvent(new Event(URL_CHANGED));
}
public function get context():String
{
return _context;
}
public function set context(value:String):void
{
_context = value;
dispatchEvent(new Event(URL_CHANGED));
}
// DO NOT USE the URL_CHANGED constant
[Bindable(event="urlChanged")]
public function get url():String
{
return "http://" + host + ":" + port + "/" + context + "/messagebroker/amfpolling";
}