roomba.roombanetwork.services.image
Class ImageService

java.lang.Object
  extended by roomba.roombanetwork.services.image.ImageService
All Implemented Interfaces:
ClientListener

public class ImageService
extends java.lang.Object
implements ClientListener

Provides an image service to the Roomba Network. This will grab images from a specified camera and send them periodically over the network

Author:
Drew Housten

Constructor Summary
ImageService(java.lang.String serviceName, java.lang.String rnsHost, int rnsPort, Camera camera)
          Constructor - creates the RNC and will connect to the specified camera
 
Method Summary
 RoombaNetworkClient getRNC()
          Gets the Roomba Network Client
 void messageReceived(java.lang.String messageType, java.lang.String[] messageComponents)
          Processes a message received.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ImageService

public ImageService(java.lang.String serviceName,
                    java.lang.String rnsHost,
                    int rnsPort,
                    Camera camera)
Constructor - creates the RNC and will connect to the specified camera

Parameters:
serviceName - Name of the ImageService
rnsHost - The hostname (or IP address) of the RNS
rnsPort - The port of the RNS (default is 7777)
camera - The camera to use
Method Detail

getRNC

public RoombaNetworkClient getRNC()
Gets the Roomba Network Client

Returns:
The client

messageReceived

public void messageReceived(java.lang.String messageType,
                            java.lang.String[] messageComponents)
Processes a message received. The image service does not accept any inputs, so this method does not do anything

Specified by:
messageReceived in interface ClientListener
Parameters:
messageType - The message type
messageComponents - The components of the received message