+
+ /**
+ * This method returns the interval which determines how often the discovery
+ * packets will be sent. Default is 300 seconds.
+ *
+ * @return The discovery interval in second
+ */
+ private static int getDiscoveryInterval() {
+ String elapsedTime = System.getProperty("of.discoveryInterval");
+ int rv = 300;
+
+ try {
+ if (elapsedTime != null) {
+ rv = Integer.parseInt(elapsedTime);
+ }
+ } catch (Exception e) {
+ }
+
+ return rv;
+ }
+
+ /**
+ * This method returns the timeout value in waiting for response of a
+ * discovery query. Default is 60 seconds.
+ *
+ * @return The discovery timeout in second
+ */
+ private static int getDiscoveryTimeout() {
+ String elapsedTime = System.getProperty("of.discoveryTimeout");
+ int rv = 60;
+
+ try {
+ if (elapsedTime != null) {
+ rv = Integer.parseInt(elapsedTime);
+ }
+ } catch (Exception e) {
+ }
+
+ return rv;
+ }