redesign the protocol callback
diff --git a/src/dubbo_common_fun.erl b/src/dubbo_common_fun.erl
index e74f57f..6717fac 100644
--- a/src/dubbo_common_fun.erl
+++ b/src/dubbo_common_fun.erl
@@ -32,7 +32,7 @@
list_to_binary(io_lib:format("~p.~p.~p.~p", [V1, V2, V3, V4])).
--spec(parse_url(Url :: binary()|list()) -> {ok, map()}).
+-spec(parse_url(Url :: binary()|list()) -> {ok, #dubbo_url{}}).
parse_url(Url) when is_binary(Url) ->
parse_url(binary_to_list(Url));
parse_url(Url) ->
diff --git a/src/dubbo_directory.erl b/src/dubbo_directory.erl
index 08e959c..3674a91 100644
--- a/src/dubbo_directory.erl
+++ b/src/dubbo_directory.erl
@@ -83,12 +83,7 @@
notify(Interface,UrlList)->
%% @todo if UrlList size is 1, and protocol is empty ,need destroyAllInvokers
- case dubbo_extension:run_fold(protocol,refer,[UrlList],{error,no_protocol}) of
- {ok,Invokers} ->
- ok;
- {error,no_protocol}->
- error
- end,
+ refresh_invoker(UrlList),
%% dubbo_consumer_pool:start_consumer(Interface, UrlList),
ok.
diff --git a/src/dubbo_protocol.erl b/src/dubbo_protocol.erl
index 8808fc8..7ecfcd8 100644
--- a/src/dubbo_protocol.erl
+++ b/src/dubbo_protocol.erl
@@ -16,11 +16,11 @@
%%------------------------------------------------------------------------------
-module(dubbo_protocol).
--callback refer(Url)->ok.
+-callback refer(Url,Acc)->ok.
-%% API
--export([refer/2]).
-
-
-refer(InterfaceClassInfo,Url)->
- dubbo_hooker(protocol_wapper,refer,[InterfaceClassInfo,Url]).
\ No newline at end of file
+%%%% API
+%%-export([refer/2]).
+%%
+%%
+%%refer(InterfaceClassInfo,Url)->
+%% dubbo_hooker(protocol_wapper,refer,[InterfaceClassInfo,Url]).
\ No newline at end of file
diff --git a/src/dubbo_protocol_dubbo.erl b/src/dubbo_protocol_dubbo.erl
index c2fb6dd..06c36e6 100644
--- a/src/dubbo_protocol_dubbo.erl
+++ b/src/dubbo_protocol_dubbo.erl
@@ -15,11 +15,21 @@
%% limitations under the License.
%%------------------------------------------------------------------------------
-module(dubbo_protocol_dubbo).
--author("dlive").
+
+-include("dubboerl.hrl").
%% API
--export([refer/1]).
+-export([refer/2]).
-refer(Url)->
+refer(Url,Acc)->
+ {ok,UrlInfo} = dubbo_common_fun:parse_url(Url),
+ case UrlInfo#dubbo_url.scheme of
+ <<"dubbo">> ->
+ {ok,todo};
+ _ ->
+ {skip,Acc}
+ end.
- {ok,todo}.
\ No newline at end of file
+do_refer(UrlInfo)->
+
+ ok.
\ No newline at end of file