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

ActivatedServiceTypeEntry クラス

クライアントからの要求に基づいてアクティブにできる型として、サービス エンドで登録されたオブジェクト型の値を保持します。

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

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

現在のクラスは、RemotingConfiguration.RegisterActivatedServiceType メソッドで使用します。これは、RemotingConfiguration.RegisterActivatedClientType メソッドに対応するサーバー側のメソッドです。RegisterActivatedServiceType メソッドは、指定したオブジェクト型のクライアントによるリモート アクティベーションを許可するために、サーバーで使用されます。

クライアント側でアクティブ化されるオブジェクトをサーバーで作成するには、Type を確認し、RegisterActivatedServiceType メソッドを使用して、サーバー エンドで登録する必要があります。クライアント側でアクティブ化される新しいオブジェクトのプロキシを取得するには、クライアントは初めにそのチャネルを ChannelServices で登録してから、new または Activator.CreateInstance を呼び出して、そのオブジェクトをアクティブにする必要があります。

クライアント側でアクティブ化されるオブジェクトの型を new キーワードを使用してアクティブにするには、初めに RegisterActivatedClientType メソッドを使用して、そのオブジェクトの型をクライアント側で登録しておく必要があります。RegisterActivatedClientType を呼び出すと、new が作成しようとするリモート アプリケーションの場所がリモート処理インフラストラクチャに通知されます。一方、CreateInstance メソッドを使用して、クライアント側でアクティブ化されるオブジェクトの新しいインスタンスを作成する場合は、リモート アプリケーションの URL をパラメータで指定する必要があります。このため、クライアントでの事前の登録は必要ありません。CreateInstance メソッドに、オブジェクトを作成するサーバーの URL を指定するには、UrlAttribute クラスのインスタンスにその URL をカプセル化する必要があります。

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

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

Public Class MyClient
   
   Public Shared Sub Main()
      ChannelServices.RegisterChannel(New TcpChannel(8082))
      ' Create an instance of 'ActivatedServiceTypeEntry' class
      ' which holds the values for 'HelloServer' type.
      Dim myActivatedServiceTypeEntry As New
 ActivatedServiceTypeEntry(GetType(HelloServer))
      ' Register an object Type on the service end so that 
      ' it can be activated on request from a client.
      RemotingConfiguration.RegisterActivatedServiceType(myActivatedServiceTypeEntry)
      ' Get the registered activated service types .
      Dim myActivatedServiceEntries As ActivatedServiceTypeEntry()
 = RemotingConfiguration. _
                                                         GetRegisteredActivatedServiceTypes()
      Console.WriteLine("Information of first registered activated
 " + " service type :")
      Console.WriteLine("Object type: " + myActivatedServiceEntries(0).ObjectType.ToString())
      Console.WriteLine("Description: " + myActivatedServiceEntries(0).ToString())
      Console.WriteLine("Press enter to stop this process")
      Console.ReadLine()
   End Sub 'Main
End Class 'MyClient
using System;
using System.Runtime.Remoting;
using System.Runtime.Remoting.Channels;
using System.Runtime.Remoting.Channels.Tcp;

public class MyClient
{
   public static void Main()
   {
      ChannelServices.RegisterChannel(new TcpChannel(8082));
      // Create an instance of 'ActivatedServiceTypeEntry' class
      // which holds the values for 'HelloServer' type.
      ActivatedServiceTypeEntry myActivatedServiceTypeEntry =
                   new ActivatedServiceTypeEntry(typeof(HelloServer));
      // Register an object Type on the service end so that 
      // it can be activated on request from a client.
      RemotingConfiguration.RegisterActivatedServiceType(
                                         myActivatedServiceTypeEntry);
      // Get the registered activated service types .
      ActivatedServiceTypeEntry[] myActivatedServiceEntries =
          RemotingConfiguration.GetRegisteredActivatedServiceTypes();
      Console.WriteLine("Information of first registered activated "
                             +" service type :");
      Console.WriteLine("Object type: "
                       +myActivatedServiceEntries[0].ObjectType);
      Console.WriteLine("Description: " 
                           +myActivatedServiceEntries[0].ToString());
      Console.WriteLine("Press enter to stop this process");
      Console.ReadLine();
   }
}
#using <System.Runtime.Remoting.dll>
#using <ActivatedServiceTypeEntry_ObjectType_Share.dll>

using namespace System;
using namespace System::Runtime::Remoting;
using namespace System::Runtime::Remoting::Channels;
using namespace System::Runtime::Remoting::Channels::Tcp;
void main()
{
   ChannelServices::RegisterChannel( gcnew TcpChannel( 8082 ) );
   
   // Create an instance of 'ActivatedServiceTypeEntry' class
   // which holds the values for 'HelloServer' type.
   ActivatedServiceTypeEntry^ myActivatedServiceTypeEntry =
      gcnew ActivatedServiceTypeEntry( HelloServer::typeid );
   
   // Register an object Type on the service end so that 
   // it can be activated on request from a client.
   RemotingConfiguration::RegisterActivatedServiceType(
      myActivatedServiceTypeEntry );
   
   // Get the registered activated service types.
   array<ActivatedServiceTypeEntry^>^ activatedServiceEntries =
      RemotingConfiguration::GetRegisteredActivatedServiceTypes();
   Console::WriteLine( "Information of first registered activated" +
     " service type :" );
   Console::WriteLine( "Object type: {0}",
      activatedServiceEntries[ 0 ]->ObjectType->ToString() );
   Console::WriteLine( "Description: {0}",
      activatedServiceEntries[ 0 ]->ToString() );

   Console::WriteLine( "Press enter to stop this process"
 );
   Console::ReadLine();
}
import System.*;
import System.Runtime.Remoting.*;
import System.Runtime.Remoting.Channels.*;
import System.Runtime.Remoting.Channels.Tcp.*;

public class MyClient
{
    public static void main(String[]
 args)
    {
        ChannelServices.RegisterChannel(new TcpChannel(8082));

        // Create an instance of 'ActivatedServiceTypeEntry' class
        // which holds the values for 'HelloServer' type.
        ActivatedServiceTypeEntry myActivatedServiceTypeEntry = 
            new ActivatedServiceTypeEntry(HelloServer.class.ToType());

        // Register an object Type on the service end so that 
        // it can be activated on request from a client.
        RemotingConfiguration.RegisterActivatedServiceType(
            myActivatedServiceTypeEntry);

        // Get the registered activated service types.
        ActivatedServiceTypeEntry myActivatedServiceEntries[] = 
            RemotingConfiguration.GetRegisteredActivatedServiceTypes();

        Console.WriteLine("Information of first registered activated "
 
            + " service type :");
        Console.WriteLine("Object type: " 
            + ((ActivatedServiceTypeEntry)myActivatedServiceEntries.
            get_Item(0)).get_ObjectType());
        Console.WriteLine("Description: " 
            + myActivatedServiceEntries.get_Item(0).ToString());

        Console.WriteLine("Press enter to stop this process");
        Console.ReadLine();
    } //main
} //MyClient
継承階層継承階層
System.Object
   System.Runtime.Remoting.TypeEntry
    System.Runtime.Remoting.ActivatedServiceTypeEntry
スレッド セーフスレッド セーフ
この型の public static (Visual Basic では Shared) メンバはすべて、スレッド セーフです。インスタンス メンバの場合は、スレッド セーフであるとは限りません。
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
ActivatedServiceTypeEntry メンバ
System.Runtime.Remoting 名前空間
RegisterActivatedServiceType
その他の技術情報
クライアント アクティベーション

ActivatedServiceTypeEntry コンストラクタ (Type)


ActivatedServiceTypeEntry コンストラクタ

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

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

関連項目

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

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

指定した型名とアセンブリ名を使用して、ActivatedServiceTypeEntry クラスの新しいインスタンスを初期化します。

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

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

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

パラメータ

typeName

クライアント側でアクティブ化されるサービス型の型名。

assemblyName

クライアント側でアクティブ化されるサービス型のアセンブリ名。

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

ActivatedServiceTypeEntry プロパティ


ActivatedServiceTypeEntry メソッド


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

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

関連項目

ActivatedServiceTypeEntry クラス
System.Runtime.Remoting 名前空間
RegisterActivatedServiceType

その他の技術情報

クライアント アクティベーション

ActivatedServiceTypeEntry メンバ

クライアントからの要求に基づいてアクティブにできる型として、サービス エンドで登録されたオブジェクト型の値を保持します。

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


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

関連項目

ActivatedServiceTypeEntry クラス
System.Runtime.Remoting 名前空間
RegisterActivatedServiceType

その他の技術情報

クライアント アクティベーション



英和和英テキスト翻訳

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

辞書ショートカット

すべての辞書の索引

「ActivatedServiceTypeEntry」の関連用語

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

   

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



ActivatedServiceTypeEntryのページの著作権

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

©2026 GRAS Group, Inc.RSS