Send a token to the specified channel, checking the type and converting the token if necessary. If the port is not connected to anything, or receivers have not been created in the remote port, or the channel index is out of range, or the port is not an output port, then just silently return. This behavior makes it easy to leave output ports unconnected when you are not interested in the output. If the type of the specified token is the type of this port, or the token can be converted to that type losslessly, the token is sent to all receivers connected to the specified channel. Otherwise, IllegalActionException is thrown. Before putting the token into the destination receivers, this method also checks the type of the remote input port, and converts the token if necessary. The conversion is done by calling the convert() method of the type of the remote input port.
Some of this method is read-synchronized on the workspace. Since it is possible for a thread to block while executing a put, it is important that the thread does not hold read access on the workspace when it is blocked. Thus this method releases read access on the workspace before calling put.
@param channelIndex The index of the channel, from 0 to width-1.
@param token The token to send.
@exception IllegalActionException If the token to be sent cannotbe converted to the type of this port, or if the token is null.
@exception NoRoomException If there is no room in the receiver.