FabricServiceProxyFactory クラス

  • java.lang.Object
    • ServiceProxyFactory
      • microsoft.servicefabric.services.remoting.client.FabricServiceProxyFactory

public class FabricServiceProxyFactory implements ServiceProxyFactory

指定したサービスへのリモート通信用のプロキシを作成するファクトリを指定します。

コンストラクターの概要

コンストラクター 説明
FabricServiceProxyFactory()

指定したリモート処理ファクトリと再試行を使用して ServiceProxyFactory をインスタンス化します。

FabricServiceProxyFactory(Function<ServiceRemotingCallbackClient, ServiceRemotingClientFactory> createServiceRemotingClientFactory, OperationRetrySettings retrySettings)

指定したリモート処理ファクトリと再試行を使用して ServiceProxyFactory をインスタンス化します。

メソッドの概要

修飾子と型 メソッドと説明
<T extends Service> T createServiceProxy(Class<T> serviceInterfaceType, URI serviceUri)

リモート インターフェイス T を使用して指定されたサービスと通信するプロキシを作成します<> 

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

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

リモート インターフェイス T を使用して指定されたサービスと通信するプロキシを作成します<> 

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

コンストラクターの詳細

FabricServiceProxyFactory

public FabricServiceProxyFactory()

指定したリモート処理ファクトリと再試行を使用して ServiceProxyFactory をインスタンス化します。

FabricServiceProxyFactory

public FabricServiceProxyFactory(Function createServiceRemotingClientFactory, OperationRetrySettings retrySettings)

指定したリモート処理ファクトリと再試行を使用して ServiceProxyFactory をインスタンス化します。

パラメーター:

createServiceRemotingClientFactory - リモート処理クライアント ファクトリを作成するファクトリ メソッドを指定します。 このメソッドから取得したリモート処理クライアント ファクトリは、ServiceProxyFactory にキャッシュされます。
retrySettings - このファクトリによって作成されたプロキシを使用するときに表示される例外で使用する再試行ポリシーを指定します

メソッドの詳細

createServiceProxy

public T createServiceProxy(Class serviceInterfaceType, URI serviceUri)

リモート インターフェイス T を使用して指定されたサービスと通信するプロキシを作成します<> 

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

上書き:

FabricServiceProxyFactory.createServiceProxy(Class<T> serviceInterfaceType, URI serviceUri)

パラメーター:

serviceInterfaceType - リモート化されているインターフェイスの種類
serviceUri - サービスの URI。

戻り値:

リモート化されているインターフェイスを実装するプロキシ。 返されるオブジェクトは、インターフェイスも実装 ServiceProxy します。

createServiceProxy

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

リモート インターフェイス T を使用して指定されたサービスと通信するプロキシを作成します<> 

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

上書き:

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

パラメーター:

serviceInterfaceType - リモート化されているインターフェイスの種類
serviceUri - サービスの URI。
partitionKey - このサービス プロキシからの要求を処理するサービス パーティションを決定するパーティション キー。
targetReplicaSelector - クライアントが接続するサービス パーティションのレプリカまたはインスタンスを決定します。
listenerName - サービスに 1 つの通信リスナーがある場合、このパラメーターは省略可能です。 サービスのエンドポイントは、{"Endpoints":{"Listener1":"Endpoint1","Listener2":"Endpoint2" ...}} の形式です。 サービスが複数のエンドポイントを公開する場合、このパラメーターはリモート処理通信に使用するエンドポイントを識別します。

戻り値:

リモート化されているインターフェイスを実装するプロキシ。 返されるオブジェクトは、インターフェイスも実装 ServiceProxy します。

適用対象