X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=iotjava%2Fiotruntime%2Fslave%2FIoTDeviceAddress.java;h=8a6455b9637013a4011e93d6cec1db1535c3e5b7;hb=d227810e27d0c63637497c4adaabc19dc67b186a;hp=1b4bc10bf3e2aba7620ffe6ff19d9809c410e64d;hpb=1680f9e97d1925bdd842270a81397a8d4b045bcc;p=iot2.git diff --git a/iotjava/iotruntime/slave/IoTDeviceAddress.java b/iotjava/iotruntime/slave/IoTDeviceAddress.java index 1b4bc10..8a6455b 100644 --- a/iotjava/iotruntime/slave/IoTDeviceAddress.java +++ b/iotjava/iotruntime/slave/IoTDeviceAddress.java @@ -13,7 +13,7 @@ import java.net.UnknownHostException; * @version 1.0 * @since 2016-02-18 */ -public class IoTDeviceAddress extends IoTAddress { +public final class IoTDeviceAddress extends IoTAddress { /** * IoTDeviceAddress class properties @@ -137,4 +137,17 @@ public class IoTDeviceAddress extends IoTAddress { public boolean getIsDstPortWildcard() { return isDstPortWildCard; } + + /** + * getURL() method + * + * @return String + */ + public String getURL(String strURLComplete) { + + //e.g. http:// + inetAddress.getHostAddress() + strURLComplete + // http://192.168.2.254/cgi-bin/mjpg/video.cgi? + return "http://" + inetAddress.getHostAddress() + ":" + iDstPort + strURLComplete; + + } }