mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
add anonymouse client RPC endpoint support
This commit is contained in:
parent
28db7981b9
commit
d836b14a64
@ -27,7 +27,9 @@ public interface RpcProvider extends TransportMultiplexier {
|
|||||||
void registerRpcServiceEndpoint(RpcServiceEndpoint rpcEndpoint);
|
void registerRpcServiceEndpoint(RpcServiceEndpoint rpcEndpoint);
|
||||||
void unregisteRpcServiceEndpoint(RpcServiceEndpoint rpcEndpoint);
|
void unregisteRpcServiceEndpoint(RpcServiceEndpoint rpcEndpoint);
|
||||||
|
|
||||||
RpcClientCall newCall(String sourceAddress, String targetAddress);
|
RpcClientCall newCall(TransportEndpoint sourceEndpoint, String targetAddress);
|
||||||
|
RpcClientCall newCall(String targetAddress);
|
||||||
|
|
||||||
void registerCall(RpcClientCall call);
|
void registerCall(RpcClientCall call);
|
||||||
void cancelCall(RpcClientCall call);
|
void cancelCall(RpcClientCall call);
|
||||||
|
|
||||||
|
|||||||
@ -83,16 +83,23 @@ public class RpcProviderImpl implements RpcProvider {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public RpcClientCall newCall(String sourceAddress, String targetAddress) {
|
public RpcClientCall newCall(TransportEndpoint sourceEndpoint, String targetAddress) {
|
||||||
long callTag = getNextCallTag();
|
long callTag = getNextCallTag();
|
||||||
RpcClientCallImpl call = new RpcClientCallImpl(this);
|
RpcClientCallImpl call = new RpcClientCallImpl(this);
|
||||||
call.setSourceAddress(sourceAddress);
|
call.setSourceAddress(sourceEndpoint.getEndpointAddress());
|
||||||
call.setTargetAddress(targetAddress);
|
call.setTargetAddress(targetAddress);
|
||||||
call.setCallTag(callTag);
|
call.setCallTag(callTag);
|
||||||
|
|
||||||
return call;
|
return call;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public RpcClientCall newCall(String targetAddress) {
|
||||||
|
|
||||||
|
// ???
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void registerCall(RpcClientCall call) {
|
public void registerCall(RpcClientCall call) {
|
||||||
assert(call != null);
|
assert(call != null);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user