local.media
Class UdpStreamReceiver

java.lang.Object
  |
  +--java.lang.Thread
        |
        +--local.media.UdpStreamReceiver
All Implemented Interfaces:
java.lang.Runnable

public class UdpStreamReceiver
extends java.lang.Thread

UdpStreamReceiver is a generic stream receiver. It receives packets from UDP and writes them into an OutputStream.


Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
UdpStreamReceiver(java.io.OutputStream output_stream, int local_port)
          Constructs a UdpStreamReceiver.
UdpStreamReceiver(java.io.OutputStream output_stream, org.zoolu.net.UdpSocket socket)
          Constructs a UdpStreamReceiver.
 
Method Summary
 void halt()
          Stops running
 boolean isRunning()
          Whether is running
 void run()
          Runs it in a new Thread.
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

UdpStreamReceiver

public UdpStreamReceiver(java.io.OutputStream output_stream,
                         int local_port)
Constructs a UdpStreamReceiver.
Parameters:
output_stream - the stream sink
local_port - the local receiver port

UdpStreamReceiver

public UdpStreamReceiver(java.io.OutputStream output_stream,
                         org.zoolu.net.UdpSocket socket)
Constructs a UdpStreamReceiver.
Parameters:
output_stream - the stream sink
socket - the local receiver UdpSocket
Method Detail

isRunning

public boolean isRunning()
Whether is running

halt

public void halt()
Stops running

run

public void run()
Runs it in a new Thread.
Overrides:
run in class java.lang.Thread