com.aelitis.azureus.core.devices.impl
Class TranscodePipe

java.lang.Object
  extended by com.aelitis.azureus.core.devices.impl.TranscodePipe
Direct Known Subclasses:
TranscodePipeFileSource, TranscodePipeStreamSource, TranscodePipeStreamSource2

public abstract class TranscodePipe
extends Object


Nested Class Summary
protected static interface TranscodePipe.errorListener
           
 
Field Summary
protected  int bytes_available
           
protected  boolean destroyed
           
protected  int max_bytes_per_sec
           
protected  boolean paused
           
protected  List<Socket> sockets
           
 
Constructor Summary
protected TranscodePipe(TranscodePipe.errorListener _error_listener)
           
 
Method Summary
protected  boolean destroy()
           
 long getConnectionRate()
           
protected  int getPort()
           
 long getWriteSpeed()
           
protected  void handlePipe(InputStream is, OutputStream os)
           
protected  void handleRAF(OutputStream os, long position, long length)
           
protected abstract  void handleSocket(Socket socket)
           
protected  void pause()
           
protected  void releaseRAF(RandomAccessFile raf)
           
protected  void reportError(Throwable error)
           
protected  RandomAccessFile reserveRAF()
           
protected  void resume()
           
 void setMaxBytesPerSecond(int max)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

paused

protected volatile boolean paused

destroyed

protected volatile boolean destroyed

bytes_available

protected volatile int bytes_available

max_bytes_per_sec

protected volatile int max_bytes_per_sec

sockets

protected List<Socket> sockets
Constructor Detail

TranscodePipe

protected TranscodePipe(TranscodePipe.errorListener _error_listener)
                 throws IOException
Throws:
IOException
Method Detail

getConnectionRate

public long getConnectionRate()

getWriteSpeed

public long getWriteSpeed()

handleSocket

protected abstract void handleSocket(Socket socket)

handlePipe

protected void handlePipe(InputStream is,
                          OutputStream os)

reserveRAF

protected RandomAccessFile reserveRAF()
                               throws IOException
Throws:
IOException

releaseRAF

protected void releaseRAF(RandomAccessFile raf)

handleRAF

protected void handleRAF(OutputStream os,
                         long position,
                         long length)

pause

protected void pause()

resume

protected void resume()

setMaxBytesPerSecond

public void setMaxBytesPerSecond(int max)

getPort

protected int getPort()

destroy

protected boolean destroy()

reportError

protected void reportError(Throwable error)