WellKnownServiceTypeEntryとは何? わかりやすく解説 Weblio辞書 (original) (raw)

WellKnownServiceTypeEntry クラス

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

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

Visual Basic (宣言)

<ComVisibleAttribute(True)> _ Public Class WellKnownServiceTypeEntry Inherits TypeEntry

Visual Basic (使用法)

Dim instance As WellKnownServiceTypeEntry

C#

[ComVisibleAttribute(true)] public class WellKnownServiceTypeEntry : TypeEntry

C++

[ComVisibleAttribute(true)] public ref class WellKnownServiceTypeEntry : public TypeEntry

J#

/** @attribute ComVisibleAttribute(true) */ public class WellKnownServiceTypeEntry extends TypeEntry

JScript

ComVisibleAttribute(true) public class WellKnownServiceTypeEntry extends TypeEntry

解説解説

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

このオブジェクトURI知っているすべてのクライアントは、ChannelServices で優先するチャネル登録し、**new** または Activator.GetObject を呼び出してそのオブジェクトアクティブにすることにより、このオブジェクト用にプロキシ取得できます

登録処理によって、リモート オブジェクト自体作成されないことに注意してください。これはクライアントオブジェクト上のメソッド呼び出そうとしたり、クライアント側からオブジェクトアクティブにしたりする場合にだけ発生します

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

使用例使用例

Visual Basic

Imports System Imports System.Runtime.Remoting Imports System.Runtime.Remoting.Channels Imports System.Runtime.Remoting.Channels.Http

Public Class MyServer

Public Shared Sub Main() ' Create a 'HttpChannel' object and register it with the ' channel services. ChannelServices.RegisterChannel(New HttpChannel(8086)) ' Record the 'HelloServer' type as 'Singleton' well-known type. Dim myWellKnownServiceTypeEntry As New WellKnownServiceTypeEntry(GetType(HelloServer), _ "SayHello", WellKnownObjectMode.Singleton) ' Register the remote object as well-known type. RemotingConfiguration.RegisterWellKnownServiceType(myWellKnownServiceTypeEntry) ' Retrieve object types registered on the service end ' as well-known types. Dim myWellKnownServiceTypeEntryCollection As WellKnownServiceTypeEntry() = _ RemotingConfiguration.GetRegisteredWellKnownServiceTypes() Console.WriteLine("The 'WellKnownObjectMode' of the remote object : " + _ myWellKnownServiceTypeEntryCollection(0).Mode.ToString()) Console.WriteLine("The 'WellKnownServiceTypeEntry' object: " + _ myWellKnownServiceTypeEntryCollection(0).ToString()) Console.WriteLine("Started the Server, Hit <enter> to exit...") Console.ReadLine() End Sub 'Main End Class 'MyServer

C#

using System; using System.Runtime.Remoting; using System.Runtime.Remoting.Channels; using System.Runtime.Remoting.Channels.Http;

public class MyServer { public static void Main()

{ // Create a 'HttpChannel' object and register it with the // channel services. ChannelServices.RegisterChannel(new HttpChannel(8086)); // Record the 'HelloServer' type as 'Singleton' well-known type. WellKnownServiceTypeEntry myWellKnownServiceTypeEntry= new WellKnownServiceTypeEntry(typeof(HelloServer), "SayHello", WellKnownObjectMode.Singleton); // Register the remote object as well-known type. RemotingConfiguration.RegisterWellKnownServiceType( myWellKnownServiceTypeEntry); // Retrieve object types registered on the service end // as well-known types. WellKnownServiceTypeEntry [] myWellKnownServiceTypeEntryCollection = RemotingConfiguration.GetRegisteredWellKnownServiceTypes(); Console.WriteLine("The 'WellKnownObjectMode' of the remote object : " +myWellKnownServiceTypeEntryCollection[0].Mode); Console.WriteLine("The 'WellKnownServiceTypeEntry' object: "+ myWellKnownServiceTypeEntryCollection[0].ToString()); Console.WriteLine("Started the Server, Hit <enter> to exit..."); Console.ReadLine(); } }

C++

#using <System.Runtime.Remoting.dll> #using <System.dll> #using <WellKnownServiceTypeEntry_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 it with the // channel services. ChannelServices::RegisterChannel( gcnew HttpChannel( 8086 ) );

// Record the 'HelloServer' type as 'Singleton' well-known type. WellKnownServiceTypeEntry^ myWellKnownServiceTypeEntry = gcnew WellKnownServiceTypeEntry( HelloServer::typeid,"SayHello",WellKnownObjectMode::Singleton );

// Register the remote object as well-known type. RemotingConfiguration::RegisterWellKnownServiceType( myWellKnownServiceTypeEntry );

// Retrieve object types registered on the service end // as well-known types. array<WellKnownServiceTypeEntry^>^myWellKnownServiceTypeEntryCollection = RemotingConfiguration::GetRegisteredWellKnownServiceTypes(); Console::WriteLine( "The 'WellKnownObjectMode' of the remote object : {0}", myWellKnownServiceTypeEntryCollection[ 0 ]->Mode ); Console::WriteLine( "The 'WellKnownServiceTypeEntry' object: {0}", myWellKnownServiceTypeEntryCollection[ 0 ] ); Console::WriteLine( "Started the Server, Hit <enter> to exit..." ); Console::ReadLine(); }

J#

import System.; import System.Runtime.Remoting.; import System.Runtime.Remoting.Channels.; import System.Runtime.Remoting.Channels.Http.;

public class MyServer { public static void main(String[] args) { // Create a 'HttpChannel' object and register it with the // channel services. ChannelServices.RegisterChannel(new HttpChannel(8086)); // Record the 'HelloServer' type as 'Singleton' well-known type. WellKnownServiceTypeEntry myWellKnownServiceTypeEntry = new WellKnownServiceTypeEntry(HelloServer.class.ToType() , "SayHello", WellKnownObjectMode.Singleton); // Register the remote object as well-known type. RemotingConfiguration.RegisterWellKnownServiceType( myWellKnownServiceTypeEntry); // Retrieve object types registered on the service end // as well-known types. WellKnownServiceTypeEntry myWellKnownServiceTypeEntryCollection[] = RemotingConfiguration.GetRegisteredWellKnownServiceTypes(); Console.WriteLine("The 'WellKnownObjectMode' of the remote object : " + myWellKnownServiceTypeEntryCollection[0].get_Mode()); Console.WriteLine("The 'WellKnownServiceTypeEntry' object: " + myWellKnownServiceTypeEntryCollection.get_Item(0).ToString()); Console.WriteLine("Started the Server, Hit <enter> to exit..."); Console.ReadLine(); } //main } //MyServer

継承階層継承階層

System.Object
System.Runtime.Remoting.TypeEntry
System.Runtime.Remoting.WellKnownServiceTypeEntry

スレッド セーフスレッド セーフ

この型の public static (Visual Basic では Shared) メンバはすべて、スレッド セーフです。インスタンス メンバ場合は、スレッド セーフであるとは限りません。

プラットフォームプラットフォーム

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 によってサポートされていないバージョンありますサポートされているバージョンについては、「システム要件」を参照してください

バージョン情報バージョン情報

.NET Framework
サポート対象 : 2.01.11.0

参照参照

関連項目
WellKnownServiceTypeEntry メンバ
System.Runtime.Remoting 名前空間
RegisterWellKnownServiceType
その他の技術情報
サーバー アクティベーション


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

指定した **Type**、オブジェクト URI、および WellKnownObjectMode使用して、WellKnownServiceTypeEntry クラス新しインスタンス初期化します。

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

Visual Basic (宣言)

Public Sub New ( _ type As Type, _ objectUri As String, _ mode As WellKnownObjectMode _ )

Visual Basic (使用法)

Dim type As Type Dim objectUri As String Dim mode As WellKnownObjectMode

Dim instance As New WellKnownServiceTypeEntry(type, objectUri, mode)

C#

public WellKnownServiceTypeEntry ( Type type, string objectUri, WellKnownObjectMode mode )

C++

public: WellKnownServiceTypeEntry ( Type^ type, String^ objectUri, WellKnownObjectMode mode )

J#

public WellKnownServiceTypeEntry ( Type type, String objectUri, WellKnownObjectMode mode )

JScript

public function WellKnownServiceTypeEntry ( type : Type, objectUri : String, mode : WellKnownObjectMode )

パラメータ

type

サーバー側でアクティブ化されるサービスオブジェクトType

objectUri

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

mode

オブジェクトアクティブにする方法定義している型の WellKnownObjectMode。

プラットフォームプラットフォーム

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 によってサポートされていないバージョンありますサポートされているバージョンについては、「システム要件」を参照してください

バージョン情報バージョン情報

.NET Framework
サポート対象 : 2.01.11.0

参照参照

関連項目
WellKnownServiceTypeEntry クラス
WellKnownServiceTypeEntry メンバ
System.Runtime.Remoting 名前空間


WellKnownServiceTypeEntry コンストラクタ

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

名前 説明
WellKnownServiceTypeEntry (Type, String, WellKnownObjectMode) 指定した Typeオブジェクト URI、および WellKnownObjectMode を使用してWellKnownServiceTypeEntry クラス新しインスタンス初期化します。
WellKnownServiceTypeEntry (String, String, String, WellKnownObjectMode) 指定した型名アセンブリ名オブジェクト URI、および WellKnownObjectMode使用してWellKnownServiceTypeEntry クラス新しインスタンス初期化します。

参照参照

関連項目

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


WellKnownServiceTypeEntry コンストラクタ (String, String, String, WellKnownObjectMode)

指定した型名アセンブリ名オブジェクト URI、および WellKnownObjectMode使用して、WellKnownServiceTypeEntry クラス新しインスタンス初期化します。

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

Visual Basic (宣言)

Public Sub New ( _ typeName As String, _ assemblyName As String, _ objectUri As String, _ mode As WellKnownObjectMode _ )

Visual Basic (使用法)

Dim typeName As String Dim assemblyName As String Dim objectUri As String Dim mode As WellKnownObjectMode

Dim instance As New WellKnownServiceTypeEntry(typeName, assemblyName, objectUri, mode)

C#

public WellKnownServiceTypeEntry ( string typeName, string assemblyName, string objectUri, WellKnownObjectMode mode )

C++

public: WellKnownServiceTypeEntry ( String^ typeName, String^ assemblyName, String^ objectUri, WellKnownObjectMode mode )

J#

public WellKnownServiceTypeEntry ( String typeName, String assemblyName, String objectUri, WellKnownObjectMode mode )

JScript

public function WellKnownServiceTypeEntry ( typeName : String, assemblyName : String, objectUri : String, mode : WellKnownObjectMode )

パラメータ

typeName

サーバー側でアクティブ化されるサービス型の完全な型名

assemblyName

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

objectUri

サーバー側でアクティブ化されるオブジェクトURI

mode

オブジェクトアクティブにする方法定義している型の WellKnownObjectMode。

プラットフォームプラットフォーム

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 によってサポートされていないバージョンありますサポートされているバージョンについては、「システム要件」を参照してください

バージョン情報バージョン情報

.NET Framework
サポート対象 : 2.01.11.0

参照参照

関連項目
WellKnownServiceTypeEntry クラス
WellKnownServiceTypeEntry メンバ
System.Runtime.Remoting 名前空間


WellKnownServiceTypeEntry プロパティ

パブリック プロパティパブリック プロパティ

| | 名前 | 説明 | | | --------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | パブリック プロパティ | AssemblyName | リモート アクティブ型になるように構成されオブジェクト型アセンブリ名取得します。 ( TypeEntry から継承されます。) | | パブリック プロパティ | ContextAttributes | サーバー側でアクティブ化されるサービス型のコンテキスト属性取得または設定します。 | | パブリック プロパティ | Mode | サーバー側でアクティブ化されるサービス型の WellKnownObjectMode を取得します。 | | パブリック プロパティ | ObjectType | サーバー側でアクティブ化されるサービス型の Type取得します。 | | パブリック プロパティ | ObjectUri | 既知サービス型の URI取得します。 | | パブリック プロパティ | TypeName | リモート アクティブ型になるように構成されオブジェクト型の完全な型名取得します。 ( TypeEntry から継承されます。) |

参照参照

関連項目

WellKnownServiceTypeEntry クラス
System.Runtime.Remoting 名前空間
RegisterWellKnownServiceType

その他の技術情報

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


WellKnownServiceTypeEntry メソッド

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

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

| | 名前 | 説明 | | | ------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | パブリック メソッド | Equals | オーバーロードされます2 つObject インスタンス等しかどうか判断します。 (Object から継承されます。) | | パブリック メソッド | GetHashCode | 特定の型のハッシュ関数として機能します。GetHashCode は、ハッシュ アルゴリズムや、ハッシュ テーブルのようなデータ構造での使用適してます。 (Object から継承されます。) | | パブリック メソッド | GetType | 現在のインスタンスType取得します。 (Object から継承されます。) | | パブリック メソッド | ReferenceEquals | 指定した複数Object インスタンス同一かどうか判断します。 (Object から継承されます。) | | パブリック メソッド | ToString | オーバーライドされますサーバー側でアクティブ化される型の型名アセンブリ名オブジェクト URI、および WellKnownObjectMode を String として返します。 |

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

| | 名前 | 説明 | | | ------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | プロテクト メソッド | Finalize | Objectガベージ コレクションにより収集される前に、その Objectリソース解放しその他のクリーンアップ操作実行できるようにします。 (Object から継承されます。) | | プロテクト メソッド | MemberwiseClone | 現在の Object簡易コピー作成します。 (Object から継承されます。) |

参照参照

関連項目

WellKnownServiceTypeEntry クラス
System.Runtime.Remoting 名前空間
RegisterWellKnownServiceType

その他の技術情報

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


WellKnownServiceTypeEntry メンバ

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

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

パブリック コンストラクタパブリック コンストラクタ

| | 名前 | 説明 | | | ------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | パブリック メソッド | WellKnownServiceTypeEntry | オーバーロードされます。 WellKnownServiceTypeEntry クラス新しインスタンス初期化します。 |

パブリック プロパティパブリック プロパティ

| | 名前 | 説明 | | | --------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | パブリック プロパティ | AssemblyName | リモート アクティブ型になるように構成されオブジェクト型アセンブリ名取得します。(TypeEntry から継承されます。) | | パブリック プロパティ | ContextAttributes | サーバー側でアクティブ化されるサービス型のコンテキスト属性取得または設定します。 | | パブリック プロパティ | Mode | サーバー側でアクティブ化されるサービス型の WellKnownObjectMode取得します。 | | パブリック プロパティ | ObjectType | サーバー側でアクティブ化されるサービス型の Type取得します。 | | パブリック プロパティ | ObjectUri | 既知サービス型の URI取得します。 | | パブリック プロパティ | TypeName | リモート アクティブ型になるように構成されオブジェクト型の完全な型名取得します。(TypeEntry から継承されます。) |

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

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

| | 名前 | 説明 | | | ------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | パブリック メソッド | Equals | オーバーロードされます2 つObject インスタンス等しかどうか判断します。 (Object から継承されます。) | | パブリック メソッド | GetHashCode | 特定の型のハッシュ関数として機能します。GetHashCode は、ハッシュ アルゴリズムや、ハッシュ テーブルのようなデータ構造での使用適してます。 (Object から継承されます。) | | パブリック メソッド | GetType | 現在のインスタンスType取得します。 (Object から継承されます。) | | パブリック メソッド | ReferenceEquals | 指定した複数Object インスタンス同一かどうか判断します。 (Object から継承されます。) | | パブリック メソッド | ToString | オーバーライドされますサーバー側でアクティブ化される型の型名アセンブリ名オブジェクト URI、および WellKnownObjectMode を String として返します。 |

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

| | 名前 | 説明 | | | ------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | プロテクト メソッド | Finalize | Objectガベージ コレクションにより収集される前に、その Objectリソース解放しその他のクリーンアップ操作実行できるようにします。 (Object から継承されます。) | | プロテクト メソッド | MemberwiseClone | 現在の Object簡易コピー作成します。 (Object から継承されます。) |

参照参照

関連項目

WellKnownServiceTypeEntry クラス
System.Runtime.Remoting 名前空間
RegisterWellKnownServiceType

その他の技術情報

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