public class OutPortPullConnector extends OutPortConnector
Connector class of OutPort for pull type dataflow. When "pull" is specified as dataflow_type at the time of establishing connection, this object is generated and owned by the OutPort. This connector and InPortPullConnector make a pair and realize pull type dataflow of data ports. One connector corresponds to one connection which provides a data stream. Connector is distinguished by ID of the UUID that is generated at establishing connection. OutPortPullConnector owns and manages the following objects.
ConnectorBase.ConnectorInfo, ConnectorBase.ConnectorInfoHolder| Modifier and Type | Field and Description |
|---|---|
protected BufferBase<org.omg.CORBA.portable.OutputStream> |
m_buffer
the pointer to the buffer
|
protected OutPortProvider |
m_provider
the pointer to the OutPortProvider
|
m_directInPort, m_directMode, m_inPortListeners, m_isLittleEndian, m_profile, rtcout| Constructor and Description |
|---|
OutPortPullConnector(ConnectorBase.ConnectorInfo profile,
OutPortProvider provider,
ConnectorListeners listeners)
Constructor
|
OutPortPullConnector(ConnectorBase.ConnectorInfo profile,
OutPortProvider provider,
ConnectorListeners listeners,
BufferBase<org.omg.CORBA.portable.OutputStream> buffer)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
activate()
Connector activation
|
protected BufferBase<org.omg.CORBA.portable.OutputStream> |
createBuffer(ConnectorBase.ConnectorInfo profile)
create buffer
|
void |
deactivate()
Connector deactivation
|
ReturnCode |
disconnect()
disconnect
|
BufferBase<org.omg.CORBA.portable.OutputStream> |
getBuffer()
Getting Buffer
|
protected void |
onConnect()
Invoke callback when connection is established
|
protected void |
onDisconnect()
Invoke callback when connection is destroied
|
void |
setOutPortBase(OutPortBase outportbase)
Stores OutPortBase.
|
<DataType> ReturnCode |
write(DataType data)
Writing data
|
directMode, id, isLittleEndian, name, profile, setDirectMode, setEndian, setInPortprotected OutPortProvider m_provider
the pointer to the OutPortProvider
protected BufferBase<org.omg.CORBA.portable.OutputStream> m_buffer
the pointer to the buffer
public OutPortPullConnector(ConnectorBase.ConnectorInfo profile, OutPortProvider provider, ConnectorListeners listeners, BufferBase<org.omg.CORBA.portable.OutputStream> buffer) throws java.lang.Exception
OutPortPullConnector's constructor is given the following arguments. According to ConnectorInfo which includes connection information, a buffer is created. It is also given a pointer to the provider object for the OutPort interface. The owner-ship of the pointer is owned by this OutPortPullConnector, it has responsibility to destruct the OutPortProvider. OutPortPullConnector also has ConnectorListeners to provide event callback mechanisms, and they would be called at the proper timing. If data buffer is given by OutPortBase, the pointer to the buffer is also given as arguments.
profile -
ConnectorInfoprovider -
OutPortProviderlisteners -
ConnectorListeners type lsitener object listbuffer -
CdrBufferBase type bufferjava.lang.Exceptionpublic OutPortPullConnector(ConnectorBase.ConnectorInfo profile, OutPortProvider provider, ConnectorListeners listeners) throws java.lang.Exception
OutPortPullConnector's constructor is given the following arguments. According to ConnectorInfo which includes connection information, a buffer is created. It is also given a pointer to the provider object for the OutPort interface. The owner-ship of the pointer is owned by this OutPortPullConnector, it has responsibility to destruct the OutPortProvider. OutPortPullConnector also has ConnectorListeners to provide event callback mechanisms, and they would be called at the proper timing.
profile -
ConnectorInfoprovider -
OutPortProviderlisteners -
ConnectorListeners type lsitener object listjava.lang.Exceptionpublic <DataType> ReturnCode write(DataType data)
This operation writes data into publisher and then the data will be transferred to correspondent InPort.
write in class OutPortConnectorpublic ReturnCode disconnect()
This operation destruct and delete the consumer, the publisher and the buffer.
disconnect in class OutPortConnectorpublic BufferBase<org.omg.CORBA.portable.OutputStream> getBuffer()
This operation returns this connector's buffer
getBuffer in class OutPortConnectorprotected BufferBase<org.omg.CORBA.portable.OutputStream> createBuffer(ConnectorBase.ConnectorInfo profile)
profile -
specify the buffer kindprotected void onConnect()
protected void onDisconnect()
public void activate()
This operation activates this connector
activate in class ConnectorBasepublic void deactivate()
This operation deactivates this connector
deactivate in class ConnectorBasepublic void setOutPortBase(OutPortBase outportbase)
setOutPortBase in class OutPortConnectoroutportbase -
OutPortBase