Skip to content

Commit

Permalink
Fix alibaba Rpc compact
Browse files Browse the repository at this point in the history
  • Loading branch information
AlbumenJ committed Jun 21, 2023
1 parent 9577d46 commit 05eb220
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
import java.util.concurrent.FutureTask;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;
import java.util.stream.Collectors;

@Deprecated
public class RpcContext {
Expand Down Expand Up @@ -320,6 +321,25 @@ public boolean isClientSide() {
return isConsumerSide();
}

@Deprecated
public Invoker<?> getInvoker() {
org.apache.dubbo.rpc.Invoker<?> invoker = newRpcContext.getInvoker();
if (invoker == null) {
return null;
}
return new Invoker.CompatibleInvoker<>(invoker);
}

@Deprecated
public List<Invoker<?>> getInvokers() {
List<org.apache.dubbo.rpc.Invoker<?>> invokers = newRpcContext.getInvokers();
if (CollectionUtils.isEmpty(invokers)) {
return Collections.emptyList();
}
return invokers.stream()
.map(Invoker.CompatibleInvoker::new)
.collect(Collectors.toList());
}
/**
* Async invocation. Timeout will be handled even if <code>Future.get()</code> is not called.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

@Deprecated
public class RpcException extends org.apache.dubbo.rpc.RpcException {

public RpcException() {
super();
}
Expand Down Expand Up @@ -51,4 +51,8 @@ public RpcException(int code, String message) {
public RpcException(int code, Throwable cause) {
super(code, cause);
}

public boolean isForbidded() {
return isForbidden();
}
}

0 comments on commit 05eb220

Please sign in to comment.