public class OutPortPushConnector extends OutPortConnector
ConnectorBase.ConnectorInfo, ConnectorBase.ConnectorInfoHolderm_directInPort, m_directMode, m_inPortListeners, m_isLittleEndian, m_profile, rtcout| Constructor and Description |
|---|
OutPortPushConnector(ConnectorBase.ConnectorInfo profile,
ConnectorListeners listeners,
InPortConsumer consumer)
Constructor
|
OutPortPushConnector(ConnectorBase.ConnectorInfo profile,
InPortConsumer consumer,
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
|
protected PublisherBase |
createPublisher(ConnectorBase.ConnectorInfo profile)
create publisher
|
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, setInPortpublic OutPortPushConnector(ConnectorBase.ConnectorInfo profile, InPortConsumer consumer, ConnectorListeners listeners, BufferBase<org.omg.CORBA.portable.OutputStream> buffer) throws java.lang.Exception
OutPortPushConnector's constructor is given the following arguments. According to ConnectorInfo which includes connection information, a publisher and a buffer are created. It is also given a pointer to the consumer object for the InPort interface. The owner-ship of the pointer is owned by this OutPortPushConnector, it has responsibility to destruct the InPortConsumer. OutPortPushConnector 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 -
ConnectorInfoconsumer -
InPortConsumerlisteners -
ConnectorListeners type lsitener object listbuffer -
CdrBufferBase type bufferjava.lang.Exceptionpublic OutPortPushConnector(ConnectorBase.ConnectorInfo profile, ConnectorListeners listeners, InPortConsumer consumer) throws java.lang.Exception
OutPortPushConnector's constructor is given the following arguments. According to ConnectorInfo which includes connection information, a publisher and a buffer are created. It is also given a pointer to the consumer object for the InPort interface. The owner-ship of the pointer is owned by this OutPortPushConnector, it has responsibility to destruct the InPortConsumer. OutPortPushConnector also has ConnectorListeners to provide event callback mechanisms, and they would be called at the proper timing.
profile -
ConnectorInfoconsumer -
InPortConsumerlisteners -
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. If data is written properly, this function will return PORT_OK return code. Except normal return, CONNECTION_LOST, BUFFER_FULL, BUFFER_ERROR, PORT_ERROR, BUFFER_TIMEOUT and PRECONDITION_NO_MET will be returned as error codes.
write in class OutPortConnectordata -
Datapublic ReturnCode disconnect()
This operation destruct and delete the consumer, the publisher and the buffer.
disconnect in class OutPortConnectorpublic void activate()
This operation activates this connector
activate in class ConnectorBasepublic BufferBase<org.omg.CORBA.portable.OutputStream> getBuffer()
This operation returns this connector's buffer
getBuffer in class OutPortConnectorpublic void setOutPortBase(OutPortBase outportbase)
setOutPortBase in class OutPortConnectoroutportbase -
OutPortBasepublic void deactivate()
Connector deactivation
This operation deactivates this connector
deactivate in class ConnectorBaseprotected PublisherBase createPublisher(ConnectorBase.ConnectorInfo profile)
create publisher
protected BufferBase<org.omg.CORBA.portable.OutputStream> createBuffer(ConnectorBase.ConnectorInfo profile)
create buffer
protected void onConnect()
Invoke callback when connection is established
protected void onDisconnect()