jp.go.aist.rtm.RTC.port
クラス CorbaPort

java.lang.Object
  上位を拡張 org.omg.PortableServer.Servant
      上位を拡張 RTC.PortServicePOA
          上位を拡張 jp.go.aist.rtm.RTC.port.PortBase
              上位を拡張 jp.go.aist.rtm.RTC.port.CorbaPort
すべての実装されたインタフェース:
SDOServiceOperations, org.omg.CORBA.portable.InvokeHandler, PortServiceOperations

public class CorbaPort
extends PortBase

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
           vector to stored Providers' information
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()
           Activate all Port interfaces
 void deactivateInterfaces()
           Deactivate all Port interfaces
 void init(Properties prop)
           Initializing properties
protected  ReturnCode_t publishInterfaces(ConnectorProfileHolder connector_profile)
           Publish information about interfaces
 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 Register the provider
protected  ReturnCode_t subscribeInterfaces(ConnectorProfileHolder connector_profile)
           Subscribe to interface
protected  void unsubscribeInterfaces(ConnectorProfile connector_profile)
           Unsubscribe interfaces
 
クラス jp.go.aist.rtm.RTC.port.PortBase から継承されたメソッド
_publishInterfaces, _this, addProperty, appendInterface, appendProperty, checkPorts, connect, connectNext, deleteInterface, disconnect_all, disconnect, disconnectNext, eraseConnectorProfile, findConnProfile, findConnProfileIndex, get_connector_profile, get_connector_profiles, get_port_profile, getName, getPortProfile, getPortRef, getProfile, getUUID, isEmptyId, isExistingConnId, notify_connect, notify_disconnect, setConnectionLimit, setName, setOnConnected, setOnConnectionLost, setOnDisconnected, setOnPublishInterfaces, setOnSubscribeInterfaces, setOnUnsubscribeInterfaces, setOwner, setPortRef, setUUID, updateConnectorProfile, updateConnectors
 
クラス 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
 

フィールドの詳細

m_providers

java.util.Vector<jp.go.aist.rtm.RTC.port.CorbaPort.CorbaProviderHolder> m_providers
vector to stored Providers' information


m_consumers

java.util.Vector<jp.go.aist.rtm.RTC.port.CorbaPort.CorbaConsumerHolder> m_consumers

rtcout

protected Logbuf rtcout

Logging用フォーマットオブジェクト


m_properties

protected Properties m_properties

Properties

コンストラクタの詳細

CorbaPort

public CorbaPort(java.lang.String name)

コンストラクタです。

パラメータ:
name - Port名称
メソッドの詳細

init

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 CorbaPort

registerProvider

public 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
brief Register the provider

This operation registers a servant, which is provided in this Port, to the Port. The servant is associated with "instance_name" and "type_name" as the instance name of the servant and as the type name of the servant. A given servant will be stored in the CorbaPort, and this is registered as RTC::PROVIDED interface into the PortInterfaceProfile.

パラメータ:
instance_name - Instance name of servant
type_name - Type name of the servant
provider - CORBA servant
戻り値:
Return false if the same name of instance_name is already registered.
例外:
org.omg.PortableServer.POAPackage.ServantAlreadyActive
org.omg.PortableServer.POAPackage.WrongPolicy
org.omg.PortableServer.POAPackage.ObjectNotActive

registerConsumer

public boolean registerConsumer(java.lang.String instance_name,
                                java.lang.String type_name,
                                CorbaConsumerBase consumer)

activateInterfaces

public void activateInterfaces()
Activate all Port interfaces

This operation activate all interfaces that is registered in the ports.

定義:
クラス PortBase 内の activateInterfaces

deactivateInterfaces

public void deactivateInterfaces()
Deactivate all Port interfaces

This operation deactivate all interfaces that is registered in the ports.

定義:
クラス PortBase 内の deactivateInterfaces

publishInterfaces

protected ReturnCode_t publishInterfaces(ConnectorProfileHolder connector_profile)
Publish information about interfaces

This operation publishes Provider interfaces information, which is owned by this port, to the other Ports via ConnectorProfile::properties. Now it is assumed RTC instance name and other information is as follows,

the following values are stored as the "name" and the "value" of the NameValue typee element in ConnectorProfile::properties. In addition, although the following NameValue values are also stored for the backward compatibility, this will be deleted in the future version. These values are stored in the ConnectorProfile::properties and are propagated to the other Ports. If the Consumer interface exists that requires this Provider interface, it will retrieve reference from the ConnectorProfile and utilize it.

定義:
クラス PortBase 内の publishInterfaces
パラメータ:
connector_profile - Connector profile
戻り値:
The return code of ReturnCode_t type

subscribeInterfaces

protected ReturnCode_t subscribeInterfaces(ConnectorProfileHolder connector_profile)
Subscribe to interface

Retrieve information associated with Provider matches Consumer owned by this port and set the object reference to Consumer. Now, Consumer is registered as the following:

  PortInterfaceProfile
  {
    instance_name = "PA10_0";
    type_name     = "Manipulator";
    polarity      = REQUIRED;
  }
 
Find the object reference of Serivce Provider that is registered as the following of other ports:
  PortInterfaceProfile
  {
    instance_name = "PA10_0";
    type_name     = "Manipulator";
    polarity      = PROVIDED;
  }
 
and set to Consumer. In fact, find NameValue that is registered as the following to ConnectorProfile::properties:
 NameValue = { "port.Manipulator.PA10_0":  }
 
 and set the object reference to Consumer.
 

定義:
クラス PortBase 内の subscribeInterfaces
パラメータ:
connector_profile - Connector profile
戻り値:
The return code of ReturnCode_t type

unsubscribeInterfaces

protected void unsubscribeInterfaces(ConnectorProfile connector_profile)
Unsubscribe interfaces

Release all Objects that was set in Consumer associated with the given ConnectorProfile.

定義:
クラス PortBase 内の unsubscribeInterfaces
パラメータ:
connector_profile - Connector profile