Michael Fang | 35c8ad6 | 2014-01-07 22:04:03 -0800 | [diff] [blame] | 1 | '\" t |
Michael Fang | 9a7441f | 2015-07-27 16:49:10 -0700 | [diff] [blame] | 2 | .\" Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved. |
Michael Fang | 35c8ad6 | 2014-01-07 22:04:03 -0800 | [diff] [blame] | 3 | .\" DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
| 4 | .\" |
| 5 | .\" This code is free software; you can redistribute it and/or modify it |
| 6 | .\" under the terms of the GNU General Public License version 2 only, as |
| 7 | .\" published by the Free Software Foundation. |
| 8 | .\" |
| 9 | .\" This code is distributed in the hope that it will be useful, but WITHOUT |
| 10 | .\" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
Michael Fang | 9a7441f | 2015-07-27 16:49:10 -0700 | [diff] [blame] | 11 | .\" FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
Michael Fang | 35c8ad6 | 2014-01-07 22:04:03 -0800 | [diff] [blame] | 12 | .\" version 2 for more details (a copy is included in the LICENSE file that |
| 13 | .\" accompanied this code). |
| 14 | .\" |
| 15 | .\" You should have received a copy of the GNU General Public License version |
| 16 | .\" 2 along with this work; if not, write to the Free Software Foundation, |
| 17 | .\" Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
| 18 | .\" |
| 19 | .\" Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
| 20 | .\" or visit www.oracle.com if you need additional information or have any |
| 21 | .\" questions. |
| 22 | .\" |
Michael Fang | 9a7441f | 2015-07-27 16:49:10 -0700 | [diff] [blame] | 23 | .\" Title: tnameserv |
| 24 | .\" Language: Japanese |
| 25 | .\" Date: 2013ǯ11·î21Æü |
| 26 | .\" SectDesc: Java IDL¤ª¤è¤ÓRMI-IIOP¥Ä¡¼¥ë |
| 27 | .\" Software: JDK 8 |
| 28 | .\" Arch: ÈÆÍÑ |
| 29 | .\" Part Number: E58103-01 |
| 30 | .\" Doc ID: JSSON |
| 31 | .\" |
| 32 | .if n .pl 99999 |
| 33 | .TH "tnameserv" "1" "2013ǯ11·î21Æü" "JDK 8" "Java IDL¤ª¤è¤ÓRMI-IIOP¥Ä¡¼¥ë" |
Michael Fang | 35c8ad6 | 2014-01-07 22:04:03 -0800 | [diff] [blame] | 34 | .\" ----------------------------------------------------------------- |
| 35 | .\" * Define some portability stuff |
| 36 | .\" ----------------------------------------------------------------- |
| 37 | .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 38 | .\" http://bugs.debian.org/507673 |
| 39 | .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html |
| 40 | .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 41 | .ie \n(.g .ds Aq \(aq |
| 42 | .el .ds Aq ' |
| 43 | .\" ----------------------------------------------------------------- |
| 44 | .\" * set default formatting |
| 45 | .\" ----------------------------------------------------------------- |
| 46 | .\" disable hyphenation |
| 47 | .nh |
| 48 | .\" disable justification (adjust text to left margin only) |
| 49 | .ad l |
| 50 | .\" ----------------------------------------------------------------- |
| 51 | .\" * MAIN CONTENT STARTS HERE * |
| 52 | .\" ----------------------------------------------------------------- |
Michael Fang | 9a7441f | 2015-07-27 16:49:10 -0700 | [diff] [blame] | 53 | .SH "̾Á°" |
| 54 | tnameserv \- ¥¤¥ó¥¿¥Õ¥§¡¼¥¹ÄêµÁ¸À¸ì(IDL)¡£ |
| 55 | .SH "³µÍ×" |
Michael Fang | 35c8ad6 | 2014-01-07 22:04:03 -0800 | [diff] [blame] | 56 | .sp |
| 57 | .if n \{\ |
| 58 | .RS 4 |
| 59 | .\} |
| 60 | .nf |
Michael Fang | 9a7441f | 2015-07-27 16:49:10 -0700 | [diff] [blame] | 61 | \fBtnameserve\fR \fB\-ORBInitialPort\fR [ \fInameserverport\fR ] |
J. Duke | 319a3b9 | 2007-12-01 00:00:00 +0000 | [diff] [blame] | 62 | .fi |
Michael Fang | 35c8ad6 | 2014-01-07 22:04:03 -0800 | [diff] [blame] | 63 | .if n \{\ |
J. Duke | 319a3b9 | 2007-12-01 00:00:00 +0000 | [diff] [blame] | 64 | .RE |
Michael Fang | 35c8ad6 | 2014-01-07 22:04:03 -0800 | [diff] [blame] | 65 | .\} |
| 66 | .PP |
| 67 | \-ORBInitialPort \fInameserverport\fR |
| 68 | .RS 4 |
Michael Fang | 9a7441f | 2015-07-27 16:49:10 -0700 | [diff] [blame] | 69 | ¥Í¡¼¥ß¥ó¥°¡¦¥µ¡¼¥Ó¥¹¤¬ORB¤Î\fBresolve_initial_references\fR¥á¥½¥Ã¥É¤È\fBlist_initial_references\fR¥á¥½¥Ã¥É¤Î¼ÂÁõ¤Ë»ÈÍѤ¹¤ë¥Ö¡¼¥È¥¹¥È¥é¥Ã¥×¡¦¥×¥í¥È¥³¥ë¤ò¥ê¥¹¥Ë¥ó¥°¤¹¤ë½é´ü¥Ý¡¼¥È¤Ç¤¹¡£ |
J. Duke | 319a3b9 | 2007-12-01 00:00:00 +0000 | [diff] [blame] | 70 | .RE |
Michael Fang | 9a7441f | 2015-07-27 16:49:10 -0700 | [diff] [blame] | 71 | .SH "ÀâÌÀ" |
Michael Fang | 35c8ad6 | 2014-01-07 22:04:03 -0800 | [diff] [blame] | 72 | .PP |
Michael Fang | 9a7441f | 2015-07-27 16:49:10 -0700 | [diff] [blame] | 73 | Java IDL¤Ë¤Ï¡¢Object Request Broker Daemon (ORBD)¤¬´Þ¤Þ¤ì¤Þ¤¹¡£ORBD¤Ï¡¢¥Ö¡¼¥È¥¹¥È¥é¥Ã¥×¡¦¥µ¡¼¥Ó¥¹¡¢°ì»þ¥Í¡¼¥ß¥ó¥°¡¦¥µ¡¼¥Ó¥¹¡¢±Ê³¥Í¡¼¥ß¥ó¥°¡¦¥µ¡¼¥Ó¥¹¤ª¤è¤Ó¥µ¡¼¥Ð¡¼¡¦¥Þ¥Í¡¼¥¸¥ã¤ò´Þ¤à¥Ç¡¼¥â¥ó¡¦¥×¥í¥»¥¹¤Ç¤¹¡£Java IDL¤Î¤¹¤Ù¤Æ¤Î¥Á¥å¡¼¥È¥ê¥¢¥ë¤Ç¤ÏORBD¤ò»ÈÍѤ·¤Æ¤¤¤Þ¤¹¤¬¡¢°ì»þ¥Í¡¼¥ß¥ó¥°¡¦¥µ¡¼¥Ó¥¹¤ò»ÈÍѤ¹¤ëÎã¤Ç¤Ï¡¢\fBorbd\fR¤Î¤«¤ï¤ê¤Ë\fBtnameserv\fR¤ò»ÈÍѤǤ¤Þ¤¹¡£ |
Michael Fang | 35c8ad6 | 2014-01-07 22:04:03 -0800 | [diff] [blame] | 74 | .PP |
Michael Fang | 9a7441f | 2015-07-27 16:49:10 -0700 | [diff] [blame] | 75 | orbd(1)http://docs\&.oracle\&.com/javase/8/docs/technotes/guides/idl/jidlNaming\&.html |
| 76 | ¤Ë¤¢¤ë¤Þ¤¿¤Ï¡ÖNaming Service¡×¤ò»²¾È¤·¤Æ¤¯¤À¤µ¤¤¡£ |
Michael Fang | 35c8ad6 | 2014-01-07 22:04:03 -0800 | [diff] [blame] | 77 | .PP |
Michael Fang | 9a7441f | 2015-07-27 16:49:10 -0700 | [diff] [blame] | 78 | CORBA¤ÎCOS (Common Object Services)¥Í¡¼¥ß¥ó¥°¡¦¥µ¡¼¥Ó¥¹¤Ï¡¢¥Õ¥¡¥¤¥ë¡¦¥·¥¹¥Æ¥à¤¬¥Õ¥¡¥¤¥ë¤ËÂФ·¤Æ¥Ç¥£¥ì¥¯¥È¥ê¹½Â¤¤òÄ󶡤·¤Æ¤¤¤ë¤Î¤ÈƱ¤¸¤è¤¦¤Ë¡¢¥ª¥Ö¥¸¥§¥¯¥È»²¾È¤ËÂФ·¤Æ¥Ä¥ê¡¼¹½Â¤¤Î¥Ç¥£¥ì¥¯¥È¥ê¤òÄ󶡤·¤Þ¤¹¡£Java IDL¤Î°ì»þ¥Í¡¼¥à¡¦¥µ¡¼¥Ó¥¹¤Ç¤¢¤ë\fBtnameserv\fR¤Ï¡¢COS¥Í¡¼¥à¡¦¥µ¡¼¥Ó¥¹¤Î»ÅÍͤòñ½ã¤Ê·Á¤Ç¼ÂÁõ¤·¤¿¤â¤Î¤Ç¤¹¡£ |
Michael Fang | 35c8ad6 | 2014-01-07 22:04:03 -0800 | [diff] [blame] | 79 | .PP |
Michael Fang | 9a7441f | 2015-07-27 16:49:10 -0700 | [diff] [blame] | 80 | ¥ª¥Ö¥¸¥§¥¯¥È»²¾È¤Ï¥Í¡¼¥à¥¹¥Ú¡¼¥¹¤Ë̾Á°¤Ç³ÊǼ¤µ¤ì¡¢¥ª¥Ö¥¸¥§¥¯¥È»²¾È¤È̾Á°¤Î¥Ú¥¢¤Ï¡¢¤½¤ì¤¾¤ì¥Í¡¼¥à¡¦¥Ð¥¤¥ó¥Ç¥£¥ó¥°¤È¸Æ¤Ð¤ì¤Þ¤¹¡£¥Í¡¼¥à¡¦¥Ð¥¤¥ó¥Ç¥£¥ó¥°¤Ï¥Í¡¼¥ß¥ó¥°¡¦¥³¥ó¥Æ¥¥¹¥È¤ËÁȤ߹þ¤à¤³¤È¤¬¤Ç¤¤Þ¤¹¡£¥Í¡¼¥ß¥ó¥°¡¦¥³¥ó¥Æ¥¥¹¥È¤Ï¥Í¡¼¥à¡¦¥Ð¥¤¥ó¥Ç¥£¥ó¥°¤Ç¤¢¤ê¡¢¥Õ¥¡¥¤¥ë¡¦¥·¥¹¥Æ¥à¤Î¥µ¥Ö¥Ç¥£¥ì¥¯¥È¥ê¤ÈƱ¤¸ÊÔÀ®µ¡Ç½¤ò»ý¤Á¤Þ¤¹¡£¤¹¤Ù¤Æ¤Î¥Ð¥¤¥ó¥Ç¥£¥ó¥°¤Ï½é´ü¥Í¡¼¥ß¥ó¥°¡¦¥³¥ó¥Æ¥¥¹¥È¤Î²¼¤Ë³ÊǼ¤µ¤ì¤Þ¤¹¡£½é´ü¥Í¡¼¥ß¥ó¥°¡¦¥³¥ó¥Æ¥¥¹¥È¤Ï¡¢¥Í¡¼¥à¥¹¥Ú¡¼¥¹¤ÎÍ£°ì¤Î±Ê³¥Ð¥¤¥ó¥Ç¥£¥ó¥°¤Ç¤¹¡£Java IDL¥Í¡¼¥ß¥ó¥°¡¦¥µ¡¼¥Ó¥¹¡¦¥×¥í¥»¥¹¤òÄä»ß¤·¤ÆºÆµ¯Æ°¤¹¤ë¤È¡¢»Ä¤ê¤Î¥Í¡¼¥à¥¹¥Ú¡¼¥¹¤Ï¼º¤ï¤ì¤Þ¤¹¡£ |
Michael Fang | 35c8ad6 | 2014-01-07 22:04:03 -0800 | [diff] [blame] | 81 | .PP |
Michael Fang | 9a7441f | 2015-07-27 16:49:10 -0700 | [diff] [blame] | 82 | ¥¢¥×¥ì¥Ã¥È¤Þ¤¿¤Ï¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤«¤éCOS¥Í¡¼¥ß¥ó¥°¡¦¥µ¡¼¥Ó¥¹¤ò»ÈÍѤ¹¤ë¤¿¤á¤Ë¤Ï¡¢¤½¤ÎORB¤¬¥Í¡¼¥ß¥ó¥°¡¦¥µ¡¼¥Ó¥¹¤¬Æ°ºî¤·¤Æ¤¤¤ë¥Û¥¹¥È¤Î¥Ý¡¼¥È¤òÃΤäƤ¤¤ë¤«¡¢¤½¤Î¥Í¡¼¥ß¥ó¥°¡¦¥µ¡¼¥Ó¥¹¤Î½é´ü¥Í¡¼¥ß¥ó¥°¡¦¥³¥ó¥Æ¥¥¹¥Èʸ»úÎó¤Ë¥¢¥¯¥»¥¹¤Ç¤¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£¥Í¡¼¥à¡¦¥µ¡¼¥Ó¥¹¤Ï¡¢Java IDL¤Î¥Í¡¼¥à¡¦¥µ¡¼¥Ó¥¹¤Ç¤â¤½¤Î¾¤ÎCOS½àµò¤Î¥Í¡¼¥à¡¦¥µ¡¼¥Ó¥¹¤Ç¤â¤«¤Þ¤¤¤Þ¤»¤ó¡£ |
| 83 | .SS "¥Í¡¼¥ß¥ó¥°¡¦¥µ¡¼¥Ó¥¹¤Îµ¯Æ°" |
Michael Fang | 35c8ad6 | 2014-01-07 22:04:03 -0800 | [diff] [blame] | 84 | .PP |
Michael Fang | 9a7441f | 2015-07-27 16:49:10 -0700 | [diff] [blame] | 85 | Java IDL¥Í¡¼¥à¡¦¥µ¡¼¥Ó¥¹¤Ï¡¢¥Í¡¼¥à¡¦¥µ¡¼¥Ó¥¹¤ò»ÈÍѤ¹¤ë¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤Þ¤¿¤Ï¥¢¥×¥ì¥Ã¥È¤è¤êÁ°¤Ëµ¯Æ°¤·¤Æ¤ª¤¯É¬Íפ¬¤¢¤ê¤Þ¤¹¡£Java IDLÀ½Éʤò¥¤¥ó¥¹¥È¡¼¥ë¤¹¤ë¤È¡¢Java IDL¥Í¡¼¥ß¥ó¥°¡¦¥µ¡¼¥Ó¥¹¤òµ¯Æ°¤¹¤ë¥¹¥¯¥ê¥×¥È(Oracle Solaris: |
| 86 | \fBtnameserv\fR)¤Þ¤¿¤Ï¼Â¹Ô²Äǽ¥Õ¥¡¥¤¥ë(Windows: |
| 87 | \fBtnameserv\&.exe\fR)¤¬ºîÀ®¤µ¤ì¤Þ¤¹¡£¥Ð¥Ã¥¯¥°¥é¥¦¥ó¥É¤ÇÆ°ºî¤¹¤ë¤è¤¦¤Ë¡¢¥Í¡¼¥à¡¦¥µ¡¼¥Ó¥¹¤òµ¯Æ°¤·¤Æ¤¯¤À¤µ¤¤¡£ |
Michael Fang | 35c8ad6 | 2014-01-07 22:04:03 -0800 | [diff] [blame] | 88 | .PP |
Michael Fang | 9a7441f | 2015-07-27 16:49:10 -0700 | [diff] [blame] | 89 | Æä˻ØÄꤷ¤Ê¤¤¾ì¹ç¡¢Java IDL¥Í¡¼¥ß¥ó¥°¡¦¥µ¡¼¥Ó¥¹¤Ï¡¢ORB¤Î\fBresolve_initial_references\fR¥á¥½¥Ã¥É¤È\fBlist_initial_references methods\fR¥á¥½¥Ã¥É¤Î¼ÂÁõ¤Ë»ÈÍѤ¹¤ë¥Ö¡¼¥È¥¹¥È¥é¥Ã¥×¡¦¥×¥í¥È¥³¥ë¤ËÂФ·¤Æ¥Ý¡¼¥È900¤Ç¥ê¥¹¥Ë¥ó¥°¤·¤Þ¤¹¡£ |
Michael Fang | 35c8ad6 | 2014-01-07 22:04:03 -0800 | [diff] [blame] | 90 | .sp |
| 91 | .if n \{\ |
| 92 | .RS 4 |
| 93 | .\} |
| 94 | .nf |
Michael Fang | 9a7441f | 2015-07-27 16:49:10 -0700 | [diff] [blame] | 95 | \fBtnameserv \-ORBInitialPort nameserverport&\fR |
| 96 | |
Michael Fang | 35c8ad6 | 2014-01-07 22:04:03 -0800 | [diff] [blame] | 97 | .fi |
| 98 | .if n \{\ |
Jacob T Royal | 221af5e | 2009-05-04 18:28:26 -0700 | [diff] [blame] | 99 | .RE |
Michael Fang | 35c8ad6 | 2014-01-07 22:04:03 -0800 | [diff] [blame] | 100 | .\} |
| 101 | .PP |
Michael Fang | 9a7441f | 2015-07-27 16:49:10 -0700 | [diff] [blame] | 102 | ¥Í¡¼¥à¡¦¥µ¡¼¥Ð¡¼¡¦¥Ý¡¼¥È¤ò»ØÄꤷ¤Ê¤¤¾ì¹ç¡¢¥Ç¥Õ¥©¥ë¥È¤Ç¥Ý¡¼¥È900¤¬»ÈÍѤµ¤ì¤Þ¤¹¡£Oracle Solaris¥½¥Õ¥È¥¦¥§¥¢¤Î¼Â¹Ô»þ¡¢1024¤è¤ê¾®¤µ¤¤¥Ý¡¼¥È¤Ç¥×¥í¥»¥¹¤ò³«»Ï¤¹¤ë¾ì¹ç¤Ï¡¢root¥æ¡¼¥¶¡¼¤Ë¤Ê¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£¤³¤Î¤¿¤á¡¢1024°Ê¾å¤Î¥Ý¡¼¥ÈÈÖ¹æ¤ò»ÈÍѤ¹¤ë¤³¤È¤ò¤ªÁ¦¤á¤·¤Þ¤¹¡£1050¤Î¤è¤¦¤ËÊ̤Υݡ¼¥È¤ò»ØÄꤷ¡¢¥Í¡¼¥à¡¦¥µ¡¼¥Ó¥¹¤ò¥Ð¥Ã¥¯¥°¥é¥¦¥ó¥É¤Ç¼Â¹Ô¤¹¤ë¤Ë¤Ï¡¢Solaris¡¢Linux¤Þ¤¿¤ÏOS X¥³¥Þ¥ó¥É¡¦¥·¥§¥ë¤Ç¼¡¤Î¤è¤¦¤ËÆþÎϤ·¤Þ¤¹¡£ |
Michael Fang | 35c8ad6 | 2014-01-07 22:04:03 -0800 | [diff] [blame] | 103 | .sp |
| 104 | .if n \{\ |
| 105 | .RS 4 |
| 106 | .\} |
J. Duke | 319a3b9 | 2007-12-01 00:00:00 +0000 | [diff] [blame] | 107 | .nf |
Michael Fang | 9a7441f | 2015-07-27 16:49:10 -0700 | [diff] [blame] | 108 | \fBtnameserv \-ORBInitialPort 1050&\fR |
| 109 | |
J. Duke | 319a3b9 | 2007-12-01 00:00:00 +0000 | [diff] [blame] | 110 | .fi |
Michael Fang | 35c8ad6 | 2014-01-07 22:04:03 -0800 | [diff] [blame] | 111 | .if n \{\ |
| 112 | .RE |
| 113 | .\} |
| 114 | .PP |
Michael Fang | 9a7441f | 2015-07-27 16:49:10 -0700 | [diff] [blame] | 115 | Windows¤ÎMS\-DOS¥·¥¹¥Æ¥à¡¦¥×¥í¥ó¥×¥È¤Ç¤Ï¡¢¼¡¤Î¤è¤¦¤ËÆþÎϤ·¤Þ¤¹¡£ |
Michael Fang | 35c8ad6 | 2014-01-07 22:04:03 -0800 | [diff] [blame] | 116 | .sp |
| 117 | .if n \{\ |
| 118 | .RS 4 |
| 119 | .\} |
J. Duke | 319a3b9 | 2007-12-01 00:00:00 +0000 | [diff] [blame] | 120 | .nf |
Michael Fang | 9a7441f | 2015-07-27 16:49:10 -0700 | [diff] [blame] | 121 | \fBstart tnameserv \-ORBInitialPort 1050\fR |
| 122 | |
J. Duke | 319a3b9 | 2007-12-01 00:00:00 +0000 | [diff] [blame] | 123 | .fi |
Michael Fang | 35c8ad6 | 2014-01-07 22:04:03 -0800 | [diff] [blame] | 124 | .if n \{\ |
| 125 | .RE |
| 126 | .\} |
| 127 | .PP |
Michael Fang | 9a7441f | 2015-07-27 16:49:10 -0700 | [diff] [blame] | 128 | ¥Í¡¼¥à¡¦¥µ¡¼¥Ð¡¼¤Î¥¯¥é¥¤¥¢¥ó¥È¤Ë¤Ï¡¢¿·¤·¤¤¥Ý¡¼¥ÈÈÖ¹æ¤òÃΤ餻¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£¤³¤ì¤ò¹Ô¤¦¤Ë¤Ï¡¢ORB¥ª¥Ö¥¸¥§¥¯¥È¤ÎºîÀ®»þ¤Ë\fBorg\&.omg\&.CORBA\&.ORBInitialPort\fR¥×¥í¥Ñ¥Æ¥£¤Ë¿·¤·¤¤¥Ý¡¼¥ÈÈÖ¹æ¤òÀßÄꤷ¤Þ¤¹¡£ |
| 129 | .SS "°Û¤Ê¤ë¥Û¥¹¥È¾å¤Ç¤Î¥µ¡¼¥Ð¡¼¤È¥¯¥é¥¤¥¢¥ó¥È¤Î¼Â¹Ô" |
Michael Fang | 35c8ad6 | 2014-01-07 22:04:03 -0800 | [diff] [blame] | 130 | .PP |
Michael Fang | 9a7441f | 2015-07-27 16:49:10 -0700 | [diff] [blame] | 131 | Java IDL¤ÈRMI\-IIOP¤Î¤Û¤È¤ó¤É¤Î¥Á¥å¡¼¥È¥ê¥¢¥ë¤Ç¤Ï¡¢¥Í¡¼¥ß¥ó¥°¡¦¥µ¡¼¥Ó¥¹¡¢¥µ¡¼¥Ð¡¼¤ª¤è¤Ó¥¯¥é¥¤¥¢¥ó¥È¤Ï¤¹¤Ù¤Æ³«È¯ÍѤΥޥ·¥ó¾å¤Ç¼Â¹Ô¤µ¤ì¤Þ¤¹¡£¼ÂºÝ¤Ë¥Ç¥×¥í¥¤¥á¥ó¥È¤¹¤ë¾ì¹ç¤Ë¤Ï¡¢¥¯¥é¥¤¥¢¥ó¥È¤È¥µ¡¼¥Ð¡¼¤ò¡¢¥Í¡¼¥ß¥ó¥°¡¦¥µ¡¼¥Ó¥¹¤È¤Ï°Û¤Ê¤ë¥Û¥¹¥È¡¦¥Þ¥·¥ó¾å¤Ç¼Â¹Ô¤¹¤ë¤³¤È¤¬Â¿¤¯¤Ê¤ê¤Þ¤¹¡£ |
Michael Fang | 35c8ad6 | 2014-01-07 22:04:03 -0800 | [diff] [blame] | 132 | .PP |
Michael Fang | 9a7441f | 2015-07-27 16:49:10 -0700 | [diff] [blame] | 133 | ¥¯¥é¥¤¥¢¥ó¥È¤È¥µ¡¼¥Ð¡¼¤¬¥Í¡¼¥à¡¦¥µ¡¼¥Ó¥¹¤ò¸«¤Ä¤±¤ë¤Ë¤Ï¡¢¥¯¥é¥¤¥¢¥ó¥È¤È¥µ¡¼¥Ð¡¼¤¬¡¢¥Í¡¼¥à¡¦¥µ¡¼¥Ó¥¹¤¬¼Â¹Ô¤µ¤ì¤Æ¤¤¤ë¥Ý¡¼¥È¤ÎÈÖ¹æ¤È¥Û¥¹¥È¤òǧ¼±¤·¤Æ¤¤¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£¤½¤Î¤¿¤á¤Ë¤Ï¡¢¥¯¥é¥¤¥¢¥ó¥È¤È¥µ¡¼¥Ð¡¼¤Î¥Õ¥¡¥¤¥ëÆâ¤Î\fBorg\&.omg\&.CORBA\&.ORBInitialPort\fR¥×¥í¥Ñ¥Æ¥£¤È\fBorg\&.omg\&.CORBA\&.ORBInitialHost\fR¥×¥í¥Ñ¥Æ¥£¤ò¥Í¡¼¥à¡¦¥µ¡¼¥Ó¥¹¤¬¼Â¹Ô¤µ¤ì¤Æ¤¤¤ë¥Ý¡¼¥È¤ÎÈÖ¹æ¤È¥Þ¥·¥ó¤Î̾Á°¤ËÀßÄꤷ¤Þ¤¹¡£¤³¤ÎÎã¤Ï¡¢¡ÖGetting Started Using RMI\-IIOP¡× |
| 134 | (http://docs\&.oracle\&.com/javase/8/docs/technotes/guides/rmi\-iiop/rmiiiopexample\&.html)¤Ë¼¨¤µ¤ì¤Æ¤¤¤Þ¤¹ |
Michael Fang | 35c8ad6 | 2014-01-07 22:04:03 -0800 | [diff] [blame] | 135 | .PP |
Michael Fang | 9a7441f | 2015-07-27 16:49:10 -0700 | [diff] [blame] | 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¡× |
| 137 | ¤ò»²¾È¤·¤Æ¤¯¤À¤µ¤¤ |
Michael Fang | 35c8ad6 | 2014-01-07 22:04:03 -0800 | [diff] [blame] | 138 | .PP |
Michael Fang | 9a7441f | 2015-07-27 16:49:10 -0700 | [diff] [blame] | 139 | ¤¿¤È¤¨¤Ð¡¢°ì»þ¥Í¡¼¥à¡¦¥µ¡¼¥Ó¥¹\fBtnameserv\fR¤¬¡¢¥Û¥¹¥È\fBnameserverhost\fR¤Î¥Ý¡¼¥È1050¾å¤Ç¼Â¹Ô¤µ¤ì¤Æ¤¤¤ë¤È¤·¤Þ¤¹¡£¤µ¤é¤Ë¡¢¥¯¥é¥¤¥¢¥ó¥È¤¬¥Û¥¹¥È\fBclienthost\fR¾å¤Ç¼Â¹Ô¤µ¤ì¡¢¥µ¡¼¥Ð¡¼¤Ï¥Û¥¹¥È\fBserverhost\fR¾å¤Ç¼Â¹Ô¤µ¤ì¤Æ¤¤¤ë¤È¤·¤Þ¤¹¡£ |
Michael Fang | 35c8ad6 | 2014-01-07 22:04:03 -0800 | [diff] [blame] | 140 | .PP |
Michael Fang | 9a7441f | 2015-07-27 16:49:10 -0700 | [diff] [blame] | 141 | ¥Û¥¹¥È\fBnameserverhost\fR¾å¤Ç\fBtnameserv\fR¤òµ¯Æ°¤·¤Þ¤¹¡£ |
Michael Fang | 35c8ad6 | 2014-01-07 22:04:03 -0800 | [diff] [blame] | 142 | .sp |
| 143 | .if n \{\ |
| 144 | .RS 4 |
| 145 | .\} |
J. Duke | 319a3b9 | 2007-12-01 00:00:00 +0000 | [diff] [blame] | 146 | .nf |
Michael Fang | 9a7441f | 2015-07-27 16:49:10 -0700 | [diff] [blame] | 147 | \fBtnameserv \-ORBInitialPort 1050\fR |
| 148 | |
J. Duke | 319a3b9 | 2007-12-01 00:00:00 +0000 | [diff] [blame] | 149 | .fi |
Michael Fang | 35c8ad6 | 2014-01-07 22:04:03 -0800 | [diff] [blame] | 150 | .if n \{\ |
| 151 | .RE |
| 152 | .\} |
| 153 | .PP |
Michael Fang | 9a7441f | 2015-07-27 16:49:10 -0700 | [diff] [blame] | 154 | \fBserverhost\fR¾å¤Ç¥µ¡¼¥Ð¡¼¤òµ¯Æ°¤·¤Þ¤¹¡£ |
Michael Fang | 35c8ad6 | 2014-01-07 22:04:03 -0800 | [diff] [blame] | 155 | .sp |
| 156 | .if n \{\ |
| 157 | .RS 4 |
| 158 | .\} |
J. Duke | 319a3b9 | 2007-12-01 00:00:00 +0000 | [diff] [blame] | 159 | .nf |
Michael Fang | 9a7441f | 2015-07-27 16:49:10 -0700 | [diff] [blame] | 160 | \fBjava Server \-ORBInitialPort 1050 \-ORBInitialHost nameserverhost\fR |
| 161 | |
J. Duke | 319a3b9 | 2007-12-01 00:00:00 +0000 | [diff] [blame] | 162 | .fi |
Michael Fang | 35c8ad6 | 2014-01-07 22:04:03 -0800 | [diff] [blame] | 163 | .if n \{\ |
| 164 | .RE |
| 165 | .\} |
| 166 | .PP |
J. Duke | 319a3b9 | 2007-12-01 00:00:00 +0000 | [diff] [blame] | 167 | |
Michael Fang | 9a7441f | 2015-07-27 16:49:10 -0700 | [diff] [blame] | 168 | \fBclienthost\fR¾å¤Ç¥¯¥é¥¤¥¢¥ó¥È¤òµ¯Æ°¤·¤Þ¤¹¡£ |
Michael Fang | 35c8ad6 | 2014-01-07 22:04:03 -0800 | [diff] [blame] | 169 | .sp |
| 170 | .if n \{\ |
| 171 | .RS 4 |
| 172 | .\} |
J. Duke | 319a3b9 | 2007-12-01 00:00:00 +0000 | [diff] [blame] | 173 | .nf |
Michael Fang | 9a7441f | 2015-07-27 16:49:10 -0700 | [diff] [blame] | 174 | \fBjava Client \-ORBInitialPort 1050 \-ORBInitialHost nameserverhost\fR |
| 175 | |
J. Duke | 319a3b9 | 2007-12-01 00:00:00 +0000 | [diff] [blame] | 176 | .fi |
Michael Fang | 35c8ad6 | 2014-01-07 22:04:03 -0800 | [diff] [blame] | 177 | .if n \{\ |
| 178 | .RE |
| 179 | .\} |
Michael Fang | 9a7441f | 2015-07-27 16:49:10 -0700 | [diff] [blame] | 180 | .SS "¥Í¡¼¥ß¥ó¥°¡¦¥µ¡¼¥Ó¥¹¤ÎÄä»ß" |
Michael Fang | 35c8ad6 | 2014-01-07 22:04:03 -0800 | [diff] [blame] | 181 | .PP |
Michael Fang | 9a7441f | 2015-07-27 16:49:10 -0700 | [diff] [blame] | 182 | Java IDL¥Í¡¼¥ß¥ó¥°¡¦¥µ¡¼¥Ó¥¹¤òÄä»ß¤¹¤ë¤Ë¤Ï¡¢Solaris¡¢Linux¤Þ¤¿¤ÏOS X¤Î¾ì¹ç¤Ï¡¢\fBkill\fR¤Ê¤É¤Î¥ª¥Ú¥ì¡¼¥Æ¥£¥ó¥°¡¦¥·¥¹¥Æ¥à¤Î¥³¥Þ¥ó¥É¤ò»ÈÍѤ·¡¢Windows¤Î¾ì¹ç¤Ï¡¢\fB[Ctrl]+[C]\fR¥¡¼¤ò»ÈÍѤ·¤Þ¤¹¡£¥Í¡¼¥ß¥ó¥°¡¦¥µ¡¼¥Ó¥¹¤òÌÀ¼¨Åª¤ËÄä»ß¤¹¤ë¤Þ¤Ç¤Ï¡¢¸Æ½Ð¤·ÂÔµ¡¾õÂÖ¤¬Â³¤¤Þ¤¹¡£¥µ¡¼¥Ó¥¹¤ò½ªÎ»¤µ¤»¤ë¤È¡¢Java IDL¥Í¡¼¥à¡¦¥µ¡¼¥Ó¥¹¤ËÅÐÏ¿¤µ¤ì¤Æ¤¤¤ë̾Á°¤Ï¼º¤ï¤ì¤Þ¤¹¡£ |
| 183 | .SH "¥ª¥×¥·¥ç¥ó" |
Michael Fang | 35c8ad6 | 2014-01-07 22:04:03 -0800 | [diff] [blame] | 184 | .PP |
| 185 | \-J\fIoption\fR |
| 186 | .RS 4 |
Michael Fang | 9a7441f | 2015-07-27 16:49:10 -0700 | [diff] [blame] | 187 | Java Virtual Machine¤Ë\fBoption\fR¤òÅϤ·¤Þ¤¹¡£\fBoption\fR¤Ë¤Ï¡¢Java¥¢¥×¥ê¥±¡¼¥·¥ç¥óµ¯Æ°¥Ä¡¼¥ë¤Î¥ê¥Õ¥¡¥ì¥ó¥¹¡¦¥Ú¡¼¥¸¤ËµºÜ¤µ¤ì¤Æ¤¤¤ë¥ª¥×¥·¥ç¥ó¤ò1¤Ä»ØÄꤷ¤Þ¤¹¡£¤¿¤È¤¨¤Ð¡¢\fB\-J\-Xms48m\fR¤È»ØÄꤹ¤ë¤È¡¢¥¹¥¿¡¼¥È¥¢¥Ã¥×¡¦¥á¥â¥ê¡¼¤Ï48MB¤ËÀßÄꤵ¤ì¤Þ¤¹¡£java(1)¤ò»²¾È¤·¤Æ¤¯¤À¤µ¤¤¡£ |
Michael Fang | 35c8ad6 | 2014-01-07 22:04:03 -0800 | [diff] [blame] | 188 | .RE |
Michael Fang | 9a7441f | 2015-07-27 16:49:10 -0700 | [diff] [blame] | 189 | .SH "Îã" |
| 190 | .SS "¥Í¡¼¥à¥¹¥Ú¡¼¥¹¤Ø¤Î¥ª¥Ö¥¸¥§¥¯¥È¤ÎÄɲÃ" |
Michael Fang | 35c8ad6 | 2014-01-07 22:04:03 -0800 | [diff] [blame] | 191 | .PP |
Michael Fang | 9a7441f | 2015-07-27 16:49:10 -0700 | [diff] [blame] | 192 | ¼¡¤ÎÎã¤Ç¤Ï¡¢¥Í¡¼¥à¥¹¥Ú¡¼¥¹¤Ë̾Á°¤òÄɲ乤ëÊýË¡¤ò¼¨¤·¤Þ¤¹¡£¤³¤Î¥µ¥ó¥×¥ë¡¦¥×¥í¥°¥é¥à¤Ï¡¢¼«¸Ê´°·ë·¿¤Î°ì»þ¥Í¡¼¥à¡¦¥µ¡¼¥Ó¥¹¡¦¥¯¥é¥¤¥¢¥ó¥È¤Ç¡¢¼¡¤Î¤è¤¦¤Êñ½ã¤Ê¥Ä¥ê¡¼¤òºîÀ®¤¹¤ë¤â¤Î¤Ç¤¹¡£ |
Michael Fang | 35c8ad6 | 2014-01-07 22:04:03 -0800 | [diff] [blame] | 193 | .sp |
| 194 | .if n \{\ |
| 195 | .RS 4 |
| 196 | .\} |
J. Duke | 319a3b9 | 2007-12-01 00:00:00 +0000 | [diff] [blame] | 197 | .nf |
Michael Fang | 9a7441f | 2015-07-27 16:49:10 -0700 | [diff] [blame] | 198 | \fBInitial Naming Context\fR |
| 199 | \fB plans\fR |
| 200 | \fB Personal\fR |
| 201 | \fB calendar\fR |
| 202 | \fB schedule\fR |
Jacob T Royal | 221af5e | 2009-05-04 18:28:26 -0700 | [diff] [blame] | 203 | |
Michael Fang | 35c8ad6 | 2014-01-07 22:04:03 -0800 | [diff] [blame] | 204 | .fi |
| 205 | .if n \{\ |
| 206 | .RE |
| 207 | .\} |
| 208 | .PP |
Michael Fang | 9a7441f | 2015-07-27 16:49:10 -0700 | [diff] [blame] | 209 | ¤³¤ÎÎã¤Ç¡¢\fBplans\fR¤Ï¥ª¥Ö¥¸¥§¥¯¥È»²¾È¡¢\fBPersonal\fR¤Ï\fBcalendar\fR¤È\fBschedule\fR¤Î2¤Ä¤Î¥ª¥Ö¥¸¥§¥¯¥È»²¾È¤ò´Þ¤à¥Í¡¼¥ß¥ó¥°¡¦¥³¥ó¥Æ¥¥¹¥È¤Ç¤¹¡£ |
Michael Fang | 35c8ad6 | 2014-01-07 22:04:03 -0800 | [diff] [blame] | 210 | .sp |
| 211 | .if n \{\ |
| 212 | .RS 4 |
| 213 | .\} |
| 214 | .nf |
Michael Fang | 9a7441f | 2015-07-27 16:49:10 -0700 | [diff] [blame] | 215 | \fBimport java\&.util\&.Properties;\fR |
| 216 | \fBimport org\&.omg\&.CORBA\&.*;\fR |
| 217 | \fBimport org\&.omg\&.CosNaming\&.*;\fR |
| 218 | \fB \fR |
| 219 | \fBpublic class NameClient {\fR |
Michael Fang | 35c8ad6 | 2014-01-07 22:04:03 -0800 | [diff] [blame] | 220 | |
Michael Fang | 9a7441f | 2015-07-27 16:49:10 -0700 | [diff] [blame] | 221 | \fB public static void main(String args[]) {\fR |
Michael Fang | 35c8ad6 | 2014-01-07 22:04:03 -0800 | [diff] [blame] | 222 | |
Michael Fang | 9a7441f | 2015-07-27 16:49:10 -0700 | [diff] [blame] | 223 | \fB try {\fR |
Michael Fang | 35c8ad6 | 2014-01-07 22:04:03 -0800 | [diff] [blame] | 224 | |
Michael Fang | 35c8ad6 | 2014-01-07 22:04:03 -0800 | [diff] [blame] | 225 | .fi |
| 226 | .if n \{\ |
| 227 | .RE |
| 228 | .\} |
Michael Fang | 9a7441f | 2015-07-27 16:49:10 -0700 | [diff] [blame] | 229 | .PP |
| 230 | ¥Í¡¼¥ß¥ó¥°¡¦¥µ¡¼¥Ó¥¹¤Îµ¯Æ°¤Ç¡¢\fBnameserver\fR¤Ï¥Ý¡¼¥È1050¤Çµ¯Æ°¤µ¤ì¤Þ¤·¤¿¡£¼¡¤Î¥³¡¼¥É¤Ç¡¢¤³¤Î¥Ý¡¼¥ÈÈÖ¹æ¤ò¥¯¥é¥¤¥¢¥ó¥È¡¦¥·¥¹¥Æ¥à¤ËÃΤ餻¤Þ¤¹¡£ |
| 231 | .sp |
| 232 | .if n \{\ |
| 233 | .RS 4 |
| 234 | .\} |
| 235 | .nf |
| 236 | \fB Properties props = new Properties();\fR |
| 237 | \fB props\&.put("org\&.omg\&.CORBA\&.ORBInitialPort", "1050");\fR |
| 238 | \fB ORB orb = ORB\&.init(args, props);\fR |
| 239 | |
| 240 | .fi |
| 241 | .if n \{\ |
| 242 | .RE |
| 243 | .\} |
| 244 | .PP |
| 245 | ¼¡¤Î¥³¡¼¥É¤Ç¤Ï¡¢½é´ü¥Í¡¼¥ß¥ó¥°¡¦¥³¥ó¥Æ¥¥¹¥È¤ò¼èÆÀ¤·¡¢¤½¤ì¤ò\fBctx\fR¤ËÂåÆþ¤·¤Þ¤¹¡£2¹ÔÌܤǤϡ¢\fBctx\fR¤ò¥À¥ß¡¼¤Î¥ª¥Ö¥¸¥§¥¯¥È»²¾È\fBobjref\fR¤Ë¥³¥Ô¡¼¤·¤Þ¤¹¡£¤³¤Îobjref¤Ë¤Ï¡¢¤¢¤È¤ÇÍÍ¡¹¤Ê̾Á°¤ò³ä¤êÅö¤Æ¤Æ¥Í¡¼¥à¥¹¥Ú¡¼¥¹¤ËÄɲä·¤Þ¤¹¡£ |
| 246 | .sp |
| 247 | .if n \{\ |
| 248 | .RS 4 |
| 249 | .\} |
| 250 | .nf |
| 251 | \fB NamingContext ctx =\fR |
| 252 | \fB NamingContextHelper\&.narrow(\fR |
| 253 | \fB orb\&.resolve_initial_references("NameService"));\fR |
| 254 | \fB NamingContext objref = ctx;\fR |
| 255 | |
| 256 | .fi |
| 257 | .if n \{\ |
| 258 | .RE |
| 259 | .\} |
| 260 | .PP |
| 261 | ¼¡¤Î¥³¡¼¥É¤Ç¤Ï¡¢\fBtext\fR¥¿¥¤¥×¤Î̾Á°\fBplans\fR¤òºîÀ®¤·¡¢¤½¤ì¤ò¥À¥ß¡¼¤Î¥ª¥Ö¥¸¥§¥¯¥È»²¾È¤Ë¥Ð¥¤¥ó¥É¤·¤Þ¤¹¡£¤½¤Î¸å¡¢\fBrebind\fR¥á¥½¥Ã¥É¤ò»ÈÍѤ·¤Æ½é´ü¥Í¡¼¥ß¥ó¥°¡¦¥³¥ó¥Æ¥¥¹¥È¤Î²¼¤Ë\fBplans\fR¤òÄɲ䷤Ƥ¤¤Þ¤¹¡£\fBrebind\fR¥á¥½¥Ã¥É¤ò»ÈÍѤ¹¤ì¤Ð¡¢\fBbind\fR¥á¥½¥Ã¥É¤ò»ÈÍѤ·¤¿¾ì¹ç¤ËȯÀ¸¤¹¤ëÎã³°¤òȯÀ¸¤µ¤»¤º¤Ë¡¢¤³¤Î¥×¥í¥°¥é¥à¤ò²¿Å٤ⷫÊÖ¤·¼Â¹Ô¤Ç¤¤Þ¤¹¡£ |
| 262 | .sp |
| 263 | .if n \{\ |
| 264 | .RS 4 |
| 265 | .\} |
| 266 | .nf |
| 267 | \fB NameComponent nc1 = new NameComponent("plans", "text");\fR |
| 268 | \fB NameComponent[] name1 = {nc1};\fR |
| 269 | \fB ctx\&.rebind(name1, objref);\fR |
| 270 | \fB System\&.out\&.println("plans rebind successful!");\fR |
| 271 | |
| 272 | .fi |
| 273 | .if n \{\ |
| 274 | .RE |
| 275 | .\} |
| 276 | .PP |
| 277 | ¼¡¤Î¥³¡¼¥É¤Ç¤Ï¡¢\fBdirectory\fR¥¿¥¤¥×¤Î\fBPersonal\fR¤È¤¤¤¦¥Í¡¼¥ß¥ó¥°¡¦¥³¥ó¥Æ¥¥¹¥È¤òºîÀ®¤·¤Þ¤¹¡£¤½¤Î·ë²ÌÆÀ¤é¤ì¤ë¥ª¥Ö¥¸¥§¥¯¥È»²¾È\fBctx2\fR¤ò\fBname\fR¤Ë¥Ð¥¤¥ó¥É¤·¡¢½é´ü¥Í¡¼¥ß¥ó¥°¡¦¥³¥ó¥Æ¥¥¹¥È¤ËÄɲä·¤Þ¤¹¡£ |
| 278 | .sp |
| 279 | .if n \{\ |
| 280 | .RS 4 |
| 281 | .\} |
| 282 | .nf |
| 283 | \fB NameComponent nc2 = new NameComponent("Personal", "directory");\fR |
| 284 | \fB NameComponent[] name2 = {nc2};\fR |
| 285 | \fB NamingContext ctx2 = ctx\&.bind_new_context(name2);\fR |
| 286 | \fB System\&.out\&.println("new naming context added\&.\&.");\fR |
| 287 | |
| 288 | .fi |
| 289 | .if n \{\ |
| 290 | .RE |
| 291 | .\} |
| 292 | .PP |
| 293 | »Ä¤ê¤Î¥³¡¼¥É¤Ç¤Ï¡¢¥À¥ß¡¼¤Î¥ª¥Ö¥¸¥§¥¯¥È»²¾È¤ò\fBschedule\fR¤È\fBcalendar\fR¤È¤¤¤¦Ì¾Á°¤Ç¥Í¡¼¥ß¥ó¥°¡¦¥³¥ó¥Æ¥¥¹¥È\fBPersonal\fR(\fBctx2\fR)¤Ë¥Ð¥¤¥ó¥É¤·¤Þ¤¹¡£ |
| 294 | .sp |
| 295 | .if n \{\ |
| 296 | .RS 4 |
| 297 | .\} |
| 298 | .nf |
| 299 | \fB NameComponent nc3 = new NameComponent("schedule", "text");\fR |
| 300 | \fB NameComponent[] name3 = {nc3};\fR |
| 301 | \fB ctx2\&.rebind(name3, objref);\fR |
| 302 | \fB System\&.out\&.println("schedule rebind successful!");\fR |
| 303 | \fB \fR |
| 304 | \fB NameComponent nc4 = new NameComponent("calender", "text");\fR |
| 305 | \fB NameComponent[] name4 = {nc4};\fR |
| 306 | \fB ctx2\&.rebind(name4, objref);\fR |
| 307 | \fB System\&.out\&.println("calender rebind successful!");\fR |
| 308 | \fB } catch (Exception e) {\fR |
| 309 | \fB e\&.printStackTrace(System\&.err);\fR |
| 310 | \fB }\fR |
| 311 | \fB }\fR |
| 312 | \fB}\fR |
| 313 | |
| 314 | .fi |
| 315 | .if n \{\ |
| 316 | .RE |
| 317 | .\} |
| 318 | .SS "¥Í¡¼¥à¥¹¥Ú¡¼¥¹¤Î»²¾È" |
| 319 | .PP |
| 320 | ¼¡¤Î¥µ¥ó¥×¥ë¡¦¥×¥í¥°¥é¥à¤Ç¤Ï¡¢¥Í¡¼¥à¥¹¥Ú¡¼¥¹¤ò¥Ö¥é¥¦¥º¤¹¤ëÊýË¡¤ò¼¨¤·¤Þ¤¹¡£ |
| 321 | .sp |
| 322 | .if n \{\ |
| 323 | .RS 4 |
| 324 | .\} |
| 325 | .nf |
| 326 | \fBimport java\&.util\&.Properties;\fR |
| 327 | \fBimport org\&.omg\&.CORBA\&.*;\fR |
| 328 | \fBimport org\&.omg\&.CosNaming\&.*;\fR |
| 329 | \fB \fR |
| 330 | \fBpublic class NameClientList {\fR |
| 331 | |
| 332 | \fB public static void main(String args[]) {\fR |
| 333 | |
| 334 | \fB try {\fR |
| 335 | |
| 336 | .fi |
| 337 | .if n \{\ |
| 338 | .RE |
| 339 | .\} |
| 340 | .PP |
| 341 | ¥Í¡¼¥ß¥ó¥°¡¦¥µ¡¼¥Ó¥¹¤Îµ¯Æ°¤Ç¡¢\fBnameserver\fR¤Ï¥Ý¡¼¥È1050¤Çµ¯Æ°¤µ¤ì¤Þ¤·¤¿¡£¼¡¤Î¥³¡¼¥É¤Ç¡¢¤³¤Î¥Ý¡¼¥ÈÈÖ¹æ¤ò¥¯¥é¥¤¥¢¥ó¥È¡¦¥·¥¹¥Æ¥à¤ËÃΤ餻¤Þ¤¹¡£ |
| 342 | .sp |
| 343 | .if n \{\ |
| 344 | .RS 4 |
| 345 | .\} |
| 346 | .nf |
| 347 | \fB Properties props = new Properties();\fR |
| 348 | \fB props\&.put("org\&.omg\&.CORBA\&.ORBInitialPort", "1050");\fR |
| 349 | \fB ORB orb = ORB\&.init(args, props);\fR |
| 350 | |
| 351 | .fi |
| 352 | .if n \{\ |
| 353 | .RE |
| 354 | .\} |
| 355 | .PP |
| 356 | ¼¡¤Î¥³¡¼¥É¤Ç¤Ï¡¢½é´ü¥Í¡¼¥ß¥ó¥°¡¦¥³¥ó¥Æ¥¥¹¥È¤ò¼èÆÀ¤·¤Æ¤¤¤Þ¤¹¡£ |
| 357 | .sp |
| 358 | .if n \{\ |
| 359 | .RS 4 |
| 360 | .\} |
| 361 | .nf |
| 362 | \fB NamingContext nc =\fR |
| 363 | \fB NamingContextHelper\&.narrow(\fR |
| 364 | \fB orb\&.resolve_initial_references("NameService"));\fR |
| 365 | |
| 366 | .fi |
| 367 | .if n \{\ |
| 368 | .RE |
| 369 | .\} |
| 370 | .PP |
| 371 | \fBlist\fR¥á¥½¥Ã¥É¤Ï¡¢¥Í¡¼¥ß¥ó¥°¡¦¥³¥ó¥Æ¥¥¹¥È¤Î¥Ð¥¤¥ó¥Ç¥£¥ó¥°¤ò¥ê¥¹¥È¤·¤Þ¤¹¡£¤³¤Î¾ì¹ç¡¢ºÇÂç1000¸Ä¤Þ¤Ç¤Î¥Ð¥¤¥ó¥Ç¥£¥ó¥°¤¬½é´ü¥Í¡¼¥ß¥ó¥°¡¦¥³¥ó¥Æ¥¥¹¥È¤«¤é\fBBindingListHolder\fR¤ËÊÖ¤µ¤ì¤Þ¤¹¡£»Ä¤ê¤Î¥Ð¥¤¥ó¥Ç¥£¥ó¥°¤Ï¡¢\fBBindingIteratorHolder\fR¤ËÊÖ¤µ¤ì¤Þ¤¹¡£ |
| 372 | .sp |
| 373 | .if n \{\ |
| 374 | .RS 4 |
| 375 | .\} |
| 376 | .nf |
| 377 | \fB BindingListHolder bl = new BindingListHolder();\fR |
| 378 | \fB BindingIteratorHolder blIt= new BindingIteratorHolder();\fR |
| 379 | \fB nc\&.list(1000, bl, blIt);\fR |
| 380 | |
| 381 | .fi |
| 382 | .if n \{\ |
| 383 | .RE |
| 384 | .\} |
| 385 | .PP |
| 386 | ¼¡¤Î¥³¡¼¥É¤Ç¤Ï¡¢ÊÖ¤µ¤ì¤¿\fBBindingListHolder\fR¤«¤é¥Ð¥¤¥ó¥Ç¥£¥ó¥°¤ÎÇÛÎó¤ò¼èÆÀ¤·¤Þ¤¹¡£¥Ð¥¤¥ó¥Ç¥£¥ó¥°¤¬¤Ê¤¤¾ì¹ç¤Ï¡¢¥×¥í¥°¥é¥à¤¬½ªÎ»¤·¤Þ¤¹¡£ |
| 387 | .sp |
| 388 | .if n \{\ |
| 389 | .RS 4 |
| 390 | .\} |
| 391 | .nf |
| 392 | \fB Binding bindings[] = bl\&.value;\fR |
| 393 | \fB if (bindings\&.length == 0) return;\fR |
| 394 | |
| 395 | .fi |
| 396 | .if n \{\ |
| 397 | .RE |
| 398 | .\} |
| 399 | .PP |
| 400 | »Ä¤ê¤Î¥³¡¼¥É¤Ç¤Ï¡¢¥Ð¥¤¥ó¥Ç¥£¥ó¥°¤ËÂФ·¤Æ¥ë¡¼¥×½èÍý¤ò¹Ô¤¤¡¢Ì¾Á°¤ò½ÐÎϤ·¤Þ¤¹¡£ |
| 401 | .sp |
| 402 | .if n \{\ |
| 403 | .RS 4 |
| 404 | .\} |
| 405 | .nf |
| 406 | \fB for (int i=0; i < bindings\&.length; i++) {\fR |
| 407 | \fB \fR |
| 408 | \fB // get the object reference for each binding\fR |
| 409 | \fB org\&.omg\&.CORBA\&.Object obj = nc\&.resolve(bindings[i]\&.binding_name);\fR |
| 410 | \fB String objStr = orb\&.object_to_string(obj);\fR |
| 411 | \fB int lastIx = bindings[i]\&.binding_name\&.length\-1;\fR |
| 412 | \fB \fR |
| 413 | \fB // check to see if this is a naming context\fR |
| 414 | \fB if (bindings[i]\&.binding_type == BindingType\&.ncontext) {\fR |
| 415 | \fB System\&.out\&.println("Context: " +\fR |
| 416 | \fB bindings[i]\&.binding_name[lastIx]\&.id);\fR |
| 417 | \fB } else {\fR |
| 418 | \fB System\&.out\&.println("Object: " +\fR |
| 419 | \fB bindings[i]\&.binding_name[lastIx]\&.id);\fR |
| 420 | \fB }\fR |
| 421 | \fB }\fR |
| 422 | \fB } catch (Exception e) {\fR |
| 423 | \fB e\&.printStackTrace(System\&.err)\fR |
| 424 | \fB }\fR |
| 425 | \fB }\fR |
| 426 | \fB}\fR |
| 427 | |
| 428 | .fi |
| 429 | .if n \{\ |
| 430 | .RE |
| 431 | .\} |
| 432 | .SH "´ØÏ¢¹àÌÜ" |
Michael Fang | 35c8ad6 | 2014-01-07 22:04:03 -0800 | [diff] [blame] | 433 | .sp |
| 434 | .RS 4 |
| 435 | .ie n \{\ |
| 436 | \h'-04'\(bu\h'+03'\c |
| 437 | .\} |
| 438 | .el \{\ |
| 439 | .sp -1 |
| 440 | .IP \(bu 2.3 |
| 441 | .\} |
| 442 | orbd(1) |
| 443 | .RE |
| 444 | .br |
| 445 | 'pl 8.5i |
| 446 | 'bp |