HSkySparkClient class

Client to connect to any SkySpark server viw HTTP.

You can use it ro connect to any haystack server too, but haystack doesn't support eval and evalAll api.

See Project Haystack.

Constructors

HSkySparkClient(String uri, String user, String pass)
factory
HSkySparkClient.web(String uri, String attestKey)
factory

Properties

authHeaders ↔ Map<String, String>
read / write
connectTimeout ↔ int
Timeout in milliseconds for opening the HTTP socket.
read / write
hashCode → int
The hash code for this object. [...]
read-only, inherited
readTimeout ↔ int
Timeout in milliseconds for reading from the HTTP socket.
read / write
runtimeType → Type
A representation of the runtime type of the object.
read-only, inherited
uri → String
//////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// Base URI for connection such as "http://host/api/demo/". [...]
final

Methods

about() → Future<HDict>
Call "about" to query summary info.
call(String op, HGrid req) → Future<HGrid>
/////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////// Make a call to the given operation. [...]
commit(Iterable<HDict> diffs, CommitOperator operator, {bool force = false}) → Future<HGrid>
Commits a set of diffs. [...]
copyWith(String newUri) HSkySparkClient
Creates new HSkySparkClient based on existing one with uri for other project. [...]
eval(String expr) → Future<HGrid>
/////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////// Call "eval" operation to evaluate a vendor specific expression on the server: [...]
evalAll(HGrid req, {bool checked = true}) → Future<List<HGrid>>
Call "evalAll" operation to evaluate a batch of vendor specific expressions on the server. [...]
evalAllStrings(List<String> exprs, {bool checked = true}) → Future<List<HGrid>>
Convenience for "evalAll(HGrid, checked)".
formats() → Future<HGrid>
Call "formats" to query which MIME formats are available.
hisRead(HRef id, Object range) → Future<HGrid>
/////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////// Read history time-series data for given record and time range. [...]
hisWrite(HRef id, List<HHisItem> items) → Future<HGrid>
Write a set of history time-series data to the given point record. [...]
invokeAction(HRef id, String action, HDict args) → Future<HGrid>
/////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////// Invoke a remote action using the "invokeAction" REST operation.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
onReadAll(String filter, int limit) → Future<HGrid>
Subclass hook for read and readAll.
onReadById(HRef id) → Future<HDict>
/////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////
onReadByIds(List<HRef> ids) → Future<HGrid>
Subclass hook for readByIds, return rows with nulls cells for each id not found.
open() → Future<HSkySparkClient>
/////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////// Authenticate the client and return this.
ops() → Future<HGrid>
Call "ops" to query which operations are supported by server.
pointWrite(HRef id, int level, String who, HVal val, HNum dur) → Future<HGrid>
/////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////// Write to a given level of a writable point, and return the current status of a writable point's priority array (see pointWriteArray()). [...]
pointWriteArray(HRef id) → Future<HGrid>
Return the current status of a point's priority array. [...]
read(String filter, {bool checked = true}) → Future<HDict>
/////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////// Query one entity record that matches the given filter. [...]
inherited
readAll(String filter, {int limit = 2147483647}) → Future<HGrid>
Calls "read" to query every entity record that matches given filter. [...]
inherited
readById(HRef id, {bool checked = true}) → Future<HDict>
/////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////// Calls "read" to lookup an entity record by it's unique identifier. [...]
inherited
readByIds(List<HRef> ids, {bool checked = true}) → Future<HGrid>
Reads a list of entity records by their unique identifier. [...]
inherited
toString() → String
Returns a string representation of this object.
inherited
watch(String id, {bool checked = true}) → HWatch
Lookup a watch by its unique identifier associated with this HSkySparkClient. [...]
watchClose(HClientWatch w, {bool send = true}) → Future<Object>
watches() → List<HWatch>
List the open watches associated with this HSkySparkClient. [...]
watchOpen(String dis, HNum lease) → HWatch
/////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////// Create a new watch with an empty subscriber list. [...]
watchPoll(HClientWatch w, {bool refresh = false}) → Future<HGrid>
watchSub(HClientWatch w, List<HRef> ids, {bool checked = true}) → Future<HGrid>
watchUnsub(HClientWatch w, List<HRef> ids) → Future<HGrid>

Operators

operator ==(Object other) → bool
The equality operator. [...]
inherited