var ro1:RemoteObject = createRemoteObject("ieo", "http://localhost.:8080/BASIS_Web/messagebroker/amf", "c1"); var ro2:RemoteObject = createRemoteObject("ieo", "http://localhost.:8080/BASIS_Web/messagebroker/amf", "c2"); ...
/** * Constructs a new remote object with a new channel. * @param roDestination Destination of the RemoteObject; * @param channelURI the URI used to create the whole endpoint URI for this channel; * @param channelId the id of the channel */ public static function createRemoteObject(roDestination:String, channelURI:String, channelId:String):RemoteObject { var channelSet:ChannelSet = new ChannelSet(); var channel:AMFChannel = new AMFChannel(channelId, channelURI); channelSet.addChannel(channel); var ro:RemoteObject = new RemoteObject(roDestination); ro.channelSet = channelSet; return ro; }