1 package com.sslexplorer.agent; 2 3 import java.util.Iterator ; 4 import java.util.List ; 5 6 import com.maverick.multiplex.Channel; 7 import com.maverick.multiplex.ChannelFactory; 8 import com.maverick.multiplex.ChannelOpenException; 9 import com.maverick.multiplex.MultiplexedConnection; 10 11 public class DefaultAgentChannelFactory implements ChannelFactory { 12 13 16 public Channel createChannel(MultiplexedConnection connection, String type) throws ChannelOpenException { 17 18 List services = DefaultAgentManager.getInstance().getServices(); 19 Channel channel = null; 20 for(Iterator it = services.iterator();it.hasNext();) { 21 channel = ((AgentService)it.next()).createChannel(connection, type); 22 if(channel!=null) 23 break; 24 } 25 return channel; 26 } 27 } 28 | Popular Tags |