safehome.device.netcamera
Class NetworkCamera

java.lang.Object
  extended by safehome.device.netcamera.NetworkCamera
All Implemented Interfaces:
Runnable, interfaceCamera

public class NetworkCamera
extends Object
implements interfaceCamera, Runnable

This class represents a network connected camera.

A network camera reads camera images from a camera peer and sends control signals to the camera peer through socket communication. The operations of this class is a subset of a camera device.

Author:
yhkim

Constructor Summary
NetworkCamera(String safehomeCoreIP, int safehomeCorePort)
          Constructs a network camera instance It connects to SafeHome core
 
Method Summary
 int getID()
           
 BufferedImage getView()
           
 boolean panLeft()
           
 boolean panRight()
           
 void run()
           
 void setID(int id)
           
 boolean zoomIn()
           
 boolean zoomOut()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NetworkCamera

public NetworkCamera(String safehomeCoreIP,
                     int safehomeCorePort)
              throws UnknownHostException,
                     IOException
Constructs a network camera instance It connects to SafeHome core

Parameters:
safehomeCoreIP - the host name of SafeHome core
safehomeCorePort - the port number
Throws:
UnknownHostException - if the IP address of the host could not be determined.
IOException - if an I/O error occurs when creating the socket.
Method Detail

getID

public int getID()
Specified by:
getID in interface interfaceCamera
Returns:

getView

public BufferedImage getView()
Specified by:
getView in interface interfaceCamera
Returns:

panLeft

public boolean panLeft()
Specified by:
panLeft in interface interfaceCamera
Returns:

panRight

public boolean panRight()
Specified by:
panRight in interface interfaceCamera
Returns:

setID

public void setID(int id)
Specified by:
setID in interface interfaceCamera
Parameters:
id - id is just id merong

zoomIn

public boolean zoomIn()
Specified by:
zoomIn in interface interfaceCamera
Returns:

zoomOut

public boolean zoomOut()
Specified by:
zoomOut in interface interfaceCamera
Returns:

run

public void run()
Specified by:
run in interface Runnable