Configuring Custom Endpoint for dynamic Channel Blazeds Flex
===

We have services-config.xml file for configuring remote services of blazeds.Some channels are configured here. 

     <channel-definition id="my-amf" class="mx.messaging.channels.AMFChannel">
                <endpoint url="http://{server.name}:{server.port}/{context.root}/messagebroker/amf" class="MyCustomEndpoint"/>			
            </channel-definition>

We might need to change context path of the webapp dynamically and restart should be able to solve it. But for the services the contextroot is taken during compilation and might not be helpful.

This issue is resolved by creating channels dynamically with new context uri when remote objects are called.

    private function createChannelSets():void
    		{
    			channelSets=new ChannelSet();
    			var appUrl:String = FlexGlobals.topLevelApplication.url;
    			
    			var baseurl:String = UrlUtils.getServerUrlFromString(appUrl);
    			
    			
    			var remUrl:String=appUrl.split(baseurl)[1];
    			
    			var ind:int=remUrl.indexOf("/",1);
    			var webContext:String=remUrl.substr(0,ind);
    			var uri:String=baseurl+webContext;
    			var amfChannel:AMFChannel=new AMFChannel("amf-"+webContext,uri+"/messagebroker/amf");
 
    			channelSets.addChannel(amfChannel);
  			
    		}

The issue now is we have created a custom endpoint class which was configured in services-config.xml file. I tried looking for options to update this using api but cudnt find any. 

How do I specify to use the new custom endpoint for my AMFChannel . I cudnt find any property where my endpoint class is being given. and this class is a java class
