in consumer/proxy/ProxyFactory.php [142:176]
private static function getInstanceByP2P($service, $ioTimeOut, $version, $group)
{
$ret = NULL;
if(array_key_exists($service, self::$serviceConsumers))
{
$serviceProperty = self::$serviceConsumers[$service];
if (isset($serviceProperty['url']))
{
$ret = Proxy::newProxyInstance($service, self::$appName, $group);
//设置io超时时间
$ret->setIOTimeOut($ioTimeOut);
//设置所用服务的ip地址列表
$serviceAddr = explode(",",$serviceProperty['url']);
$serviceUrls = array();
foreach ($serviceAddr as $index => $addr)
{
$tmpUrl = $addr.'/'."{$service}?version={$version}&group={$group}";
$serviceUrls[] = new FSOFUrl($tmpUrl);
}
$ret->setAddress($serviceUrls);
}
else
{
self::$logger->warn(self::$appName.'.consumer not exist url');
}
}
else
{
self::$logger->warn('service not found on p2p|consumer_app:'.self::$appName.'|provider_service:'.$service);
}
return $ret;
}