[openrtm-commit:00480] r596 - branches/work/SourceSharing/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC
openrtm @ openrtm.org
openrtm @ openrtm.org
2011年 12月 8日 (木) 14:42:14 JST
Author: fsi-katami
Date: 2011-12-08 14:42:14 +0900 (Thu, 08 Dec 2011)
New Revision: 596
Modified:
branches/work/SourceSharing/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/IopIorInterceptor.java
Log:
Add comments.
Modified: branches/work/SourceSharing/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/IopIorInterceptor.java
===================================================================
--- branches/work/SourceSharing/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/IopIorInterceptor.java 2011-12-08 04:30:12 UTC (rev 595)
+++ branches/work/SourceSharing/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/IopIorInterceptor.java 2011-12-08 05:42:14 UTC (rev 596)
@@ -14,6 +14,15 @@
import org.omg.IOP.TaggedComponent;
import org.omg.PortableInterceptor.IORInterceptor;
+/*
+//<+JacORB
+import org.jacorb.orb.etf.ProtocolAddressBase;
+import org.jacorb.orb.iiop.IIOPAddress;
+import org.jacorb.orb.iiop.IIOPProfile;
+import java.util.List;
+import java.util.Iterator;
+//+>
+*/
/**
* {@.ja ポータブルインターセプタを利用してIORを書き換える.}
@@ -93,6 +102,7 @@
return;
}
+ //<+ sun
com.sun.corba.se.spi.orb.ORB sunorb
= (com.sun.corba.se.spi.orb.ORB)orb;
@@ -103,7 +113,30 @@
= (com.sun.corba.se.spi.ior.iiop.IIOPProfileTemplate)iop.getTaggedProfileTemplate();
String host = ptemp.getPrimaryAddress().getHost();
short port = (short)ptemp.getPrimaryAddress().getPort();
+ //+>
+/*
+ //<+ JacORB
+ ProtocolAddressBase address = null;
+ org.jacorb.orb.ORB jacorb = (org.jacorb.orb.ORB)orb;
+ if (jacorb.getBasicAdapter() == null) {
+ return;
+ }
+ List eplist = jacorb.getBasicAdapter().getEndpointProfiles();
+ for (Iterator i = eplist.iterator(); i.hasNext(); ) {
+ org.omg.ETF.Profile p = (org.omg.ETF.Profile)i.next();
+ if (p instanceof IIOPProfile) {
+ address = ((IIOPProfile)p).getAddress();
+ break;
+ }
+ }
+ if (address == null) {
+ return;
+ }
+ short port = (short)((IIOPAddress)address).getPort();
+ //+>
+*/
+
for(int ic=0;ic<m_endpoints.size();ic++){
if(m_endpoints.get(ic).Port==0){
m_endpoints.get(ic).Port = port;
openrtm-commit メーリングリストの案内