|
||||||||||
前のクラス 次のクラス | フレームあり フレームなし | |||||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |
java.lang.Objectorg.omg.PortableServer.Servant
RTC.PortServicePOA
jp.go.aist.rtm.RTC.port.PortBase
jp.go.aist.rtm.RTC.port.CorbaPort
public class CorbaPort
CORBAを通信手段とするPortクラスです。
入れ子のクラスの概要 |
---|
クラス jp.go.aist.rtm.RTC.port.PortBase から継承された入れ子のクラス/インタフェース |
---|
PortBase.connect_func, PortBase.disconnect_all_func, PortBase.disconnect_func, PortBase.find_conn_id, PortBase.find_interface, PortBase.find_port_ref |
フィールドの概要 | |
---|---|
(package private) java.util.Vector<jp.go.aist.rtm.RTC.port.CorbaPort.CorbaConsumerHolder> |
m_consumers
|
protected Properties |
m_properties
Properties |
(package private) java.util.Vector<jp.go.aist.rtm.RTC.port.CorbaPort.CorbaProviderHolder> |
m_providers
Provider の情報を格納する vector |
protected Logbuf |
rtcout
Logging用フォーマットオブジェクト |
クラス jp.go.aist.rtm.RTC.port.PortBase から継承されたフィールド |
---|
m_connectionLimit, m_connectorsMutex, m_objref, m_onConnected, m_onConnectionLost, m_onDisconnected, m_onPublishInterfaces, m_onSubscribeInterfaces, m_onUnsubscribeInterfaces, m_ownerInstanceName, m_profile, m_profile_mutex |
コンストラクタの概要 | |
---|---|
CorbaPort(java.lang.String name)
コンストラクタです。 |
メソッドの概要 | |
---|---|
void |
activateInterfaces()
Port の全てのインターフェースを activates する Port に登録されている全てのインターフェースを activate する。 |
void |
deactivateInterfaces()
@brief 全ての Port のインターフェースを deactivates する Port に登録されている全てのインターフェースを deactivate する。 |
void |
init(Properties prop)
Initializing properties This operation initializes outport's properties. |
protected ReturnCode_t |
publishInterfaces(ConnectorProfileHolder connector_profile)
Provider Interface 情報を公開する {@.ja この Port が所有する Provider インターフェースに関する情報を ConnectorProfile::properties に代入し他の Port に対して公開する。 |
boolean |
registerConsumer(java.lang.String instance_name,
java.lang.String type_name,
CorbaConsumerBase consumer)
|
boolean |
registerProvider(java.lang.String instance_name,
java.lang.String type_name,
org.omg.PortableServer.Servant provider)
@brief Provider を登録する {@.ja この Port において提供したいサーバントをこの Port に対して登録す る。 |
protected ReturnCode_t |
subscribeInterfaces(ConnectorProfileHolder connector_profile)
Provider Interface 情報を取得する {@.ja この Portが所有する Consumer Interface に適合する Provider Interface に関する情報をConnectorProfile::properties から抽出し Consumer Interface にオブジェクト参照をセットする。 |
protected void |
unsubscribeInterfaces(ConnectorProfile connector_profile)
Interface への接続を解除する 与えられた ConnectorProfile に関連する Consumer にセットされた すべての Object を解放し接続を解除する。 |
クラス RTC.PortServicePOA から継承されたメソッド |
---|
_all_interfaces, _invoke, _this |
クラス org.omg.PortableServer.Servant から継承されたメソッド |
---|
_default_POA, _get_delegate, _get_interface_def, _is_a, _non_existent, _object_id, _orb, _poa, _set_delegate, _this_object, _this_object |
クラス java.lang.Object から継承されたメソッド |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
フィールドの詳細 |
---|
java.util.Vector<jp.go.aist.rtm.RTC.port.CorbaPort.CorbaProviderHolder> m_providers
java.util.Vector<jp.go.aist.rtm.RTC.port.CorbaPort.CorbaConsumerHolder> m_consumers
protected Logbuf rtcout
Logging用フォーマットオブジェクト
protected Properties m_properties
Properties
コンストラクタの詳細 |
---|
public CorbaPort(java.lang.String name)
コンストラクタです。
name
- Port名称メソッドの詳細 |
---|
public void init(Properties prop)
Initializing properties
This operation initializes outport's properties. If a property "connection_limit" is set and appropriate value is set to this property value, the number of maximum connection is set as this value. If the property does not exist or invalid value is set to this property, the maximum number of connection will be set unlimited.
prop
- properties of the CorbaPortpublic boolean registerProvider(java.lang.String instance_name, java.lang.String type_name, org.omg.PortableServer.Servant provider) throws org.omg.PortableServer.POAPackage.ServantAlreadyActive, org.omg.PortableServer.POAPackage.WrongPolicy, org.omg.PortableServer.POAPackage.ObjectNotActive
この Port において提供したいサーバントをこの Port に対して登録す る。サーバントは、引数で与えられる instance_name, type_name を、 サーバント自身のインスタンス名およびタイプ名として、サーバントに 関連付けられる。この関数により、サーバントは CorbaPort 内部に保 持されるとともに、PortInterfaceProfile にRTC::PROVIDED インター フェースとして登録される。
instance_name
- サーバントのインスタンス名
type_name
- サーバントのタイプ名
provider
- CORBA サーバント
org.omg.PortableServer.POAPackage.ServantAlreadyActive
org.omg.PortableServer.POAPackage.WrongPolicy
org.omg.PortableServer.POAPackage.ObjectNotActive
public boolean registerConsumer(java.lang.String instance_name, java.lang.String type_name, CorbaConsumerBase consumer)
public void activateInterfaces()
Port に登録されている全てのインターフェースを activate する。
PortBase
内の activateInterfaces
public void deactivateInterfaces()
Port に登録されている全てのインターフェースを deactivate する。
PortBase
内の deactivateInterfaces
protected ReturnCode_t publishInterfaces(ConnectorProfileHolder connector_profile)
この Port が所有する Provider インターフェースに関する情報を ConnectorProfile::properties に代入し他の Port に対して公開する。 今、RTCのインスタンス名等の情報が以下の通りであるとして、
PortBase
内の publishInterfaces
connector_profile
- コネクタプロファイル
protected ReturnCode_t subscribeInterfaces(ConnectorProfileHolder connector_profile)
この Portが所有する Consumer Interface に適合する Provider
Interface に関する情報をConnectorProfile::properties から抽出し
Consumer Interface にオブジェクト参照をセットする。
今、RTC のインスタンス名や Consumer Interface 等の情報が以下のと
おりであると仮定すると、
- RTCインスタンス名: rtc_iname
- ポート名: port_name
- インターフェース極性: if_polarity
- インターフェース型名: if_tname
- インターフェースインスタンス名: if_iname
この Consumer Interface を表すインターフェース指定子は以下のよう
に表される。
ConnectorProfile::properties =
{
prov0: IOR0,
prov1: IOR1,
prov2: IOR2,
cons0: prov2,
cons1: prov1,
cons2: prov0
}
このとき、cons(0..2) にはそれぞれ、参照が以下のようにセットされる。
cons0 = IOR2
cons1 = IOR1
cons2 = IOR0
なお、旧バージョンとの互換性のため、
ConnectorProfile::properties に Consumer Interface をキーとした
値がセットされていない場合でも、次のルールが適用される。
今、仮に Consumer Interface が
PortInterfaceProfile
{
instance_name = "PA10_0";
type_name = "Manipulator";
polarity = REQUIRED;
}
として登録されていれば、他の Port の
PortInterfaceProfile
{
instance_name = "PA10_0";
type_name = "Manipulator";
polarity = PROVIDED;
}
として登録されている Serivce Provider のオブジェクト参照を探し、
Consumer にセットする。実際には、ConnectorProfile::properties に
NameValue = { "port.Manipulator.PA10_0":
として登録されている NameValue を探し、そのオブジェクト参照を
Consumer にセットする。
PortBase
内の subscribeInterfaces
connector_profile
- コネクタプロファイル
protected void unsubscribeInterfaces(ConnectorProfile connector_profile)
与えられた ConnectorProfile に関連する Consumer にセットされた すべての Object を解放し接続を解除する。
PortBase
内の unsubscribeInterfaces
connector_profile
- コネクタプロファイルオブジェクト
|
||||||||||
前のクラス 次のクラス | フレームあり フレームなし | |||||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |