Package com.gears42.iot.webthing
Class ServerManager
- java.lang.Object
-
- com.gears42.iot.webthing.ServerManager
-
public class ServerManager extends java.lang.ObjectServerManager hosts the things on the specified address and port. Default server credential are Email: say-hello@thing.com and Password: 42gears.
-
-
Constructor Summary
Constructors Constructor Description ServerManager()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static voidinsertContentsToUri(android.net.Uri uri, android.content.ContentResolver contentResolver, android.content.ContentValues objContentValues, java.lang.String selection, java.lang.String[] selectionArgs)Insert server details to appropriate URI.static booleanisServerRunnning()Status of the servervoidstartServer(android.content.Context context, java.util.HashMap<java.lang.String,Thing> Things, ServerSettings serverSettings)Start the server.
-
-
-
Method Detail
-
startServer
public void startServer(android.content.Context context, java.util.HashMap<java.lang.String,Thing> Things, ServerSettings serverSettings) throws java.lang.ExceptionStart the server.- Parameters:
context- Context of main application.Things- List of Things.serverSettings- Server settings.- Throws:
java.io.IOExceptionjava.lang.Exception
-
insertContentsToUri
public static void insertContentsToUri(android.net.Uri uri, android.content.ContentResolver contentResolver, android.content.ContentValues objContentValues, java.lang.String selection, java.lang.String[] selectionArgs)Insert server details to appropriate URI.- Parameters:
uri- Uri to insert into.contentResolver- content resolver object.objContentValues- content values.selection- selection parameters.selectionArgs- selection arguments.
-
isServerRunnning
public static boolean isServerRunnning()
Status of the server- Returns:
- it returns whether server is running or not
-
-