import org.eclipse.swt.graphics.Image;
import org.oic.simulator.IAutomation;
import org.oic.simulator.ILogger.Level;
-import org.oic.simulator.InvalidArgsException;
import org.oic.simulator.ResourceAttribute;
import org.oic.simulator.ResourceAttribute.Range;
import org.oic.simulator.ResourceAttribute.Type;
}
public boolean isDisplayName(String displayName) {
- boolean exist;
+ boolean exist = false;
synchronized (displayNameMap) {
exist = displayNameMap.containsKey(displayName);
}
}
public String getCompleteUriFromDisplayName(String displayName) {
- String completeURI;
+ String completeURI = null;
synchronized (displayNameMap) {
completeURI = displayNameMap.get(displayName);
}
@Override
public void run() {
Map<String, SimulatorResource> resourceTypeMap;
- SimulatorResourceServer[] simulatorResourceServers;
+ SimulatorResourceServer[] simulatorResourceServers = null;
try {
simulatorResourceServers = SimulatorManager.createResource(
configFilePath, noOfInstances,
}
public List<String> getURIList() {
- List<String> list;
+ List<String> list = null;
synchronized (orderedResourceUriMap) {
Set<String> typeSet = orderedResourceUriMap.keySet();
List<String> typeList = Utility.convertSetToList(typeSet);
if (null == typeList || typeList.size() < 1) {
- return null;
+ return list;
}
list = new ArrayList<String>();
String attrName = attribute.getAttributeName();
try {
autoId = resourceServerN.startAttributeAutomation(attrName,
- autoType, automationListener);
+ autoType, autoUpdateInterval, automationListener);
} catch (SimulatorException e) {
Activator
.getDefault()
int autoId = -1;
try {
autoId = resourceServer.startResourceAutomation(
- AutomationType.NORMAL, automationListener);
+ AutomationType.NORMAL, 500, automationListener);
} catch (SimulatorException e) {
Activator
.getDefault()
public void shutdown() {
threadHandle.interrupt();
}
-}
+}
\ No newline at end of file