-//
-// Copyright (c) 2013 Ford Motor Company
-//
-package com.smartdevicelink.proxy.rpc;
-
-import java.util.Hashtable;
-import java.util.Vector;
-
-
-import com.smartdevicelink.proxy.RPCNotification;
-import com.smartdevicelink.proxy.constants.Names;
-
-public class OnEncodedSyncPData extends RPCNotification {
- public OnEncodedSyncPData() {
- super("OnEncodedSyncPData");
- }
- public OnEncodedSyncPData(Hashtable hash) {
- super(hash);
- }
-
- public Vector<String> getData() {
- if (parameters.get(Names.data) instanceof Vector<?>) {
- Vector<?> list = (Vector<?>)parameters.get(Names.data);
- if (list != null && list.size()>0) {
- Object obj = list.get(0);
- if (obj instanceof String) {
- return (Vector<String>)list;
- }
- }
- }
- return null;
- }
-
- public void setData( Vector<String> data ) {
- if (data != null) {
- parameters.put(Names.data, data );
- }
- }
-}
+package com.smartdevicelink.proxy.rpc;\r
+\r
+import java.util.Hashtable;\r
+import java.util.Vector;\r
+\r
+import com.smartdevicelink.proxy.RPCNotification;\r
+import com.smartdevicelink.proxy.constants.Names;\r
+\r
+\r
+public class OnEncodedSyncPData extends RPCNotification {\r
+\r
+ public OnEncodedSyncPData() {\r
+ super("OnEncodedSyncPData");\r
+ }\r
+\r
+ public OnEncodedSyncPData(Hashtable hash) {\r
+ super(hash);\r
+ }\r
+ \r
+ public Vector<String> getData() {\r
+ if (parameters.get(Names.data) instanceof Vector<?>) {\r
+ Vector<?> list = (Vector<?>)parameters.get(Names.data);\r
+ if (list != null && list.size()>0) {\r
+ Object obj = list.get(0);\r
+ if (obj instanceof String) {\r
+ return (Vector<String>)list;\r
+ }\r
+ }\r
+ }\r
+ return null;\r
+ }\r
+ \r
+ public void setData(Vector<String> data) {\r
+ if (data != null) {\r
+ parameters.put(Names.data, data);\r
+ } else {\r
+ parameters.remove(Names.data);\r
+ }\r
+ }\r
+ public String getUrl(){\r
+ return (String) parameters.get(Names.URL);\r
+ }\r
+ public void setUrl(String url) {\r
+ if (url != null) {\r
+ parameters.put(Names.URL, url);\r
+ } else {\r
+ parameters.remove(Names.URL);\r
+ }\r
+ }\r
+ public Integer getTimeout(){\r
+ if (parameters.get(Names.Timeout) instanceof Integer) {\r
+ return (Integer)parameters.get(Names.Timeout);\r
+ }\r
+ return null;\r
+ }\r
+ public void setTimeout(Integer timeout) {\r
+ if (timeout != null) {\r
+ parameters.put(Names.timeout, timeout);\r
+ } else {\r
+ parameters.remove(Names.timeout);\r
+ }\r
+ }\r
+}\r