public class CorbaPort extends PortBase
CORBAを通信手段とするPortクラスです。
PortBase.connect_func, PortBase.disconnect_all_func, PortBase.disconnect_func, PortBase.find_conn_id, PortBase.find_interface, PortBase.find_port_ref
Modifier and Type | Field and Description |
---|---|
(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用フォーマットオブジェクト
|
m_connectionLimit, m_connectorsMutex, m_objref, m_onConnected, m_onConnectionLost, m_onConnectionLost_mutex, m_onDisconnected, m_onPublishInterfaces, m_onSubscribeInterfaces, m_onUnsubscribeInterfaces, m_ownerInstanceName, m_portconnListeners, m_profile, m_profile_mutex
Constructor and Description |
---|
CorbaPort(java.lang.String name)
コンストラクタです。
|
Modifier and Type | Method and Description |
---|---|
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
|
_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, onConnected, onConnectNextport, onDisconnected, onDisconnectNextport, onNotifyConnect, onNotifyDisconnect, onPublishInterfaces, onSubscribeInterfaces, onUnsubscribeInterfaces, setConnectionLimit, setName, setOnConnected, setOnConnectionLost, setOnDisconnected, setOnPublishInterfaces, setOnSubscribeInterfaces, setOnUnsubscribeInterfaces, setOwner, setPortConnectListenerHolder, setPortRef, setUUID, updateConnectorProfile, updateConnectors
_all_interfaces, _invoke, _this
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
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 servanttype_name
-
Type name of the servantprovider
-
CORBA servantorg.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()
This operation activate all interfaces that is registered in the ports.
activateInterfaces
in class PortBase
public void deactivateInterfaces()
This operation deactivate all interfaces that is registered in the ports.
deactivateInterfaces
in class PortBase
protected ReturnCode_t publishInterfaces(ConnectorProfileHolder connector_profile)
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,
publishInterfaces
in class PortBase
connector_profile
-
Connector profileprotected ReturnCode_t subscribeInterfaces(ConnectorProfileHolder connector_profile)
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.
subscribeInterfaces
in class PortBase
connector_profile
-
Connector profileprotected void unsubscribeInterfaces(ConnectorProfile connector_profile)
Release all Objects that was set in Consumer associated with the given ConnectorProfile.
unsubscribeInterfaces
in class PortBase
connector_profile
-
Connector profile