DUBBO-47 兼容2.0.8之前版本RMI。
git-svn-id: http://code.alibabatech.com/svn/dubbo/trunk@235 1a56cb94-b969-4eaa-88fa-be21384802f2
This commit is contained in:
parent
068a7d99e7
commit
a9d29909df
|
|
@ -30,16 +30,20 @@ import com.alibaba.dubbo.rpc.service.EchoService;
|
|||
public abstract class AbstractProxyFactory implements ProxyFactory {
|
||||
|
||||
public <T> T getProxy(Invoker<T> invoker) throws RpcException {
|
||||
Class<?>[] interfaces;
|
||||
String[] types = Constants.COMMA_SPLIT_PATTERN.split(invoker.getUrl().getParameter("interfaces", ""));
|
||||
if (types != null && types.length > 0) {
|
||||
interfaces = new Class<?>[types.length + 2];
|
||||
interfaces[0] = invoker.getInterface();
|
||||
interfaces[1] = EchoService.class;
|
||||
for (int i = 0; i < types.length; i ++) {
|
||||
interfaces[i + 1] = ReflectUtils.forName(types[i]);
|
||||
Class<?>[] interfaces = null;
|
||||
String config = invoker.getUrl().getParameter("interfaces");
|
||||
if (config != null && config.length() > 0) {
|
||||
String[] types = Constants.COMMA_SPLIT_PATTERN.split(config);
|
||||
if (types != null && types.length > 0) {
|
||||
interfaces = new Class<?>[types.length + 2];
|
||||
interfaces[0] = invoker.getInterface();
|
||||
interfaces[1] = EchoService.class;
|
||||
for (int i = 0; i < types.length; i ++) {
|
||||
interfaces[i + 1] = ReflectUtils.forName(types[i]);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
}
|
||||
if (interfaces == null) {
|
||||
interfaces = new Class<?>[] {invoker.getInterface(), EchoService.class};
|
||||
}
|
||||
return getProxy(invoker, interfaces);
|
||||
|
|
|
|||
Loading…
Reference in New Issue