IServerChannelSinkProvider インターフェイス
アセンブリ: mscorlib (mscorlib.dll 内)


チャネル シンクは、IServerChannelSinkProvider インターフェイスの実装をとおしてサーバー チャネルに接続されます。すべてのリモート処理サーバー チャネルには、パラメータとして IServerChannelSinkProvider を受け取るコンストラクタが用意されています。
チャネル シンク プロバイダはチェインに格納されます。外部のチャネル シンク プロバイダをチャネル コンストラクタに渡す場合は、その前にすべてのチャネル シンク プロバイダを 1 つのチェインにまとめます。この処理を実行できるようにするために、IServerChannelSinkProvider は Next というプロパティを提供します。
複数のチャネル シンク プロバイダが構成ファイルで指定されている場合、リモート処理インフラストラクチャは、構成ファイルに出現する順序でそれらのプロバイダをチェインに含めます。チャネル シンク プロバイダは、RemotingConfiguration.Configure 呼び出し中に、チャネルと同時に作成されます。
IMethodCallMessage が生成されると、.NET Framework は登録されたチャネルのリスト内を検索し、この呼び出しを処理できるチャネルを見つけます。適切なチャネルが見つかったら、そのチャネルからチャネル シンクが取得され、IMethodCallMessage が処理のためにそのシンクに転送されます。

public class ServerSinkProvider : IServerChannelSinkProvider { // The next provider in the chain. private IServerChannelSinkProvider nextProvider; public IServerChannelSinkProvider Next { [SecurityPermission(SecurityAction.LinkDemand, Flags = SecurityPermissionFlag.Infrastructure)] get { return(nextProvider); } [SecurityPermission(SecurityAction.LinkDemand, Flags = SecurityPermissionFlag.Infrastructure)] set { nextProvider = value; } } [SecurityPermission(SecurityAction.LinkDemand, Flags = SecurityPermissionFlag.Infrastructure)] public IServerChannelSink CreateSink (IChannelReceiver channel) { Console.WriteLine("Creating ServerSink"); // Create the next sink in the chain. IServerChannelSink nextSink = nextProvider.CreateSink(channel); // Hook our sink up to it. return( new ServerSink(nextSink) ); } [SecurityPermission(SecurityAction.LinkDemand, Flags = SecurityPermissionFlag.Infrastructure)] public void GetChannelData (IChannelDataStore channelData) {} // This constructor is required in order to use the provider in file-based configuration. // It need not do anything unless you want to use the information in the parameters. public ServerSinkProvider (IDictionary properties, ICollection providerData) {} }
[System::Security::Permissions::PermissionSet(System::Security:: Permissions::SecurityAction::Demand, Name = "FullTrust")] public ref class ServerSinkProvider: public IServerChannelSinkProvider { // The next provider in the chain. private: IServerChannelSinkProvider^ nextProvider; public: property IServerChannelSinkProvider^ Next { virtual IServerChannelSinkProvider^ get() { return (nextProvider); } virtual void set( IServerChannelSinkProvider^ value ) { nextProvider = value; } } virtual IServerChannelSink^ CreateSink( IChannelReceiver^ channel ) { Console::WriteLine( "Creating ServerSink" ); // Create the next sink in the chain. IServerChannelSink^ nextSink = nextProvider->CreateSink( channel ); // Hook our sink up to it. return (gcnew ServerSink( nextSink )); } virtual void GetChannelData( IChannelDataStore^ /*channelData*/ ){} // This constructor is required in order to use the provider in file-based configuration. // It need not do anything unless you want to use the information in the parameters. ServerSinkProvider( IDictionary^ /*properties*/, ICollection^ /*providerData*/ ){} };
/** @attribute SecurityPermission(SecurityAction.Demand, Flags = SecurityPermissionFlag.Infrastructure) */ public class ServerSinkProvider implements IServerChannelSinkProvider { // The next provider in the chain. private IServerChannelSinkProvider nextProvider; /** @property */ public IServerChannelSinkProvider get_Next() { return nextProvider; }//get_Next /** @property */ public void set_Next(IServerChannelSinkProvider value) { nextProvider = value; }//set_Next public IServerChannelSink CreateSink(IChannelReceiver channel) { Console.WriteLine("Creating ServerSink"); // Create the next sink in the chain. IServerChannelSink nextSink = nextProvider.CreateSink(channel); // Hook our sink up to it. return new ServerSink(nextSink); } //CreateSink public void GetChannelData(IChannelDataStore channelData) { } //GetChannelData // This constructor is required in order to use the provider in file-based //configuration. It need not do anything unless you want to use the // information in the parameters. public ServerSinkProvider(IDictionary properties, ICollection providerData) { } //ServerSinkProvider } //ServerSinkProvider
対応するサーバー シンクの実装例については、IServerChannelSink インターフェイスのドキュメントを参照してください。

Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


IServerChannelSinkProvider プロパティ
IServerChannelSinkProvider メソッド
IServerChannelSinkProvider メンバ
Weblioに収録されているすべての辞書からIServerChannelSinkProviderを検索する場合は、下記のリンクをクリックしてください。

- IServerChannelSinkProviderのページへのリンク