WellKnownClientTypeEntryとは? わかりやすく解説

WellKnownClientTypeEntry クラス

サーバー側でアクティブ化される型 (単一呼び出しまたはシングルトン) としてクライアント登録されオブジェクト型の値を保持します

名前空間: System.Runtime.Remoting
アセンブリ: mscorlib (mscorlib.dll 内)
構文構文

<ComVisibleAttribute(True)> _
Public Class WellKnownClientTypeEntry
    Inherits TypeEntry
Dim instance As WellKnownClientTypeEntry
[ComVisibleAttribute(true)] 
public class WellKnownClientTypeEntry : TypeEntry
[ComVisibleAttribute(true)] 
public ref class WellKnownClientTypeEntry :
 public TypeEntry
/** @attribute ComVisibleAttribute(true) */ 
public class WellKnownClientTypeEntry extends
 TypeEntry
ComVisibleAttribute(true) 
public class WellKnownClientTypeEntry extends
 TypeEntry
解説解説

サーバー側でアクティブ化される型には、単一呼び出しまたはシングルトンありますクラス単一呼び出し型として登録されている場合は、クライアントからの呼び出し到達するたびに、新しインスタンス作成されます。シングルトン オブジェクトすべての呼び出しは、オブジェクト収集されていない限り、そのオブジェクト1 つインスタンスによって処理されます。

登録されサーバー側でアクティブ化されるオブジェクトURI知っているすべてのクライアントは、ChannelServices で優先するチャネル登録しnew または Activator.GetObject を呼び出してそのオブジェクトアクティブにすることにより、このオブジェクト対すプロキシ取得できますnewサーバー側でアクティブ化されるオブジェクトアクティブにするには、初めに RegisterWellKnownClientType メソッド使用して、そのサーバー側でアクティブ化されるオブジェクトの型をクライアント側登録しておく必要がありますRegisterWellKnownClientType呼び出すと、new キーワードに作成許可するリモート オブジェクトの場所がリモート処理インフラストラクチャ通知されます。一方Activator.GetObject メソッド使用してサーバー側でアクティブ化されるオブジェクトアクティブにする場合は、そのオブジェクトURL引数として指定する必要がありますこのためクライアント側での事前の登録は必要ありません。

サーバー側でアクティブ化されるオブジェクトリモート オブジェクト アクティベーション詳細については、「リモート オブジェクトアクティべーション」を参照してください

使用例使用例
Imports System
Imports System.Runtime.Remoting
Imports System.Runtime.Remoting.Channels
Imports System.Runtime.Remoting.Channels.Http

Public Class MyClient
   
   Public Shared Sub Main()
      ' Create a 'HttpChannel' object and  register with channel services.
      ChannelServices.RegisterChannel(New HttpChannel())
      Console.WriteLine(" Start calling from Client One.......")
      Dim myWellKnownClientTypeEntry As New
 WellKnownClientTypeEntry(GetType(HelloServer), _ 
                                                  "http://localhost:8086/SayHello")
      myWellKnownClientTypeEntry.ApplicationUrl = "http://localhost:8086/SayHello"
      RemotingConfiguration.RegisterWellKnownClientType(myWellKnownClientTypeEntry)
      ' Get the proxy object for the remote object.
      Dim myHelloServerObject As New
 HelloServer()
      ' Retrieve an array of object types registered on the 
      ' client end as well-known types.
      Dim myWellKnownClientTypeEntryCollection As
 WellKnownClientTypeEntry() = _ 
                                       RemotingConfiguration.GetRegisteredWellKnownClientTypes()
      Console.WriteLine("The Application Url to activate the Remote
 Object :" + _ 
                                           myWellKnownClientTypeEntryCollection(0).ApplicationUrl)
      Console.WriteLine("The 'WellKnownClientTypeEntry' object
 :" + _ 
                                              myWellKnownClientTypeEntryCollection(0).ToString())
      ' Make remote method calls.
      Dim i As Integer
      For i = 0 To 4
         Console.WriteLine(myHelloServerObject.HelloMethod(" Client
 One"))
      Next i
   End Sub 'Main
End Class 'MyClient 
using System;
using System.Runtime.Remoting;
using System.Runtime.Remoting.Channels;
using System.Runtime.Remoting.Channels.Http;

public class MyClient 
{
   public static void Main()
   {
   // Create a 'HttpChannel' object and  register with channel services.
   ChannelServices.RegisterChannel(new HttpChannel());
   Console.WriteLine(" Start calling from Client One.......");
   WellKnownClientTypeEntry myWellKnownClientTypeEntry = 
                  new WellKnownClientTypeEntry(typeof(HelloServer)
,
                                  "http://localhost:8086/SayHello");
   myWellKnownClientTypeEntry.ApplicationUrl="http://localhost:8086/SayHello";
   RemotingConfiguration.RegisterWellKnownClientType(myWellKnownClientTypeEntry);
   // Get the proxy object for the remote object.
   HelloServer myHelloServerObject = new HelloServer();
   // Retrieve an array of object types registered on the 
   // client end as well-known types.
   WellKnownClientTypeEntry [] myWellKnownClientTypeEntryCollection = 
          RemotingConfiguration.GetRegisteredWellKnownClientTypes();
   Console.WriteLine("The Application Url to activate the Remote Object :"
        +myWellKnownClientTypeEntryCollection[0].ApplicationUrl);
   Console.WriteLine("The 'WellKnownClientTypeEntry' object :"
            +myWellKnownClientTypeEntryCollection[0].ToString());
   // Make remote method calls.
   for (int i = 0; i < 5; i++)
         Console.WriteLine(myHelloServerObject.HelloMethod(" Client One"));
   }
}
#using <System.Runtime.Remoting.dll>
#using <System.dll>
#using <WellKnownClientTypeEntry_Share.dll>

using namespace System;
using namespace System::Runtime::Remoting;
using namespace System::Runtime::Remoting::Channels;
using namespace System::Runtime::Remoting::Channels::Http;

int main()
{
   // Create a 'HttpChannel' object and  register with channel services.
   ChannelServices::RegisterChannel( gcnew HttpChannel );
   Console::WriteLine( " Start calling from Client One......." );
   WellKnownClientTypeEntry^ myWellKnownClientTypeEntry = gcnew WellKnownClientTypeEntry(
 HelloServer::typeid,"http://localhost:8086/SayHello" );
   myWellKnownClientTypeEntry->ApplicationUrl = "http://localhost:8086/SayHello";
   RemotingConfiguration::RegisterWellKnownClientType( myWellKnownClientTypeEntry
 );

   // Get the proxy object for the remote object.
   HelloServer^ myHelloServerObject = gcnew HelloServer;

   // Retrieve an array of object types registered on the 
   // client end as well-known types.
   array<WellKnownClientTypeEntry^>^myWellKnownClientTypeEntryCollection =
 RemotingConfiguration::GetRegisteredWellKnownClientTypes();
   Console::WriteLine( "The Application Url to activate the Remote Object :{0}",
 myWellKnownClientTypeEntryCollection[ 0 ]->ApplicationUrl );
   Console::WriteLine( "The 'WellKnownClientTypeEntry' object :{0}", myWellKnownClientTypeEntryCollection[
 0 ] );

   // Make remote method calls.
   for ( int i = 0; i < 5; i++ )
      Console::WriteLine( myHelloServerObject->HelloMethod( " Client One"
 ) );
}
import System.*;
import System.Runtime.Remoting.*;
import System.Runtime.Remoting.Channels.*;
import System.Runtime.Remoting.Channels.Http.*;

public class MyClient
{
    public static void main(String[]
 args)
    {
        // Create a 'HttpChannel' object and  register with channel
 services.
        ChannelServices.RegisterChannel(new HttpChannel());
        Console.WriteLine(" Start calling from Client One.......");
        WellKnownClientTypeEntry myWellKnownClientTypeEntry = 
            new WellKnownClientTypeEntry(HelloServer.class.ToType()
,
            "http://localhost:8086/SayHello");
        myWellKnownClientTypeEntry.
            set_ApplicationUrl("http://localhost:8086/SayHello");
        RemotingConfiguration.RegisterWellKnownClientType(
            myWellKnownClientTypeEntry);
        // Get the proxy object for the remote object.
        HelloServer myHelloServerObject = new HelloServer();
        // Retrieve an array of object types registered on the 
        // client end as well-known types.
        WellKnownClientTypeEntry myWellKnownClientTypeEntryCollection[] =
            RemotingConfiguration.GetRegisteredWellKnownClientTypes();
        Console.WriteLine("The Application Url to activate the Remote Object
 :" 
            + myWellKnownClientTypeEntryCollection[0].get_ApplicationUrl());
        Console.WriteLine("The 'WellKnownClientTypeEntry' object :" 
            + myWellKnownClientTypeEntryCollection.get_Item(0).ToString());
        // Make remote method calls.
        for (int i = 0; i < 5; i++) {
            Console.WriteLine(myHelloServerObject.HelloMethod(" Client One"));
        }
    } //main
} //MyClient
継承階層継承階層
System.Object
   System.Runtime.Remoting.TypeEntry
    System.Runtime.Remoting.WellKnownClientTypeEntry
スレッド セーフスレッド セーフ
この型の public static (Visual Basic では Shared) メンバはすべて、スレッド セーフです。インスタンス メンバ場合は、スレッド セーフであるとは限りません。
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
WellKnownClientTypeEntry メンバ
System.Runtime.Remoting 名前空間
RegisterWellKnownClientType
その他の技術情報
サーバー アクティベーション

WellKnownClientTypeEntry コンストラクタ (String, String, String)

指定した型、アセンブリ名、および URL使用して、WellKnownClientTypeEntry クラス新しインスタンス初期化します。

名前空間: System.Runtime.Remoting
アセンブリ: mscorlib (mscorlib.dll 内)
構文構文

Public Sub New ( _
    typeName As String, _
    assemblyName As String, _
    objectUrl As String _
)
Dim typeName As String
Dim assemblyName As String
Dim objectUrl As String

Dim instance As New WellKnownClientTypeEntry(typeName,
 assemblyName, objectUrl)
public WellKnownClientTypeEntry (
    string typeName,
    string assemblyName,
    string objectUrl
)
public:
WellKnownClientTypeEntry (
    String^ typeName, 
    String^ assemblyName, 
    String^ objectUrl
)
public WellKnownClientTypeEntry (
    String typeName, 
    String assemblyName, 
    String objectUrl
)
public function WellKnownClientTypeEntry (
    typeName : String, 
    assemblyName : String, 
    objectUrl : String
)

パラメータ

typeName

サーバー側でアクティブ化される型の型名

assemblyName

サーバー側でアクティブ化される型のアセンブリ名

objectUrl

サーバー側でアクティブ化される型の URL

プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
WellKnownClientTypeEntry クラス
WellKnownClientTypeEntry メンバ
System.Runtime.Remoting 名前空間

WellKnownClientTypeEntry コンストラクタ (Type, String)

指定した型と URL使用して、WellKnownClientTypeEntry クラス新しインスタンス初期化します。

名前空間: System.Runtime.Remoting
アセンブリ: mscorlib (mscorlib.dll 内)
構文構文

Public Sub New ( _
    type As Type, _
    objectUrl As String _
)
Dim type As Type
Dim objectUrl As String

Dim instance As New WellKnownClientTypeEntry(type,
 objectUrl)
public WellKnownClientTypeEntry (
    Type type,
    string objectUrl
)
public:
WellKnownClientTypeEntry (
    Type^ type, 
    String^ objectUrl
)
public WellKnownClientTypeEntry (
    Type type, 
    String objectUrl
)
public function WellKnownClientTypeEntry (
    type : Type, 
    objectUrl : String
)

パラメータ

type

サーバー側でアクティブ化される型の Type

objectUrl

サーバー側でアクティブ化される型の URL

プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
WellKnownClientTypeEntry クラス
WellKnownClientTypeEntry メンバ
System.Runtime.Remoting 名前空間

WellKnownClientTypeEntry コンストラクタ

WellKnownClientTypeEntry クラス新しインスタンス初期化します。
オーバーロードの一覧オーバーロードの一覧

名前 説明
WellKnownClientTypeEntry (Type, String) 指定した型と URL使用してWellKnownClientTypeEntry クラス新しインスタンス初期化します。
WellKnownClientTypeEntry (String, String, String) 指定した型、アセンブリ名、および URL使用してWellKnownClientTypeEntry クラス新しインスタンス初期化します。
参照参照

関連項目

WellKnownClientTypeEntry クラス
WellKnownClientTypeEntry メンバ
System.Runtime.Remoting 名前空間

WellKnownClientTypeEntry プロパティ


WellKnownClientTypeEntry メソッド


パブリック メソッドパブリック メソッド

プロテクト メソッドプロテクト メソッド
参照参照

関連項目

WellKnownClientTypeEntry クラス
System.Runtime.Remoting 名前空間
RegisterWellKnownClientType

その他の技術情報

サーバー アクティベーション

WellKnownClientTypeEntry メンバ

サーバー側でアクティブ化される型 (単一呼び出しまたはシングルトン) としてクライアント登録されオブジェクト型の値を保持します

WellKnownClientTypeEntry データ型公開されるメンバを以下の表に示します


パブリック コンストラクタパブリック コンストラクタ
  名前 説明
パブリック メソッド WellKnownClientTypeEntry オーバーロードされます。 WellKnownClientTypeEntry クラス新しインスタンス初期化します。
パブリック プロパティパブリック プロパティ
パブリック メソッドパブリック メソッド
プロテクト メソッドプロテクト メソッド
参照参照

関連項目

WellKnownClientTypeEntry クラス
System.Runtime.Remoting 名前空間
RegisterWellKnownClientType

その他の技術情報

サーバー アクティベーション



英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

「WellKnownClientTypeEntry」の関連用語

WellKnownClientTypeEntryのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



WellKnownClientTypeEntryのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2025 Microsoft.All rights reserved.

©2025 GRAS Group, Inc.RSS