Commit 0cf03d6a authored by Larry Sachs's avatar Larry Sachs Committed by Rick Bell

Add FactoryPresets & PKI to java linux Server

Change-Id: I5574133bbe946edf08ca2f147f6b91d7720b154b
Signed-off-by: Larry Sachs's avatarLarry Sachs <larry.j.sachs@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/29448Reviewed-by: George Nash's avatarGeorge Nash <george.nash@intel.com>
Tested-by: default avatarIoTivity Jenkins <jenkins-daemon@iotivity.org>
Reviewed-by: default avatarRick Bell <richard.s.bell@intel.com>
parent 1fe404be
...@@ -29,6 +29,11 @@ public class Server { ...@@ -29,6 +29,11 @@ public class Server {
System.err.println("Failed to setup Storage Config."); System.err.println("Failed to setup Storage Config.");
} }
// Note: If using a factory presets handler,
// the factory presets handler must be set prior to calling systemInit().
// The systemInit() function will cause the factory presets handler to
// be called if it is set.
OcUtils.setFactoryPresetsHandler(new FactoryPresetsHandler());
MyInitHandler handler = new MyInitHandler(platform); MyInitHandler handler = new MyInitHandler(platform);
platform.systemInit(handler); platform.systemInit(handler);
......
...@@ -65,6 +65,10 @@ public class OcUtils { ...@@ -65,6 +65,10 @@ public class OcUtils {
OCMain.stopMulticast(response); OCMain.stopMulticast(response);
} }
public static void setFactoryPresetsHandler(OCFactoryPresetsHandler callback) {
OCMain.setFactoryPresetsHandler(callback);
}
public static void setDelayedHandler(OCTriggerHandler callback, int seconds) { public static void setDelayedHandler(OCTriggerHandler callback, int seconds) {
OCMain.setDelayedHandler(callback, seconds); OCMain.setDelayedHandler(callback, seconds);
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment