jdk/src/linux/doc/man/ja/tnameserv.1
author aph
Thu, 17 Mar 2016 17:03:20 +0000
changeset 36799 982e1880e05e
parent 31876 91b22707521a
permissions -rw-r--r--
Merge
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
23600
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
     1
'\" t
31876
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
     2
.\" Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved.
23600
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
     3
.\" DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
     4
.\"
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
     5
.\" This code is free software; you can redistribute it and/or modify it
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
     6
.\" under the terms of the GNU General Public License version 2 only, as
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
     7
.\" published by the Free Software Foundation.
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
     8
.\"
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
     9
.\" This code is distributed in the hope that it will be useful, but WITHOUT
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
    10
.\" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
31876
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
    11
.\" FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
23600
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
    12
.\" version 2 for more details (a copy is included in the LICENSE file that
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
    13
.\" accompanied this code).
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
    14
.\"
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
    15
.\" You should have received a copy of the GNU General Public License version
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
    16
.\" 2 along with this work; if not, write to the Free Software Foundation,
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
    17
.\" Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
    18
.\"
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
    19
.\" Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
    20
.\" or visit www.oracle.com if you need additional information or have any
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
    21
.\" questions.
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
    22
.\"
31876
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
    23
.\" Title: tnameserv
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
    24
.\" Language: Japanese
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
    25
.\" Date: 2013年11月21日
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
    26
.\" SectDesc: Java IDLおよびRMI-IIOPツール
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
    27
.\" Software: JDK 8
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
    28
.\" Arch: 汎用
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
    29
.\" Part Number: E58103-01
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
    30
.\" Doc ID: JSSON
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
    31
.\"
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
    32
.if n .pl 99999
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
    33
.TH "tnameserv" "1" "2013年11月21日" "JDK 8" "Java IDLおよびRMI-IIOPツール"
23600
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
    34
.\" -----------------------------------------------------------------
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
    35
.\" * Define some portability stuff
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
    36
.\" -----------------------------------------------------------------
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
    37
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
    38
.\" http://bugs.debian.org/507673
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
    39
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
    40
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
    41
.ie \n(.g .ds Aq \(aq
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
    42
.el       .ds Aq '
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
    43
.\" -----------------------------------------------------------------
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
    44
.\" * set default formatting
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
    45
.\" -----------------------------------------------------------------
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
    46
.\" disable hyphenation
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
    47
.nh
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
    48
.\" disable justification (adjust text to left margin only)
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
    49
.ad l
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
    50
.\" -----------------------------------------------------------------
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
    51
.\" * MAIN CONTENT STARTS HERE *
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
    52
.\" -----------------------------------------------------------------
31876
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
    53
.SH "名前"
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
    54
tnameserv \- インタフェース定義言語(IDL)。
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
    55
.SH "概要"
23600
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
    56
.sp
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
    57
.if n \{\
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
    58
.RS 4
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
    59
.\}
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
    60
.nf
31876
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
    61
\fBtnameserve\fR \fB\-ORBInitialPort\fR [ \fInameserverport\fR ]
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    62
.fi
23600
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
    63
.if n \{\
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
    64
.RE
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
    65
.\}
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
    66
.PP
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
    67
\-ORBInitialPort \fInameserverport\fR
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
    68
.RS 4
31876
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
    69
ネーミング・サービスがORBの\fBresolve_initial_references\fRメソッドと\fBlist_initial_references\fRメソッドの実装に使用するブートストラップ・プロトコルをリスニングする初期ポートです。
23600
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
    70
.RE
31876
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
    71
.SH "説明"
23600
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
    72
.PP
31876
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
    73
Java IDLには、Object Request Broker Daemon (ORBD)が含まれます。ORBDは、ブートストラップ・サービス、一時ネーミング・サービス、永続ネーミング・サービスおよびサーバー・マネージャを含むデーモン・プロセスです。Java IDLのすべてのチュートリアルではORBDを使用していますが、一時ネーミング・サービスを使用する例では、\fBorbd\fRのかわりに\fBtnameserv\fRを使用できます。
23600
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
    74
.PP
31876
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
    75
orbd(1)http://docs\&.oracle\&.com/javase/8/docs/technotes/guides/idl/jidlNaming\&.html
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
    76
にあるまたは「Naming Service」を参照してください。
23600
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
    77
.PP
31876
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
    78
CORBAのCOS (Common Object Services)ネーミング・サービスは、ファイル・システムがファイルに対してディレクトリ構造を提供しているのと同じように、オブジェクト参照に対してツリー構造のディレクトリを提供します。Java IDLの一時ネーム・サービスである\fBtnameserv\fRは、COSネーム・サービスの仕様を単純な形で実装したものです。
23600
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
    79
.PP
31876
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
    80
オブジェクト参照はネームスペースに名前で格納され、オブジェクト参照と名前のペアは、それぞれネーム・バインディングと呼ばれます。ネーム・バインディングはネーミング・コンテキストに組み込むことができます。ネーミング・コンテキストはネーム・バインディングであり、ファイル・システムのサブディレクトリと同じ編成機能を持ちます。すべてのバインディングは初期ネーミング・コンテキストの下に格納されます。初期ネーミング・コンテキストは、ネームスペースの唯一の永続バインディングです。Java IDLネーミング・サービス・プロセスを停止して再起動すると、残りのネームスペースは失われます。
23600
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
    81
.PP
31876
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
    82
アプレットまたはアプリケーションからCOSネーミング・サービスを使用するためには、そのORBがネーミング・サービスが動作しているホストのポートを知っているか、そのネーミング・サービスの初期ネーミング・コンテキスト文字列にアクセスできる必要があります。ネーム・サービスは、Java IDLのネーム・サービスでもその他のCOS準拠のネーム・サービスでもかまいません。
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
    83
.SS "ネーミング・サービスの起動"
23600
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
    84
.PP
31876
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
    85
Java IDLネーム・サービスは、ネーム・サービスを使用するアプリケーションまたはアプレットより前に起動しておく必要があります。Java IDL製品をインストールすると、Java IDLネーミング・サービスを起動するスクリプト(Oracle Solaris:
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
    86
\fBtnameserv\fR)または実行可能ファイル(Windows:
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
    87
\fBtnameserv\&.exe\fR)が作成されます。バックグラウンドで動作するように、ネーム・サービスを起動してください。
23600
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
    88
.PP
31876
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
    89
特に指定しない場合、Java IDLネーミング・サービスは、ORBの\fBresolve_initial_references\fRメソッドと\fBlist_initial_references methods\fRメソッドの実装に使用するブートストラップ・プロトコルに対してポート900でリスニングします。
23600
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
    90
.sp
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
    91
.if n \{\
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
    92
.RS 4
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
    93
.\}
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
    94
.nf
31876
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
    95
\fBtnameserv \-ORBInitialPort nameserverport&\fR
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
    96
 
23600
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
    97
.fi
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
    98
.if n \{\
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
    99
.RE
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   100
.\}
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   101
.PP
31876
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
   102
ネーム・サーバー・ポートを指定しない場合、デフォルトでポート900が使用されます。Oracle Solarisソフトウェアの実行時、1024より小さいポートでプロセスを開始する場合は、rootユーザーになる必要があります。このため、1024以上のポート番号を使用することをお薦めします。1050のように別のポートを指定し、ネーム・サービスをバックグラウンドで実行するには、Solaris、LinuxまたはOS Xコマンド・シェルで次のように入力します。
23600
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   103
.sp
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   104
.if n \{\
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   105
.RS 4
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   106
.\}
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   107
.nf
31876
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
   108
\fBtnameserv \-ORBInitialPort 1050&\fR
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
   109
 
23600
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   110
.fi
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   111
.if n \{\
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   112
.RE
23600
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   113
.\}
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   114
.PP
31876
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
   115
WindowsのMS\-DOSシステム・プロンプトでは、次のように入力します。
23600
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   116
.sp
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   117
.if n \{\
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   118
.RS 4
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   119
.\}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   120
.nf
31876
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
   121
\fBstart tnameserv \-ORBInitialPort 1050\fR
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
   122
 
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   123
.fi
23600
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   124
.if n \{\
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   125
.RE
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   126
.\}
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   127
.PP
31876
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
   128
ネーム・サーバーのクライアントには、新しいポート番号を知らせる必要があります。これを行うには、ORBオブジェクトの作成時に\fBorg\&.omg\&.CORBA\&.ORBInitialPort\fRプロパティに新しいポート番号を設定します。
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
   129
.SS "異なるホスト上でのサーバーとクライアントの実行"
23600
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   130
.PP
31876
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
   131
Java IDLとRMI\-IIOPのほとんどのチュートリアルでは、ネーミング・サービス、サーバーおよびクライアントはすべて開発用のマシン上で実行されます。実際にデプロイメントする場合には、クライアントとサーバーを、ネーミング・サービスとは異なるホスト・マシン上で実行することが多くなります。
23600
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   132
.PP
31876
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
   133
クライアントとサーバーがネーム・サービスを見つけるには、クライアントとサーバーが、ネーム・サービスが実行されているポートの番号とホストを認識している必要があります。そのためには、クライアントとサーバーのファイル内の\fBorg\&.omg\&.CORBA\&.ORBInitialPort\fRプロパティと\fBorg\&.omg\&.CORBA\&.ORBInitialHost\fRプロパティをネーム・サービスが実行されているポートの番号とマシンの名前に設定します。この例は、「Getting Started Using RMI\-IIOP」
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
   134
(http://docs\&.oracle\&.com/javase/8/docs/technotes/guides/rmi\-iiop/rmiiiopexample\&.html)に示されています
23600
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   135
.PP
31876
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
   136
コマンド行オプション\fB\-ORBInitialPort nameserverport#\fRと\fB\-ORBInitialHost nameserverhostname\fRを使用して、クライアントとサーバーに対してネーミング・サービスを探す場所を指定することもできます。コマンド行オプションを使用してこれを行う方法の1つの例は、http://docs\&.oracle\&.com/javase/8/docs/technotes/guides/idl/tutorial/jidl2machines\&.htmlの「Java IDL: The Hello World Example on Two Machines」
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
   137
を参照してください
23600
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   138
.PP
31876
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
   139
たとえば、一時ネーム・サービス\fBtnameserv\fRが、ホスト\fBnameserverhost\fRのポート1050上で実行されているとします。さらに、クライアントがホスト\fBclienthost\fR上で実行され、サーバーはホスト\fBserverhost\fR上で実行されているとします。
23600
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   140
.PP
31876
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
   141
ホスト\fBnameserverhost\fR上で\fBtnameserv\fRを起動します。
23600
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   142
.sp
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   143
.if n \{\
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   144
.RS 4
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   145
.\}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   146
.nf
31876
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
   147
\fBtnameserv \-ORBInitialPort 1050\fR
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
   148
 
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   149
.fi
23600
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   150
.if n \{\
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   151
.RE
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   152
.\}
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   153
.PP
31876
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
   154
\fBserverhost\fR上でサーバーを起動します。
23600
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   155
.sp
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   156
.if n \{\
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   157
.RS 4
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   158
.\}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   159
.nf
31876
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
   160
\fBjava Server \-ORBInitialPort 1050 \-ORBInitialHost nameserverhost\fR
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
   161
 
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   162
.fi
23600
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   163
.if n \{\
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   164
.RE
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   165
.\}
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   166
.PP
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   167
31876
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
   168
\fBclienthost\fR上でクライアントを起動します。
23600
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   169
.sp
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   170
.if n \{\
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   171
.RS 4
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   172
.\}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   173
.nf
31876
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
   174
\fBjava Client \-ORBInitialPort 1050 \-ORBInitialHost nameserverhost\fR
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
   175
 
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   176
.fi
23600
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   177
.if n \{\
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   178
.RE
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   179
.\}
31876
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
   180
.SS "ネーミング・サービスの停止"
23600
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   181
.PP
31876
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
   182
Java IDLネーミング・サービスを停止するには、Solaris、LinuxまたはOS Xの場合は、\fBkill\fRなどのオペレーティング・システムのコマンドを使用し、Windowsの場合は、\fB[Ctrl]+[C]\fRキーを使用します。ネーミング・サービスを明示的に停止するまでは、呼出し待機状態が続きます。サービスを終了させると、Java IDLネーム・サービスに登録されている名前は失われます。
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
   183
.SH "オプション"
23600
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   184
.PP
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   185
\-J\fIoption\fR
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   186
.RS 4
31876
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
   187
Java Virtual Machineに\fBoption\fRを渡します。\fBoption\fRには、Javaアプリケーション起動ツールのリファレンス・ページに記載されているオプションを1つ指定します。たとえば、\fB\-J\-Xms48m\fRと指定すると、スタートアップ・メモリーは48MBに設定されます。java(1)を参照してください。
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   188
.RE
31876
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
   189
.SH "例"
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
   190
.SS "ネームスペースへのオブジェクトの追加"
23600
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   191
.PP
31876
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
   192
次の例では、ネームスペースに名前を追加する方法を示します。このサンプル・プログラムは、自己完結型の一時ネーム・サービス・クライアントで、次のような単純なツリーを作成するものです。
23600
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   193
.sp
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   194
.if n \{\
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   195
.RS 4
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   196
.\}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   197
.nf
31876
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
   198
\fBInitial Naming Context\fR
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
   199
\fB     plans\fR
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
   200
\fB     Personal\fR
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
   201
\fB          calendar\fR
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
   202
\fB          schedule\fR
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
   203
 
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   204
.fi
23600
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   205
.if n \{\
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   206
.RE
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   207
.\}
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   208
.PP
31876
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
   209
この例で、\fBplans\fRはオブジェクト参照、\fBPersonal\fRは\fBcalendar\fRと\fBschedule\fRの2つのオブジェクト参照を含むネーミング・コンテキストです。
23600
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   210
.sp
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   211
.if n \{\
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   212
.RS 4
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   213
.\}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   214
.nf
31876
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
   215
\fBimport java\&.util\&.Properties;\fR
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
   216
\fBimport org\&.omg\&.CORBA\&.*;\fR
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
   217
\fBimport org\&.omg\&.CosNaming\&.*;\fR
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
   218
\fB \fR
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
   219
\fBpublic class NameClient {\fR
23600
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   220
 
31876
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
   221
\fB    public static void main(String args[]) {\fR
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
   222
 
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
   223
\fB        try {\fR
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
   224
 
23600
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   225
.fi
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   226
.if n \{\
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   227
.RE
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   228
.\}
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   229
.PP
31876
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
   230
ネーミング・サービスの起動で、\fBnameserver\fRはポート1050で起動されました。次のコードで、このポート番号をクライアント・システムに知らせます。
23600
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   231
.sp
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   232
.if n \{\
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   233
.RS 4
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   234
.\}
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   235
.nf
31876
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
   236
\fB            Properties props = new Properties();\fR
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
   237
\fB            props\&.put("org\&.omg\&.CORBA\&.ORBInitialPort", "1050");\fR
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
   238
\fB            ORB orb = ORB\&.init(args, props);\fR
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
   239
 
23600
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   240
.fi
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   241
.if n \{\
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   242
.RE
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   243
.\}
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   244
.PP
31876
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
   245
次のコードでは、初期ネーミング・コンテキストを取得し、それを\fBctx\fRに代入します。2行目では、\fBctx\fRをダミーのオブジェクト参照\fBobjref\fRにコピーします。このobjrefには、あとで様々な名前を割り当ててネームスペースに追加します。
23600
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   246
.sp
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   247
.if n \{\
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   248
.RS 4
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   249
.\}
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   250
.nf
31876
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
   251
\fB            NamingContext ctx =\fR
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
   252
\fB                NamingContextHelper\&.narrow(\fR
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
   253
\fB                    orb\&.resolve_initial_references("NameService"));\fR
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
   254
\fB             NamingContext objref = ctx;\fR
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
   255
 
23600
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   256
.fi
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   257
.if n \{\
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   258
.RE
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   259
.\}
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   260
.PP
31876
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
   261
次のコードでは、\fBtext\fRタイプの名前\fBplans\fRを作成し、それをダミーのオブジェクト参照にバインドします。その後、\fBrebind\fRメソッドを使用して初期ネーミング・コンテキストの下に\fBplans\fRを追加しています。\fBrebind\fRメソッドを使用すれば、\fBbind\fRメソッドを使用した場合に発生する例外を発生させずに、このプログラムを何度も繰返し実行できます。
23600
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   262
.sp
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   263
.if n \{\
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   264
.RS 4
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   265
.\}
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   266
.nf
31876
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
   267
\fB            NameComponent nc1 = new NameComponent("plans", "text");\fR
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
   268
\fB            NameComponent[] name1 = {nc1};\fR
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
   269
\fB            ctx\&.rebind(name1, objref);\fR
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
   270
\fB            System\&.out\&.println("plans rebind successful!");\fR
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
   271
 
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   272
.fi
23600
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   273
.if n \{\
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   274
.RE
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   275
.\}
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   276
.PP
31876
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
   277
次のコードでは、\fBdirectory\fRタイプの\fBPersonal\fRというネーミング・コンテキストを作成します。その結果得られるオブジェクト参照\fBctx2\fRを\fBname\fRにバインドし、初期ネーミング・コンテキストに追加します。
23600
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   278
.sp
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   279
.if n \{\
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   280
.RS 4
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   281
.\}
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   282
.nf
31876
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
   283
\fB            NameComponent nc2 = new NameComponent("Personal", "directory");\fR
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
   284
\fB            NameComponent[] name2 = {nc2};\fR
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
   285
\fB            NamingContext ctx2 = ctx\&.bind_new_context(name2);\fR
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
   286
\fB            System\&.out\&.println("new naming context added\&.\&.");\fR
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
   287
 
23600
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   288
.fi
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   289
.if n \{\
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   290
.RE
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   291
.\}
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   292
.PP
31876
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
   293
残りのコードでは、ダミーのオブジェクト参照を\fBschedule\fRと\fBcalendar\fRという名前でネーミング・コンテキスト\fBPersonal\fR(\fBctx2\fR)にバインドします。
23600
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   294
.sp
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   295
.if n \{\
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   296
.RS 4
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   297
.\}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   298
.nf
31876
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
   299
\fB            NameComponent nc3 = new NameComponent("schedule", "text");\fR
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
   300
\fB            NameComponent[] name3 = {nc3};\fR
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
   301
\fB            ctx2\&.rebind(name3, objref);\fR
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
   302
\fB            System\&.out\&.println("schedule rebind successful!");\fR
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
   303
\fB \fR
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
   304
\fB            NameComponent nc4 = new NameComponent("calender", "text");\fR
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
   305
\fB            NameComponent[] name4 = {nc4};\fR
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
   306
\fB            ctx2\&.rebind(name4, objref);\fR
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
   307
\fB            System\&.out\&.println("calender rebind successful!");\fR
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
   308
\fB        } catch (Exception e) {\fR
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
   309
\fB            e\&.printStackTrace(System\&.err);\fR
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
   310
\fB        }\fR
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
   311
\fB    }\fR
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
   312
\fB}\fR
23600
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   313
 
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   314
.fi
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   315
.if n \{\
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   316
.RE
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   317
.\}
31876
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
   318
.SS "ネームスペースの参照"
23600
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   319
.PP
31876
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
   320
次のサンプル・プログラムでは、ネームスペースをブラウズする方法を示します。
23600
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   321
.sp
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   322
.if n \{\
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   323
.RS 4
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   324
.\}
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   325
.nf
31876
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
   326
\fBimport java\&.util\&.Properties;\fR
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
   327
\fBimport org\&.omg\&.CORBA\&.*;\fR
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
   328
\fBimport org\&.omg\&.CosNaming\&.*;\fR
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
   329
\fB \fR
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
   330
\fBpublic class NameClientList {\fR
23600
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   331
 
31876
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
   332
\fB    public static void main(String args[]) {\fR
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
   333
 
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
   334
\fB        try {\fR
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
   335
 
23600
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   336
.fi
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   337
.if n \{\
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   338
.RE
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   339
.\}
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   340
.PP
31876
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
   341
ネーミング・サービスの起動で、\fBnameserver\fRはポート1050で起動されました。次のコードで、このポート番号をクライアント・システムに知らせます。
23600
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   342
.sp
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   343
.if n \{\
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   344
.RS 4
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   345
.\}
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   346
.nf
31876
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
   347
\fB            Properties props = new Properties();\fR
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
   348
\fB            props\&.put("org\&.omg\&.CORBA\&.ORBInitialPort", "1050");\fR
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
   349
\fB            ORB orb = ORB\&.init(args, props);\fR
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
   350
 
23600
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   351
.fi
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   352
.if n \{\
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   353
.RE
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   354
.\}
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   355
.PP
31876
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
   356
次のコードでは、初期ネーミング・コンテキストを取得しています。
23600
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   357
.sp
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   358
.if n \{\
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   359
.RS 4
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   360
.\}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   361
.nf
31876
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
   362
\fB            NamingContext nc =\fR
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
   363
\fB            NamingContextHelper\&.narrow(\fR
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
   364
\fB                orb\&.resolve_initial_references("NameService"));\fR
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
   365
 
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   366
.fi
23600
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   367
.if n \{\
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   368
.RE
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   369
.\}
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   370
.PP
31876
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
   371
\fBlist\fRメソッドは、ネーミング・コンテキストのバインディングをリストします。この場合、最大1000個までのバインディングが初期ネーミング・コンテキストから\fBBindingListHolder\fRに返されます。残りのバインディングは、\fBBindingIteratorHolder\fRに返されます。
23600
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   372
.sp
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   373
.if n \{\
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   374
.RS 4
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   375
.\}
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   376
.nf
31876
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
   377
\fB            BindingListHolder bl = new BindingListHolder();\fR
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
   378
\fB            BindingIteratorHolder blIt= new BindingIteratorHolder();\fR
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
   379
\fB            nc\&.list(1000, bl, blIt);\fR
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
   380
 
23600
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   381
.fi
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   382
.if n \{\
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   383
.RE
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   384
.\}
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   385
.PP
31876
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
   386
次のコードでは、返された\fBBindingListHolder\fRからバインディングの配列を取得します。バインディングがない場合は、プログラムが終了します。
23600
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   387
.sp
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   388
.if n \{\
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   389
.RS 4
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   390
.\}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   391
.nf
31876
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
   392
\fB            Binding bindings[] = bl\&.value;\fR
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
   393
\fB            if (bindings\&.length == 0) return;\fR
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
   394
 
23600
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   395
.fi
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   396
.if n \{\
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   397
.RE
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   398
.\}
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   399
.PP
31876
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
   400
残りのコードでは、バインディングに対してループ処理を行い、名前を出力します。
23600
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   401
.sp
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   402
.if n \{\
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   403
.RS 4
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   404
.\}
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   405
.nf
31876
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
   406
\fB            for (int i=0; i < bindings\&.length; i++) {\fR
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
   407
\fB \fR
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
   408
\fB                // get the object reference for each binding\fR
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
   409
\fB                org\&.omg\&.CORBA\&.Object obj = nc\&.resolve(bindings[i]\&.binding_name);\fR
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
   410
\fB                String objStr = orb\&.object_to_string(obj);\fR
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
   411
\fB                int lastIx = bindings[i]\&.binding_name\&.length\-1;\fR
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
   412
\fB \fR
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
   413
\fB                // check to see if this is a naming context\fR
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
   414
\fB                if (bindings[i]\&.binding_type == BindingType\&.ncontext) {\fR
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
   415
\fB                    System\&.out\&.println("Context: " +\fR
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
   416
\fB                        bindings[i]\&.binding_name[lastIx]\&.id);\fR
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
   417
\fB                } else {\fR
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
   418
\fB                    System\&.out\&.println("Object: " +\fR
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
   419
\fB                        bindings[i]\&.binding_name[lastIx]\&.id);\fR
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
   420
\fB                }\fR
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
   421
\fB            }\fR
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
   422
\fB        } catch (Exception e) {\fR
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
   423
\fB            e\&.printStackTrace(System\&.err)\fR
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
   424
\fB        }\fR
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
   425
\fB    }\fR
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
   426
\fB}\fR
23600
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   427
 
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   428
.fi
23600
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   429
.if n \{\
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   430
.RE
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   431
.\}
31876
91b22707521a 8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents: 30373
diff changeset
   432
.SH "関連項目"
23600
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   433
.sp
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   434
.RS 4
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   435
.ie n \{\
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   436
\h'-04'\(bu\h'+03'\c
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   437
.\}
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   438
.el \{\
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   439
.sp -1
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   440
.IP \(bu 2.3
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   441
.\}
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   442
orbd(1)
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   443
.RE
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   444
.br
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   445
'pl 8.5i
d21826f6c789 8026570: NLS: jdk8 man page update
mfang
parents: 9566
diff changeset
   446
'bp