Some progress on G assistant api
This commit is contained in:
parent
64f2f598df
commit
43892798ef
13 changed files with 217 additions and 77 deletions
|
|
@ -215,7 +215,11 @@ public class HalContext {
|
|||
}
|
||||
|
||||
public static int getIntegerProperty(String key){
|
||||
return Integer.parseInt(getStringProperty(key));
|
||||
String value = getStringProperty(key);
|
||||
|
||||
if (getStringProperty(key) == null)
|
||||
return 0;
|
||||
return Integer.parseInt(value);
|
||||
}
|
||||
public static int getIntegerProperty(String key, int defaultValue){
|
||||
if (!HalContext.containsProperty(key))
|
||||
|
|
|
|||
|
|
@ -5,12 +5,12 @@ import java.util.concurrent.ScheduledExecutorService;
|
|||
/**
|
||||
* Defines a stand alone process that will run parallel to Hal
|
||||
*/
|
||||
public interface HalDaemon extends Runnable{
|
||||
public interface HalDaemon extends Runnable {
|
||||
|
||||
/**
|
||||
* Initialize the daemon.
|
||||
* Setup the execution of the daemon with the provided executor.
|
||||
*
|
||||
* @param executor The sceduler that the daemon should register to.
|
||||
* @param executor the scheduler provided by HAL for the daemon to setup its execution.
|
||||
*/
|
||||
void initiate(ScheduledExecutorService executor);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue