public class DMXHttpClient extends Object
Simple HTTP client for use with DEMUX Framework applications. This client provides basic HTTP operations while maintaining minimal footprint and dependencies.
In current state, client can only send requests which invoke DEMUX controller on predefined server.
DMXHttpClient.instance().init("http://www.myserver.org:8080");
DMXControllerHttpRequest request = new DMXControllerHttpRequest("ctrl"); // invoke controller with ID "ctrl"
DMXHttpResponse
Modifier and Type | Class and Description |
---|---|
static class |
DMXHttpClient.HTTPMethod
Enumeration of HTTP methods.
|
Modifier and Type | Method and Description |
---|---|
void |
init(String baseUrl)
Initializes the class with base URL.
|
static DMXHttpClient |
instance()
Returns singleton instance of this class.
|
DMXHttpResponse<Map<String,Object>> |
invokeRemoteController(DMXControllerHttpRequest request)
Performs invocation of remote controller specified in request.
|
public static DMXHttpClient instance()
public void init(String baseUrl)
baseUrl
- base URLpublic DMXHttpResponse<Map<String,Object>> invokeRemoteController(DMXControllerHttpRequest request)
request
- HTTP requestCopyright © 2012-2014 Vektor Software. All Rights Reserved.