EndpointDispatcher クラス

定義

メッセージに対するランタイム拡張機能または変更をサービス アプリケーションに挿入できるようにするプロパティを公開するランタイム オブジェクトを表します。

public ref class EndpointDispatcher
public ref class EndpointDispatcher sealed
public class EndpointDispatcher
public sealed class EndpointDispatcher
type EndpointDispatcher = class
Public Class EndpointDispatcher
Public NotInheritable Class EndpointDispatcher
継承
EndpointDispatcher

次のコード例は、エンドポイントの EndpointDispatcher を検索するための System.ServiceModel.Dispatcher.DispatchRuntime の使用方法を示しています。

// IEndpointBehavior Members
public void AddBindingParameters(ServiceEndpoint serviceEndpoint, System.ServiceModel.Channels.BindingParameterCollection bindingParameters)
{
  return;
}

public void ApplyClientBehavior(ServiceEndpoint serviceEndpoint, ClientRuntime behavior)
{
  behavior.MessageInspectors.Add(new EndpointBehaviorMessageInspector());
}

public void ApplyDispatchBehavior(ServiceEndpoint serviceEndpoint, EndpointDispatcher endpointDispatcher)
{
  endpointDispatcher.DispatchRuntime.MessageInspectors.Add(new EndpointBehaviorMessageInspector());
}

public void Validate(ServiceEndpoint serviceEndpoint)
{
  return;
}

注釈

EndpointDispatcher クラスと System.ServiceModel.Dispatcher.DispatchRuntime クラスは、サービスのエンドポイントに対するランタイム カスタマイズ ポイントを公開します。 EndpointDispatcher を使用すると、処理できるメッセージおよび一部のエンドポイント関連情報を制御できます。 DispatchRuntime には、エンドポイント全体のランタイムにカスタム拡張機能を挿入するために使用できる多くのプロパティがあります。

メッセージの送信先アドレスが EndpointDispatcher プロパティに一致しており、メッセージ アクションが System.ServiceModel.Dispatcher.ChannelDispatcher プロパティに一致しているときは、AddressFilter オブジェクトが、ContractFilter から送信されたメッセージの処理を担当します。 2 つの EndpointDispatcher オブジェクトが 1 つのメッセージを受信する可能性があるときは、FilterPriority プロパティの値によって、優先度の高いエンドポイントが決まります。

EndpointDispatcher オブジェクトは、関連付けられた ChannelDispatcher からのメッセージの受信、メッセージ オブジェクトからパラメーターとして使用するオブジェクトへの変換、およびエンドポイント操作の呼び出しといったプロセス、およびこれらの逆のプロセスを、構成または拡張するために使用します。

通常、エンドポイントの EndpointDispatcherIEndpointBehavior インターフェイスを実装することで取得しますが、EndpointDispatcher には他の動作インターフェイスからでもアクセスできます。

次の EndpointDispatcher プロパティを使用できます。

  • AddressFilter プロパティを使用すると、エンドポイントが特定のメッセージを処理できるかどうかを識別するために MessageFilter が使用する ChannelDispatcher オブジェクトを取得または設定できます。

  • ChannelDispatcher プロパティは、関連付けられた ChannelDispatcher オブジェクトを取得します。このオブジェクトは EndpointDispatcher との間でメッセージを送受信し、このオブジェクトを使用することで他のチャネル関連の値や動作を検査または変更できます。

  • ContractFilter は、メッセージがこのコントラクトに宛てられたものかどうかの識別に使用する MessageFilter オブジェクトを取得します。

  • ContractName および ContractNamespace プロパティは、エンドポイント コントラクトの名前と名前空間を返します。

  • DispatchRuntime プロパティが返す DispatchRuntime オブジェクトを使用すると、ランタイム値を変更したり、エンドポイント全体に関するカスタム ランタイム機能拡張を挿入したりできます。

  • EndpointAddress プロパティは、エンドポイントのアドレスを取得します。

  • FilterPriority プロパティは、複合フィルターの優先順位を返します。ChannelDispatcher はこれを使用して、メッセージを処理するエンドポイントを決定します。

コンストラクター

EndpointDispatcher(EndpointAddress, String, String)

指定したアドレス、コントラクト名、およびコントラクト名前空間で、EndpointDispatcher クラスの新しいインスタンスを初期化します。

EndpointDispatcher(EndpointAddress, String, String, Boolean)

指定したアドレス、コントラクト名、およびコントラクト名前空間を使用し、エンドポイントがパブリック システム エンドポイントかどうかに従って、EndpointDispatcher クラスの新しいインスタンスを初期化します。

プロパティ

AddressFilter

特定のメッセージがそのアドレス宛てのものかどうかの識別に使用する MessageFilter オブジェクトを取得または設定します。

ChannelDispatcher

関連付けられた ChannelDispatcher オブジェクトを取得します。このオブジェクトを使用すると、チャネル関連の他の値や動作を検査または変更できます。

ContractFilter

メッセージがこのコントラクトに宛てられたものかどうかの識別に使用する MessageFilter オブジェクトを取得または設定します。

ContractName

エンドポイント コントラクトの名前を取得します。

ContractNamespace

エンドポイント コントラクトの名前空間を取得します。

DispatchRuntime

サービス エンドポイントまたはクライアント コールバック エンドポイント全体のランタイム動作を検査、変更、または拡張するために使用する DispatchRuntime オブジェクトを取得します。

EndpointAddress

エンドポイントのアドレスを取得します。

FilterPriority

ContractFilter がエンドポイントを選択するときの、AddressFilterChannelDispatcher の組み合わせの優先順位を取得または設定します。

IsSystemEndpoint

エンドポイントがユーザーではなくサーバーによって内部で作成されたかどうかを示す値を取得します。

メソッド

Equals(Object)

指定されたオブジェクトが現在のオブジェクトと等しいかどうかを判断します。

(継承元 Object)
GetHashCode()

既定のハッシュ関数として機能します。

(継承元 Object)
GetType()

現在のインスタンスの Type を取得します。

(継承元 Object)
MemberwiseClone()

現在の Object の簡易コピーを作成します。

(継承元 Object)
ToString()

現在のオブジェクトを表す文字列を返します。

(継承元 Object)

適用対象