Class JPEGHTTPClient

java.lang.Object
  extended byse.lth.cs.jpeg.AbstractJPEGStream
      extended byJPEGHTTPClient

public class JPEGHTTPClient
extends AbstractJPEGStream

HTTP client subclass to AbstractJPEGStream. Simply passes on any request for an image to a specified HTTP server.

Doesn't know much about the size of the images the server sends. For now, this client just assumes some standard size. Also, this class has no idea of when an image was actually taken, so the timestamp is simply set to the time the image was received over the network.


Field Summary
 
Fields inherited from class se.lth.cs.jpeg.AbstractJPEGStream
NORMAL_SIZE, SMALL_SIZE
 
Constructor Summary
JPEGHTTPClient(java.lang.String server, int port)
           
 
Method Summary
 JPEGEvent getNextFrame()
          Creates and returns a new JPEG-compressed video frame.
 
Methods inherited from class se.lth.cs.jpeg.AbstractJPEGStream
getDimension, setSkip
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JPEGHTTPClient

public JPEGHTTPClient(java.lang.String server,
                      int port)
Parameters:
server - The server computer to connect to (e.g., 'falk-8.efd.lth.se')
port - The TCP port the server program is running on (e.g., 8080)
Method Detail

getNextFrame

public JPEGEvent getNextFrame()
Description copied from class: AbstractJPEGStream
Creates and returns a new JPEG-compressed video frame. To be implemented by concrete subclasses.

Specified by:
getNextFrame in class AbstractJPEGStream
Returns:
an image from the HTTP server. Always asks for '/image.jpg'.