Methods Summary |
---|
public void | addDataSinkListener(javax.media.datasink.DataSinkListener dsl)
if (dsl != null)
if (!listeners.contains(dsl))
listeners.addElement(dsl);
|
protected void | removeAllListeners()
listeners.removeAllElements();
|
public void | removeDataSinkListener(javax.media.datasink.DataSinkListener dsl)
if (dsl != null)
listeners.removeElement(dsl);
|
protected final void | sendDataSinkErrorEvent(java.lang.String reason)
sendEvent(new DataSinkErrorEvent(this, reason));
|
protected final void | sendEndofStreamEvent()
sendEvent(new EndOfStreamEvent(this));
|
protected void | sendEvent(javax.media.datasink.DataSinkEvent event)
if (!listeners.isEmpty()) {
synchronized (listeners) {
Enumeration list = listeners.elements();
while (list.hasMoreElements()) {
DataSinkListener listener = (DataSinkListener)list.nextElement();
listener.dataSinkUpdate(event);
}
}
}
|