FabricServiceProxyFactory Class
- java.
lang. Object - ServiceProxyFactory
- microsoft.
servicefabric. services. remoting. client. FabricServiceProxyFactory
- microsoft.
public class FabricServiceProxyFactory implements ServiceProxyFactory
Specifies the factory that creates proxies for remote communication to the specified service.
Constructor Summary
Constructor | Description |
---|---|
FabricServiceProxyFactory() |
Instantiates the ServiceProxyFactory with the specified remoting factory and retrysettings. |
FabricServiceProxyFactory(Function<ServiceRemotingCallbackClient, ServiceRemotingClientFactory> createServiceRemotingClientFactory, OperationRetrySettings retrySettings) |
Instantiates the ServiceProxyFactory with the specified remoting factory and retrysettings. |
Method Summary
Modifier and Type | Method and Description |
---|---|
<T extends Service> T |
createServiceProxy(Class<T> serviceInterfaceType, URI serviceUri)
Creates a proxy to communicate to the specified service using the remoted interface
|
<T extends Service> T |
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
|
Constructor Details
FabricServiceProxyFactory
public FabricServiceProxyFactory()
Instantiates the ServiceProxyFactory with the specified remoting factory and retrysettings.
FabricServiceProxyFactory
public FabricServiceProxyFactory(Function
Instantiates the ServiceProxyFactory with the specified remoting factory and retrysettings.
Parameters:
Method Details
createServiceProxy
public
Creates a proxy to communicate to the specified service using the remoted interface<T>
</code> that the service implements.</p>
Overrides:
FabricServiceProxyFactory.createServiceProxy(Class<T> serviceInterfaceType, URI serviceUri)
Parameters:
serviceInterfaceType
- Interface type that is being remoted
serviceUri
- Uri of the Service.
Returns:
The proxy that implement the interface that is being remoted. The returned object also implement ServiceProxy interface.
createServiceProxy
public T createServiceProxy(Class 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>
Overrides:
FabricServiceProxyFactory.createServiceProxy(Class<T> serviceInterfaceType, URI serviceUri, ServicePartitionKey partitionKey, TargetReplicaSelector targetReplicaSelector, String listenerName)
Parameters:
serviceInterfaceType
- Interface type that is being remoted
serviceUri
- Uri of the Service.
partitionKey
- The Partition key that determines which service partition is responsible for handling requests from this service proxy.
targetReplicaSelector
- Determines which replica or instance of the service partition the client should connect to.
listenerName
- 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.
Returns:
The proxy that implement the interface that is being remoted. The returned object also implement ServiceProxy interface.
Applies to
Azure SDK for Java