com.sun.media
接口 OutputConnector

所有超级接口:
Connector
所有已知实现类:
BasicOutputConnector

public interface OutputConnector
extends Connector

OutputConnector defines the buffer movement and format typing interface for output connectors.

另请参见:
InputConnector, Module

字段摘要
 
从接口 com.sun.media.Connector 继承的字段
ProtocolPush, ProtocolSafe
 
方法摘要
 Format canConnectTo(InputConnector inputConnector, Format useThisFormat)
          check if a connection to the specified InputConnector would succeed.
 Format connectTo(InputConnector inputConnector, Format useThisFormat)
          Connects an InputConnector to this OutputConnector.
 Buffer getEmptyBuffer()
          Get an empty buffer object.
 InputConnector getInputConnector()
          Return the InputConnectore this OutputConnector is connected to.
 boolean isEmptyBufferAvailable()
          checks if there are empty Buffer objects in the Connector's queue.
 void writeReport()
          Indicates the oldest Buffer object got from this Connector (by calling the getEmptyBuffer method) now contains valid buffer object, which can be used by the downstream Module.
 
从接口 com.sun.media.Connector 继承的方法
getCircularBuffer, getFormat, getModule, getName, getProtocol, getSize, reset, setCircularBuffer, setFormat, setModule, setName, setProtocol, setSize
 

方法详细信息

connectTo

Format connectTo(InputConnector inputConnector,
                 Format useThisFormat)
Connects an InputConnector to this OutputConnector. This method should only be called by the Manager when it is connecting this OutputConnector.
The protocol of the two connectors must match.
the number of buffer objects in the created connection should be at least the size requested by both the input and the output connector

参数:
inputConnector - input connector to connect to.
useThisFormat - states the format of the connection. If it is null the format would be negotiated.
返回:
the Format of the connection.

canConnectTo

Format canConnectTo(InputConnector inputConnector,
                    Format useThisFormat)
check if a connection to the specified InputConnector would succeed.

参数:
inputConnector - input connector to check connection to.
useThisFormat - states the format of the connection. If it is null the format would be negotiated.
返回:
the Format of the connection, null if the connection would fail.

getInputConnector

InputConnector getInputConnector()
Return the InputConnectore this OutputConnector is connected to. If this Connector is unconnected return null.

返回:
the InputConnector this is connected to.

isEmptyBufferAvailable

boolean isEmptyBufferAvailable()
checks if there are empty Buffer objects in the Connector's queue.

返回:
true if there are empty Buffer objects in the Connector's queue.

getEmptyBuffer

Buffer getEmptyBuffer()
Get an empty buffer object. The exact behavior depands on the protocol: Note that this method can be called several times before it blocks (depending on circular buffer size).


writeReport

void writeReport()
Indicates the oldest Buffer object got from this Connector (by calling the getEmptyBuffer method) now contains valid buffer object, which can be used by the downstream Module.
if such buffer Objects does not exists throws RuntimeException. The exact behavior depands on the protocol: The bufferValid flag was removed. If the buffer Object is just returned, it should be marked in the Buffer itself, by specifying this is a discarded Buffer chunk.

另请参见:
Buffer