| 初期参照名 | リモート | 機能 |
| ActivationSystem | | サーバ起動機能にアクセスします。 |
| Authenticator | | 認証をサポートします。 |
| CertificateManager | | SSLの初期化をサポートします。 |
| InitialReferencesService | | 初期オブジェクト参照を取得/設定します。 |
| jBrokerAdmin | | リモートモニタ |
| MulticastCurrent | | マルチキャスト要求のクライアントを判別します。 |
| NameService | | ルートNamingContextオブジェクト |
| NameServiceFactory | | インプロセスNameServiceインスタンスを作成します。 |
| POACurrent | | 現在のPOA およびオブジェクトIDを判別します。 |
| RootPOA | | POAを使用した最小プログラミング一時的オブジェクトをサポートします。 |
| SecurityCurrent | | スレッドまたはORB レベル識別を取得/設定します。 |
| TSIdentification | | ORBで使用するトランザクションサービスを設定します。 |
1 初期サービス
orb.list_initial_services()メソッドは、すべての初期サービスの名前を返します。これらの一部はローカル性が制約されたオブジェクトを表し、その他のものはネットワーク上で実行され、ブートストラッププロトコルを使用して取得されます。ローカル性が制約されたオブジェクトは文字列化またはマーシャルができません。
package listInitial;
import org.omg.CORBA.ORB;
import org.omg.CORBA.Object;
public class Services
{
public static void main(String[] args)
{
| try {
| |
| | // create the jBroker ORB
| | ORB orb = ORB.init(args, null);
| |
| | // get the names of initial services
| | String[] names = orb.list_initial_services();
| |
| | // print the initial services
| | for (int i=0; i < names.length; i++)
| | System.out.println(names[i] + (isLocalityConstrained(
| | orb, names[i]) ? "" : " (remote)"));
| |
| } catch (Exception ex) {
| | ex.printStackTrace();
| }
}
// locality constrained objects can not be stringified or marshalled
static boolean isLocalityConstrained(ORB orb, String name)
{
| try {
| | orb.object_to_string(orb.resolve_initial_references(name));
| | return false;
| |
| } catch (Exception ex) {
| | return true;
| }
}
}
このプログラムを実行すると、次のようなリストを取得できます。
ActivationSystem (remote) jBrokerAdmin (remote) NameService (remote) MulticastCurrent CertificateManager InitialReferencesService Authenticator POACurrent RootPOA SecurityCurrent PolicyCurrent SessionCurrent TSIdentification DynAnyFactory ORBPolicyManager NameServiceFactory
| Copyright © 2000-2003, Novell, Inc.All rights reserved. |