edu.columbia.irt.mobiledyswis
Class PGTCPRoute

java.lang.Object
  extended by edu.columbia.irt.mobiledyswis.PGTCPRoute
All Implemented Interfaces:
java.lang.Runnable

public class PGTCPRoute
extends java.lang.Object
implements java.lang.Runnable

TCP Socket Plugin for PhoneGap

Author:
Jin Hyung Park (jp2105)

Constructor Summary
PGTCPRoute(java.lang.String uniqueId, WebView appView)
           
 
Method Summary
 java.lang.String getId()
          Getter for PGTCPRoute's Unique ID
 java.lang.String getLocalIpAddress()
          Function to get the device's local IP address
 void onMessage(java.lang.String msg)
          Mehtod to send plug-in data to WebView
 void run()
           
 void send(java.lang.String text)
          TCP Route Testing function for JavaScript
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PGTCPRoute

public PGTCPRoute(java.lang.String uniqueId,
                  WebView appView)
Method Detail

getId

public java.lang.String getId()
Getter for PGTCPRoute's Unique ID

Returns:
This PGTCPRoute's unique ID

onMessage

public final void onMessage(java.lang.String msg)
Mehtod to send plug-in data to WebView

Parameters:
msg - Message will be sent

send

public void send(java.lang.String text)
TCP Route Testing function for JavaScript

Parameters:
text - Data to send over TCP

getLocalIpAddress

public java.lang.String getLocalIpAddress()
Function to get the device's local IP address

Returns:
IP Address as a string

run

public void run()
Specified by:
run in interface java.lang.Runnable