Class baja.comm.BoxFrame
Defined in: comm.js.
| Constructor Attributes | Constructor Name and Description |
|---|---|
| <private> |
baja.comm.BoxFrame(messageQueue)
A BOX frame to be stringified and sent up to the station.
|
| Method Attributes | Method Name and Description |
|---|---|
|
isEmpty()
Checks to see if this frame has no actual messages to send.
|
|
|
send(async, callback)
Sends this frame up to the station.
|
|
|
toString()
Returns a JSON-stringified representation of this BOX frame, ready to be
sent up to the station as-is.
|
Class Detail
<private>
baja.comm.BoxFrame(messageQueue)
A BOX frame to be stringified and sent up to the station.
- Parameters:
- {Array} messageQueue
- a queue of BOX messages.
Method Detail
{Boolean}
isEmpty()
Checks to see if this frame has no actual messages to send.
- Returns:
- {Boolean} true if this frame has no messages.
send(async, callback)
Sends this frame up to the station. This is an override hook and MUST be
implemented by a utility class; e.g.
browser.js will
implement this by using XMLHttpRequest to send this frame to the station
via POST. This function will be called from
baja.comm.Batch#doCommit so any batch properties on the
callback object do not need to be taken into account - just ok/fail.
- Parameters:
- {Boolean} async
- true if this frame should be sent asynchronously.
- {baja.comm.Batch|baja.comm.Callback|Object} callback
- an object containing ok/fail callbacks.
{String}
toString()
Returns a JSON-stringified representation of this BOX frame, ready to be
sent up to the station as-is.
- Returns:
- {String} a string representation of this BOX frame in a format expected by the BOX servlet on the station.