Skip to content

Commit

Permalink
move getExporterMap() to the abstract class
Browse files Browse the repository at this point in the history
  • Loading branch information
beiwei30 committed Sep 20, 2019
1 parent c1c383b commit e8e63f5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
import org.apache.dubbo.rpc.support.ProtocolUtils;

import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
Expand Down Expand Up @@ -92,4 +94,12 @@ public <T> Invoker<T> refer(Class<T> type, URL url) throws RpcException {
}

protected abstract <T> Invoker<T> protocolBindingRefer(Class<T> type, URL url) throws RpcException;

public Map<String, Exporter<?>> getExporterMap() {
return exporterMap;
}

public Collection<Exporter<?>> getExporters() {
return Collections.unmodifiableCollection(exporterMap.values());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -223,14 +223,6 @@ public Collection<ExchangeServer> getServers() {
return Collections.unmodifiableCollection(serverMap.values());
}

public Collection<Exporter<?>> getExporters() {
return Collections.unmodifiableCollection(exporterMap.values());
}

Map<String, Exporter<?>> getExporterMap() {
return exporterMap;
}

private boolean isClientSide(Channel channel) {
InetSocketAddress address = channel.getRemoteAddress();
URL url = channel.getUrl();
Expand Down

0 comments on commit e8e63f5

Please sign in to comment.