FabricServiceProxyFactory.createServiceProxy 方法

定义

重载

createServiceProxy(Class<T> serviceInterfaceType, URI serviceUri)

Creates a proxy to communicate to the specified service using the remoted interface<T> 

</code> that the service implements.</p>

createServiceProxy(Class<T> serviceInterfaceType, URI serviceUri, ServicePartitionKey partitionKey, TargetReplicaSelector targetReplicaSelector, String listenerName)

Creates a proxy to communicate to the specified service using the remoted interface<T> 

</code> that the service implements.</p>

createServiceProxy(Class<T> serviceInterfaceType, URI serviceUri)

Creates a proxy to communicate to the specified service using the remoted interface<T> 

</code> that the service implements.</p>

public <T extends Service> T createServiceProxy(Class<T> serviceInterfaceType, URI serviceUri)

参数

serviceInterfaceType
Class<T>

Interface type that is being remoted

serviceUri
URI

Uri of the Service.

返回

<T extends Service> T

The proxy that implement the interface that is being remoted. The returned object also implement ServiceProxy interface.

替代

createServiceProxy(Class<T> serviceInterfaceType, URI serviceUri, ServicePartitionKey partitionKey, TargetReplicaSelector targetReplicaSelector, String listenerName)

Creates a proxy to communicate to the specified service using the remoted interface<T> 

</code> that the service implements.</p>

public <T extends Service> T createServiceProxy(Class<T> serviceInterfaceType, URI serviceUri, ServicePartitionKey partitionKey, TargetReplicaSelector targetReplicaSelector, String listenerName)

参数

serviceInterfaceType
Class<T>

Interface type that is being remoted

serviceUri
URI

Uri of the Service.

partitionKey
ServicePartitionKey

The Partition key that determines which service partition is responsible for handling requests from this service proxy.

targetReplicaSelector
TargetReplicaSelector

Determines which replica or instance of the service partition the client should connect to.

listenerName
String

This parameter is Optional if the service has a single communication listener. The endpoints from the service are of the form {"Endpoints":{"Listener1":"Endpoint1","Listener2":"Endpoint2" ...}}. When the service exposes multiple endpoints, this parameter identifies which of those endpoints to use for the remoting communication.

返回

<T extends Service> T

The proxy that implement the interface that is being remoted. The returned object also implement ServiceProxy interface.

替代

适用于