engine
API Documentation
[ engine overview | whitefrost.com | Stephen W. Cote ]
This document lists Engine members by package.
Contents
- Utilites
- Application Driver
- Message Service
- Object Registry
- Config
- Primitive Wires and Wires
- Transaction Service
- Task Service
- Engine Service
- Simple Transfer Service
- Web Services (not available)
- UI Components (discontinued)
Utilities
Behind the core of the Engine framework is a set of utilities
that provide access to XML resources and manage DOM events, to name a few.
General, public utilites are provided in the following packages.
- [ global ]
- _js_packages: Obfuscated. Array of packages.
- _js_packages_index: Obfuscated. Hash of package names.
- _js_package_version: Obfuscated. Property containing the build version of this package.
- _js_package: Obfuscated. Method creates the specified object chain.
Example: _js_package("org.cote.js")
- _js_get_package: Obfuscated. Method returns the object for a specified package.
Example: _js_get_package("org.cote.js")
- ValidatePackage: method returns true if the package exists, false if it doesn't exist.
Example: _js_validate_package("org.cote.js")
- org.cote.js
- _get_gunid: Obfuscated. Method that returns a globally unique id.
Example: org.cote.js._get_gunid()
- _implements: Obfuscated. Copies an API implementation onto the specified object.
Example: org.cote.js._implements(oObj,"base_object")
- _forName: Obfuscated. Returns an API implementation based on the specified name.
Example: org.cote.js._forName("base_object",{arg 1},{arg 2},...,{arg n})
- org.cote.js.dom.browser: deprecated
- org.cote.js.dom.event
- object_version: Property representing the build version of this package.
- _gevt: Method used for browser event handlers to return the event object.
Example: var oEvent = org.cote.js.event._gvt(arguments[0]);
- _gevt_cancel: Method used to cancel default event propogation or set event return value to false (depending on browser's event API).
- _gevt_dest: Method used return the event destination for UI events.
- _gevt_org: Method used to return the event origination for UI events.
- _gevt_src: Method used to return the event source element.
- addEventBuffer: Method used to add the createHandler method on objects registered with the ObjectRegistry. The createHandler method constructs an event handler that performs instance-specific queries to ensure that the event handler is not anonymous to an object instance.
- disableMotionCapture: Method used to remove mouse capturing events (mouseup and mousemove) from an element.
- enableMotionCapture: Method used to add mouse capturing events (mouseup and mousemove) to an element.
- addEventListener: Method used to add an event listener to an element.
Example: org.cote.js.dom.event.addEventListener(oElement,sEventName,fpHandler,bCapture);
- removeEventListener: Method used to remove an event listener from an element.
Example: org.cote.js.dom.event.removeEventListener(oElement,sEventName,fpHandler,bCapture);
- org.cote.js.util
- object_version: Property representing the build version of this package.
- getDate: Method returns the current time or a new date object.
Example: org.cote.js.util.getDate()
- evaluateElementHandler: Method evaluates an attribute on the specified element.
Example: org.cote.js.util.evaluateElementHandler(oObj,"onload")
- org.cote.js.util.url
- qualifyToHost: Given a partial URL, returns a fully qualified URL derived from the current browser location.
Example: var sFullUrl = org.cote.js.util.url.qualifyToHost("somefile.html");
- newInstance: Constructs a URL utility object based on the provided partial URL.
Example: var oUrl = org.cote.js.util.url.newInstance(sFile,bQualify);
- object_version: Property representing the build version of this package.
- getFile: Returns the file portion of the URL.
- getQuery: Returns the query portion of the URL.
- getDomain: Returns the domain portion of the URL.
- getPath: Returns the path of the URL.
- getProtocol: Returns the protocol of the URL.
- qualify: Returns a version of the specified URL qualified against the URL used to construct this object.
- org.cote.js.xml
- object_version: Property representing the build version of this package.
- _xml_requests: Array of xml requests. Note: XMLHTTP request objects are nullified after propogating to any handlers, so the pointer is only valid as long as the implementing code holds it.
- _xml_requests_map: Hash of xml requests by id.
- newXmlDocument: Method used to return a new XML DOM Document using the specified root node name.
Example: var oDom = org.cote.js.xml.newXmlDocument("root-node");
- serialize: Method used to return a serialized version of a node.
Example: var sXml = org.cote.js.xml.serialize(oXmlDomNode);
- getCDATAValue: Method used to return a concatenation of all immediate CDATA child node values from a given node.
- selectSingleNode: Method used to return a node object based on the supplied XML Document, XPath, and node reference.
Example: var oNode = org.cote.js.xml.selectSingleNode(oXmlDocument,"persons/person[@name = 'Steve']",oRefNode);
- selectNodes: Method used to return a node list based on the supplied XML Document, XPath, and node reference.
Example: var aNodes = org.cote.js.xml.selectNodes(oXmlDocument,"persons/person",oRefNode);
- queryNode: Method used to return a single XML or HTML DOM node reference based on the provided element names, and attribute name and values (not recommended except for very explicit cases).
Example: var aNodes = org.cote.js.xml.queryNodes(document.body,"div",null,"class","header");
- queryNodes: Method used to return an XML or HTML DOM node list based on the provided element names, and attribute name and values (not recommended except for very explicit cases).
Example: var aNodes = org.cote.js.xml.queryNodes(document.body,"ul","li","class","menu-item");
- getXml: Method used to send an XML GET request.
Example (synchronous): var oXml = org.cote.js.xml.getXml(sXmlDocumentPath {,optional-handler, async|sync, optional-id});
Example (asynchronous):org.cote.js.xml.getXml(sXmlDocumentPath,handle_load_xml,true{,optional-id})
- postXml: Method used to send an XML POST request. Note: this will attempt to treat the response as an XML document. It will fail gracefully, but it is not fire-and-forget.
Example (synchronous): org.cote.js.xml.getXml(sXmlDocumentPath,vData,{,optional-handler, async|sync, optional-id});
Example (asynchronous):org.cote.js.xml.getXml("XmlDocument.xml",vData,handle_load_xml,true{,optional-id})
- _request_xmlhttp: Method used to send synchronous or asynchronous GET/POST XML requests (used by getXml and postXml).
Example: org.cote.js.xml._request_xmlhttp(sXmlPath,fpHandler,bAsync,sRequestId,bGetOrPost,vData);
- getInnerText: Method returns a concatenation of all child text node values.
- removeChildren: Method removes all child nodes from a node.
- setInnerXHTML: Method copies an XML or HTML DOM into the referenced HTML DOM node.
Example: org.cote.js.xml.setInnerXHTML(oXml,document.body)
Application Driver
The Application Driver has no public methods or properties.
Its main purpose is to perform two basic functions: publish a message via the Message Service when the window.onload event fires,
and invoke the sendSigterm on the Object Registry when the window.onunload event fires.
The purpose of using Application Driver in this manner is to reduce any dalliance of Engine objects with non-UI browser events.
It is also a central, generic object where application-level configuration data may be stored.
- org.cote.js.driver.ApplicationDriver
- object_config.pointers.application_config: The developer may set a new org.cote.js.util.config instance on this property for use as a global config repository.
Message Service
The Message Service is used to send, publish, and subscribe to one-way application messages.
It can be used for a variety of purposes, such as internal events and logging.
- org.cote.js.message.MessageService
- object_version: Property representing the build version of this package.
- clearEntries: Clears entries created by successive calls to sendMessage.
- getDeliveryDelay: Method used to return the delay, in milliseconds, of publication.
- setDeliveryDelay: Method used to set the delay, in milleseconds, before the MessageService responds to a message publication.
Example: org.cote.js.message.MessageService.setDeliveryDelay(500);
- subscribe: Method used to subscribe to notification for a particular message.
Example: org.cote.js.message.MessageService.subscribe(oContextObject,sEventName,fpHandler{,oForObject});
- unsubscribe: Method used to cancel a subscription to a notification.
Example: org.cote.js.message.MessageService.unsubscribe(oContextObject,sEventName,fpHandler);
- publish: Method used to publish a notification to subscribers.
Example: org.cote.js.message.MessageService.publish(sEventName,vData);
- setReportThreshold: Method used to set the threshold determining when sendMessage propogates a message to subscribers.
- sendMessage: Method used to publish a generic message and descriminating message code.
Example: org.cote.js.message.MessageService.sendMessage("Test message","200.1");
Object Registry
The Object Registry Service is used to manage objects based on a common object structure.
By using the ORS, the web document namespace is not polluted with global identifiers and application objects are separated from the web page document object model.
- org.cote.js.registry.ObjectRegistry
- object_version: Property representing the build version of this package.
- canRegistry: Method returns true if the specified object conforms to the engine architecture.
- addObject: Method registers an object with the registry.
- removeObject: Method unregisters an object, removing it from the registry.
- getObject: Method returns an object based on the specified object id.
- isRegistered: Method returns true if the object has been registered with addObject.
- sendSigterm: Method sends a termination signal to registered objects, if those objects implement a sigterm method.
- sendDestroyTo: Method sends a destroy message to the object, based on the specified object id.
Config
The Config psuedo-class was designed to load and hash XML-based configuration data.
This is strictly a lightweight component.
The structure of the configuration data must be as follows:
<root-name>
<parent-name>
<element-name attr-name = "name_value" attr-value = "value_value" />
</parent-name>
</root-name>
The root-name is ignored, and the other name values are configurable using the public set-methods.
- org.cote.js.util.config
- newInstance: Returns a new instance of the config class.
- object_version: Property representing the build version of this package.
- setElementParentName: Method sets the parent config name.
- setElementName: Method sets the element config name.
- setAttrNameName: Method sets the name of the config attribute name(sic).
- setAttrValueName: Method sets the name of the config attribute value.
- load: Method loads the XML configuration file.
Example: oConfig.load(sXmlFile{,bAsync,fpHandler});
- getParams: Method returns an array of configuration parameters.
- getParam: Method returns the value of the specified parameter name.
Primitive Wires and Wires
Primitive Wires and Wires are backbone implementations for creating action sequences.
- org.cote.js.wires.primitive
- PrimitiveWire: Instance of PrimitiveWireImpl.
- PrimitiveWireImpl: Constructor.
- object_version: Property representing the build version of this package.
- invoke: Invokes a primitive wire.
Example: org.cote.js.wires.primitive.PrimitiveWire.invoke(id, args, force, skip, keep, only, multi);
- id: string id of the primitive wire.
- args: array of arguments to pass to the action or handler.
- force: boolean to force handler invocation if the action doesn't return true.
- skip: boolean to skip the handler.
- keep: boolean to keep the primitive wire after invoking the handler.
- only: boolean to only invoke the handler.
- multi: boolean to mark the invocation as multi-purposed and not to track whether it was used.
- getWire: Method returns the primitive wire based on the specified id.
- fireWire: Method invokes the handler of the specified primitive wire.
- wire: Method creates a new primitive wire and returns the id.
Example: var sId = org.cote.js.wires.primitive.PrimitiveWire.wire(xp, x, yp, y, t);
- xp: object reference to the class for which parameter x applies.
- x: String or function pointer designated as the action. If the associated function does not return true, the primitive wire must be 'fired', or a special call to invoke, to finalize the wire.
- yp: object reference to the class for which parameter y applies.
- y: String or function pointer designated as the handler.
- t: Optional id prefix.
- org.cote.js.wires
- newInstance: returns a new instance of the wire service psuedo-class.
- object_version: Property representing the build version of this package.
- setCanSignal: Method sets whether the wire service can signal.
- getCanSignal: Method returns whether the wire service is signalling.
- invoke: Method invokes a wire. If the wire service is signalling, joined wires will also be invoked (base implementation of signals&slots).
Note: This should be the same style as primitiveInvoke.
Example: oWire.invoke(args,xp,x,skip,only);
- args: array of arguments to pass to the action or handler.
- xp: object reference to the class for which parameter x applies.
- x: String or function pointer designated as the action. If the associated function does not return true, the primitive wire must be 'fired', or a special call to invoke, to finalize the wire.
- skip: boolean to skip the handler.
- only: boolean to only invoke the handler.
- wire: Method creates a new wire
Example: oWire.wire(xp, x, yp, y);
- xp: object reference to the class for which parameter x applies.
- x: String or function pointer designated as the action. If the associated function does not return true, the primitive wire must be 'fired', or a special call to invoke, to finalize the wire.
- yp: object reference to the class for which parameter y applies.
- y: String or function pointer designated as the handler.
- primitiveWire: Method creates a new primitive wire. This is a light wrapper to the primitive wire wire function; same parameters.
- invokePrimitive: Method invokes the specified primitive wire as a multi-purpose wire.
Example: oWire.invokePrimitive(args,id,skip,only);
- args: array of arguments to pass to the action or handler.
- id: string id of the primitive wire.
- skip: boolean to skip the handler.
- only: boolean to only invoke the handler.
- hardWire: Method creates a wire with static argument values for the action and handler, and stores the values in a primitive_wires hash on a specified object. A hard wire is disjointed, so invokeHardWireAction and invokeHardWireHandler must be used to execute the action and handler.
Example: oWire.hardWire(object,id,args_1,args_2,xp,x,yp,y);
- object: some object with a primitive_wires hash. It is up to the caller to have some generic object to hold this data.
- id: id to be used for the primitive_wires hash lookup.
- args_1: array of arguments to pass to the action.
- args_2: array of arguments to pass to the handler.
- xp: object reference to the class for which parameter x applies.
- x: String or function pointer designated as the action. If the associated function does not return true, the primitive wire must be 'fired', or a special call to invoke, to finalize the wire.
- yp: object reference to the class for which parameter y applies.
- y: String or function pointer designated as the handler.
- invokeHardWireAction: Method invokes the hard wired action based on the specified object and id, where the object was the same used with hardWire. Returns true if the wire action returns true.
Example: oWire.invokeHardWireAction(object,id);
- invokeHardWireHandler: Method invokes the hard wired handler based on the specified object and id. Returns true if the hard wire handler returns true.
Example: oWire.invokeHardWireHandler(object,id);
Transaction Service
The Transaction Service is used to create a multi-channel communication between one or more objects.
For example, the Task Service uses the Transaction Service to manage state and dependencies.
Objects may register with the Transaction Service if they are registered with the Object Registry and implement the startTransaction, endTransaction, and doTransaction methods.
The startTransaction method must return true. The doTransaction should return true when it is finished with the transaction packet.
- org.cote.js.transaction.TransactionService
- object_version: Property representing the build version of this package.
- closeTransaction: Method closes the transaction packet based on the specified name.
- openTransaction: Method creates a new transaction packet and returns the packet id.
Example: org.cote.js.transaction.TransactionService.openTransaction(name,object,data);
- name: Name of the transaction packet.
- object: A object registered with the TransactionService. This can be null.
- data: Variant data stored on the packet.
- getPacket: Method returns a transaction packet based on the specified id.
- getPacketByName: Method returns a transaction packet based on the specified name.
- canRegister: Method returns true if the specified object can register with the Transaction Service.
- isRegistered: Method returns true if the specified object is registered with the Transaction Service.
- register: Method is used to register an object with the service.
- addTransactionParticipant: Method adds an object to an existing transaction.
Example: org.cote.js.transaction.TransactionService.addTransactionParticipant(object,packet);
- object: A object registered with the TransactionService.
- packet: A transaction packet representing a particular transaction.
- removeTransactionParticipant: Method removes an object from a transaction.
Example: org.cote.js.transaction.TransactionService.removeTransactionParticipant(object,packet);
- serveTransaction: Method serves a transaction packet to participants for that packet.
Example: org.cote.js.transaction.TransactionService.serveTransaction(object,control,skip);
- packet: A transaction packet representing a particular transaction.
- control: Id of a participating object to act as the packet controller for this particular invocation. Defaults to the packet owner.
- skip: Skip serving the packet to the controller.
- org.cote.js.transaction.TransactionService{Packet}
- packet_id: String id of the packet object.
- packet_name: Name of the packet object.
- participants: Hash of registered object ids.
- participant_count: Integer of active participants.
- packet_state: (not used).
- setBlockStartTransaction: Method sets whether the startTransaction method is invoked for this packet. This is automatically set to true when a transaction is opened for a specific object and it is up to that object to set it back to false if it wants other participants to receive start notification.
- setBlockServeTransaction: Method sets whether the doTansaction method is invoked for this packet. The controller is not affected by this property.
- setBlockEndTransaction: Method sets whether the endTransaction method is invoke for this packet. The controller is not affected by this property.
- setServeType: Sets whether (1) the packet is served to a participant until the doTransaction method returns true, or (2) whether it is served once immediately followed by endTransaction.
- data: Variant data set on the packet when the transaction was opened.
- is_finalized: Property specifies whether the packet has been finalized.
- start_transaction: Time when the transaction packet was opened.
- stop_transaction: Time when the transaction packet was finalized.
- owner_id: Object id of the packet owner.
Task Service
- org.cote.js.task.TaskService
- object_version: Property representing the build version of this package.
- clearTask: Clears the task based on the specified task id.
- cleanTasks: Clears all tasks.
- isExternalLoaded: Method returns true if an external task configuration file was loaded.
- addTaskDependency: Method associates a dependency with the specified task.
Example: org.cote.js.task.TaskService.addTaskDependency(task_object,dependency);
- task_object: a valid task object.
- dependency: String representing a dependency name.
- getTaskDepends: Method returns an array of task dependencies based on the specified task object.
- returnDependency: Method returns the specified task object or string dependency to all open tasks.
Example: org.cote.js.task.TaskService.returnDependency([task_object | dependency]);
- getTask: Method returns a task object based on the specified id.
- getTaskByName: Method returns a task object based on the specified name.
- isTaskComplete: Method returns true if a task and its dependencies are completed.
- serveTaskTransaction: Method serves the specified task object's internal transaction packet. This is primarily an internal method.
- executeTaskHandler: Method executes the handler for the specified task, ignoring the state of the task action. If the task has dependencies, then the handler will not be executed until the dependencies are returned.
- executeTaskHandlerByName: Same as executeTaskHandler, except the task is referenced by name.
- executeTask: Method begins the internal transaction for the specified task.
- executeTaskByName: Same as executeTask, except the task is referenced by name.
- importTaskFromXml: Method parses XML markup for a task declaration, recursively adding any dependencies.
Example: Example: org.cote.js.task.TaskService.importTaskFromXml(node,parent,document,execute);
- node: The name or node reference of a task node. The context is specified in TaskService.object_config.data.XPATH_CONTEXT.
- parent: The parent task to which the new task will be a dependency.
- document: An XML document.
- execute: Boolean that specifies whether the task will be executed immediately after being imported.
- executeTaskLoader: Method creates and executes a task that will load an external file. This is the same as addTask except it sets a few internal data points.
Example: org.cote.js.task.TaskService.executeTaskLoader(name,at,a,ht,h);
- name: The name of the new task.
- at: The task action type.
- a: The task action.
- ht: The task handler type.
- h: The task handler.
- addTaskLoader: Same as executeTaskLoader, except the task is not automatically executed.
- addTask: Creates a new task. Returns the new task object.
Example: var oTask = org.cote.js.task.TaskService.executeTaskLoader(name,at,a,ht,h);
- name: The name of the new task.
- at: The task action type.
- a: The task action.
- ht: The task handler type.
- h: The task handler.
- org.cote.js.task.TaskService{Task}
- task_state: Integer representing the state of the task.
- task_name: Name of the task.
- task_id: Id of the task object.
- data: Variant data.
- depends: Array of dependency names.
- action_type: Type of task action.
- action: The task action.
- handler_type: Type of task handler.
- handler: The task handler.
- handled: bit specifying whether the task handler was executed.
- executed: bit specifying whether the task action was executed.
- busy: bit specifying whether the task object is busy with a transaction process.
- setAutoDestroy: Method specifies whether a task object should destroy itself when finished.
- transaction_id: id of the internal transaction packet.
Engine Service
The Engine Service is designed to create a runtime environment for Web applications.
For example, one possible runtime environment might involve loading an external configuration file, using those configuration values to load additional configuration files and import and initialize components, and then parse by-page grammar for laying out UI elements.
A simple declaration of <engine />, or defining the is-engine attribute, is all that is needed to initialize the environment and prepare one or more engines for use.
Whether or not HTML declarations are made, a primary engine will load if the auto_load property is true or the loadEngines method is invoked.
- org.cote.js.engine.EngineService
- object_version: Property representing the build version of this package.
- setAutoLoad: Method sets whether the loadEngines method is invoked when the browser window loads.
- setPrimaryEngineAction: Method sets the action associated with the corresponding task for the primary engine.
- setPrimaryEngineActionType: Method sets the action type associated with the corresponding task for the primary engine.
- setPrimaryEngineHandler: Method sets the handler associated with the corresponding task for the primary engine.
- setPrimaryEngineHandlerType: Method sets the handler type associated with the corresponding task for the primary engine.
- getTaskService: Method returns the task service, which is a unique instance from TaskService. This is useful when accessing tasks related to engine objects for both development and debugging.
- getEngine: Method returns an engine object based on the specified id.
- getEngineByName: Method returns an engine object based on the specified name.
- clearEngines: Method unloads all engine information and publishes destroy messages to all registered objects created by engine configurations.
- getPrimaryEngine: Method returns the primary engine (aka the first engine) object.
- loadEngines: Method loads engine declarations. A primary engine is always created when this method is invoked, whether a declaration exists or not.
- applyPageConfiguration: Method applies a page configuration to the engine object, if that engine object was created from an HTML declaration, and the engine page configuration task (which loads a given engine configuration) was completed.
Example: org.cote.js.engine.EngineService(engine, page_config);
- engine: An engine object.
- page_config: Name of a page configuration.
- org.cote.js.engine.EngineService{Engine}
- engine_element: HTML object used to initiate a particular engine object.
- engine_id: Id of the engine object (engine-id attribute of an HTML object, if specified).
- engine_name: Name of the engine object.
- page_config: Current page configuration applied to the engine object.
- task: Task object used to create this engine object.
- is_primary: True if this engine is the primary engine. There is only one primary engine.
- getObjects: Method returns an array of registered objects created from the current page configuration. Note: method is currently unused.
- getObject: Method returns a registered object based on the specified id. Note: method is currently unused.
- getObjectByName: Method returns a registered object based on the specified name. Note: method is currently unused.
- isObject: Method returns true if the specified id was an object created and registered by this engine. Note: method is currently unused.
- primitive_wires: Array used to store hardWire data.
- getPrimitiveWire: Method returns a primitive wire based on the specified id.
Simple Transfer Service
The Simple Transfer Service arose while the web services component was being developed.
The goal of the SimpleTransferService was to provide a basic mechanism for exchanging request and response codes, and simple data sets, with a known server.
Use of this service expects that the service accepts XML data via an HTTP POST request, and responds in kind with XML data.
The structure of the XML requests and responses are as follows:
<transfer>
<request code = "{requestcode}">
<param name="{name}" value="{value}" />
<flag name="{name}" value="{value}" />
<user-data name="{name}" value="{value}" />
</request>
<response code = "{responsecode}">
<param name="{name}" value="{value}" />
<flag name="{name}" value="{value}" />
<user-data name="{name}" value="{value}" />
</response>
</transfer>
Request and response codes should be the same, and be created from a runtime map where an even number is a failure and an odd number is a success.
For example, the request and response codes for login might be REQUEST_NOTOK = 6, REQUEST_OK = 7, RESPONSE_NOTOK = 6, RESPONSE_NOTOK = 7.
The Simple Transfer Service supports an internal handler for "synchronize", so that a request made to the server to "synchronize" will handle importing the request and response code definitions.
This is strictly a Barney-basic implementation.
- org.cote.js.snt.SimpleTransferService
- object_version: Property representing the build version of this package.
- getService: Returns a service object based on the specified id.
- getServiceByName: Returns a service object based on the specified name.
- getFlags: Method returns a hash of flags provided by the server.
- getFlag: Method returns the flag value for the specified flag.
- getIsLoggedIn: Method returns a boolean as to whether the component is logged into a server account.
- getIsSynchronized: Method returns true if the component synchronized codes with the server.
- getCanLogin: Method returns true if the component can log into the server. Note: if already logged in, this returns false.
- getCanLogout: Method returns true if the component can log out of the server.
- getCodeByName: Method returns a code object for the specified name.
- isCode: Method returns true if the specified object is a code object.
- setServiceUrl: Method sets the service URL.
- deleteUserData: Method marks a user data item for deletion.
- removeUserData: Method sends a request to the server to delete all user data marked for deletion.
Example: org.cote.js.snt.SimpleTransferService.removeUserData(fpHandler);
- getUserData: Method marks a user data item for request (ie: get this item from the server).
- requestUserData: Method sends a request to the server to retrieve all requested user data.
Example: org.cote.js.snt.SimpleTransferService.requestUserData(fpHandler);
- addUserData: Method adds a new user data item.
- updateUserData: Method sends a request to the server to add all new user data items.
Example: org.cote.js.snt.SimpleTransferService.updateUserData(fpHandler);
- login: Method sends a request to login to an account with the specified credentials.
Example: org.cote.js.snt.SimpleTransferService.login(sUserName, sPassword, fpHandler);
- logout: Method sends a request to logout of an account.
Example: org.cote.js.snt.SimpleTransferService.logout(fpHandler);
- request: Method sends a request code to the server.
Example: org.cote.js.snt.SimpleTransferService.request(code,name,handler,variant);
- code: A valid request code or code name.
- name: A friendly name for the request.
- handler: A function pointer to be invoked when the request is finished.
- variant: Data used by the internal request and response handlers. Needs to be more extensible than it is.
- org.cote.js.snt.SimpleTransferService{Code}
- code_name: Name of the code.
- request_ok: Number representing a successful request.
- request_notok: Number representing an unsuccessful request.
- response_ok: Number representing a successful response.
- response_notok: Number representing an unsuccessful response.
- description: Description of the code, if one was provided.
- org.cote.js.snt.SimpleTransferService{Service}
- service_id: Id of the service.
- service_name: Name of the service (friendly name of the request).
- request_code: Corresponding request code based on the name or code specified in the request invocation.
- code_name: Name of the code based on the name or code specified in the request invocation.
- service_state: State of the service.
- response_code: Response code returned by the server.
- response_data: Not used.
- request_data: Not used.
- handler: Handler supplied to the request invocation.
- completed: Boolean signifying whether the service request was completed.