Bonjour à tous,
J'aurais souhaité savoir s'il était possible de définir des règles de changement de Channel (fallback policy) avec AMFPHP et des channels définis dynamiquement.
Peut-être que ma question sera plus claire pour vous en voyant mon code actuel :
J'ai donc définit deux objets AMFChannels, chacun avec une destination différente.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23 private function initAMFCommunication() : void { channelInUse = ATChannelTypes.AMF_CHANNEL ; var defaultDestination : String = ATCommunicationConstants.getApplicationContext() ; defaultDestination += ATCommunicationConstants.AMF_DEFAULT_DESTINATION_URI ; var adaptEasyDestination : String = ATCommunicationConstants.getApplicationContext() ; adaptEasyDestination += ATCommunicationConstants.AMF_ADAPT_EASY_DESTINATION_URI ; this.AMFDefaultDestination = new AMFChannel (ATCommunicationConstants.AMF_CHANNEL_NAME , defaultDestination ) ; this.AMFAdaptEasyDestination = new AMFChannel (ATCommunicationConstants.AMF_CHANNEL_NAME , adaptEasyDestination ) ; this.AMFChannelSet = new ChannelSet () ; this.AMFChannelSet.addChannel(this.AMFDefaultDestination); this.AMFChannelSet.addChannel(this.AMFAdaptEasyDestination); this.AMFServerRemoteObject = new RemoteObject() ; this.AMFServerRemoteObject.channelSet = this.AMFChannelSet ; this.AMFServerRemoteObject.destination = ATCommunicationConstants.AMF_CHANNEL_NAME ; this.AMFServerRemoteObject.showBusyCursor = true ; }
En revanche, le remoteObject "n'attaque" que le premier channel. S'il ne reçois pas de réponse, il n'essaye pas avec le second channel.
Je cherche dans la documentation flex mais pour l'instant sans résultat.
Merci d'avance pour tout conseil utile (ou pas).
Partager