Module Index
- 
        assertAssertion library for unit testing. It implements the CommonJS Unit Testing specification and adds some additional convenience methods. All methods allow an additional argument: comment. This comment will be appended to the error message if an assertion fails.
- 
        binaryWhen dealing with network sockets or binary files, it’s necessary to read and write into byte streams. JavaScript itself does not provide a native representation of binary data, so this module provides two classes addressing this shortcoming. The implementation follows the CommonJS Binary/B proposal. ByteArrayimplements a modifiable and resizable byte buffer.ByteStringimplements an immutable byte sequence.Both classes share a common base class Binary. The base class can't be instantiated. It exists only to affirm thatByteStringandByteArrayinstances ofBinary.When passed to a Java method that expects a byte[], instances of these classes are automatically unwrapped.
- 
        consoleThis module provides functions to write on the standard output stream stdoutand error streamstderrfor error logging and quick debugging. It’s similar to the console object implemented in most web browsers.
- 
        fsThis module provides a file system API for the manipulation of paths, directories, files, links, and the construction of input and output streams. It follows the CommonJS Filesystem/A proposal. 
- 
        globalsRingoJS adopts some of the global properties from the Rhino shell and adds a few of its own. Note that this module must and can not be imported like an ordinary module. It is evaluated only once upon RingoJS startup. 
- 
        ioThis module provides functions for reading and writing streams of raw bytes. It implements the StreamandTextStreamclasses as per the CommonJS IO/A proposal.Streams are closely related with two other modules. Low-level byte manipulation is provided by the binarymodule and uses theByteArrayorByteStringclass. Thefsmodule returnsiostreams for reading and writing files.
- 
        netThis module provides support for networking using TCP and UDP sockets. A socket represents a connection between a client and a server program over a network. The underlying native binding is provided by the java.netpackage.
- 
        systemThis module provides an implementation of the system module compliant to the CommonJS System/1.0 specification. Beyond the standard a print()function is provided.
- 
        testA test runner compliant to the CommonJS Unit Testing specification. It manages the execution of unit tests and processes test results. The runner reports the total number of failures as exit status code. The runner treats a module like a test case. A test case defines the fixture to run multiple tests. Test cases can provide optional setUp()andtearDown()functions to initialize and destroy the fixture. The test runner will run these methods prior to / after each test. Test functions must start with atestprefix in their name, otherwise they are skipped by the runner.The following example test case testDatabase.jsstarts a new test runner if executed withringo testDatabase.js
- 
        ringo/argsA parser for command line options. This parser supports various option formats: - -a -b -c(multiple short options)
- -abc(multiple short options combined into one)
- -a value(short option with value)
- -avalue(alternative short option with value)
- --option value(long option with value)
- --option=value(alternative long option with value)
 
- 
        ringo/base64Base64 encoding and decoding for binary data and strings. 
- 
        ringo/bufferA simple text Buffer class for composing strings. 
- 
        ringo/concurrentUtilities for working with multiple concurrently running threads. 
- 
        ringo/daemonThe daemon control script invoked by the init script. This module interprets the first command line argument as module ID, load the module and try to invoke the life cycle functions on it. For HTTP servers it is generally more convenient to directly use ringo/httpserverwhich will create a new server instance and pass it to as argument to the application life cycle functions.
- 
        ringo/encodingLow-level support for character encoding and decoding. It uses the packages java.nio and java.nio.charset for the underlying operations. 
- 
        ringo/engineProvides access to the Rhino JavaScript engine. 
- 
        ringo/eventsExports an EventEmitter classes that provide methods to emit events and register event listener functions. 
- 
        ringo/httpclientA module for sending HTTP requests and receiving HTTP responses. 
- 
        ringo/loggingThis module provides generic logging support for Ringo applications. It uses SLF4J or Apache log4j if either is detected in the classpath, and will fall back to java.util.logging otherwise. If the first argument passed to any of the logging methods is a string containing any number of curly bracket pairs ({}), the logger will interpret it as format string and use any following arguments to replace the curly bracket pairs. If an argument is an Error or Java Exception object, the logger will render a stack trace for it and append it to the log message. This module's exports object implements the EventEmitter interface and emits logged messages using the log level name as event type. 
- 
        ringo/mimeThis module provides functionality for determining the MIME type for a given file extension. 
- 
        ringo/profilerA profiler for measuring execution time of JavaScript functions. Note that you need to run with optimization level -1 for profiling to work. Running the profiler on optimized code will produce no data. 
- 
        ringo/promiseAllows to work with deferred values that will be resolved in the future. 
- 
        ringo/shellProvides functions to deal with the Ringo shell / REPL. It allows to start a new Ringo shell programmatically. This module is internally used by every Ringo REPL to interact with the user. The example shows a simple Ringo shell script which prepares an object and opens a shell for live interaction. 
- 
        ringo/subprocessA module for spawning processes, connecting to their input/output/errput and returning their response codes. It uses the current JVM's runtime provided by java.lang.Runtime.getRuntime(). The exact behavior of this module is highly system-dependent. 
- 
        ringo/termA module for printing ANSI terminal escape sequences. This module provides a number of useful color and style constants, and a replacement for the print function optimized for styled output. 
- 
        ringo/workerA Worker API based on the W3C Web Workers. Ringo offers "shared-nothing" workers for parallel execution and abstract JVM threads. A worker has its own private set of modules and an isolated scope, tied together in a single JVM thread. Each worker gets its own single-threaded event loop that behaves just like the event loop in a browser or in Node. Communication between workers uses the postMessage()method and theonmessageevent handler. To improve performance Ringo keeps free workers in a queue and only allocates a new one if all existing workers are busy. Workers help to keep multi-threaded JavaScript free from any common threading pitfalls, like synchronization or locking.
- 
        ringo/zipThis module provides classes to uncompress zip files and streams. 
- 
        ringo/httpserver/builderA module for configuring an http(s) server 
- 
        ringo/httpserver/eventsource
- 
        ringo/httpserver/httpserverA module containing the HttpServer constructor and its more lowlevel methods 
- 
        ringo/httpserver/indexA module containing build and daemon lifecycle methods for http server 
- 
        ringo/httpserver/utils
- 
        ringo/httpserver/websocket
- 
        ringo/jsgi/connectorLow-level JSGI adapter implementation. 
- 
        ringo/jsgi/eventsourceThis module provides the constructor for EventSource response objects, which allow pushing messages to connected clients. 
- 
        ringo/jsgi/responseThis module provides response helper functions for composing JSGI response objects. For more flexibility the JsgiResponseis chainable.
- 
        ringo/utils/arraysProvides utility functions for working with JavaScript Arrays. 
- 
        ringo/utils/datesAdds useful functions for working with JavaScript Date objects. 
- 
        ringo/utils/filesA collection of file related utilities not covered by the CommonJS standard fs module. 
- 
        ringo/utils/httpProvides utility functions to work with HTTP requests and responses. Most methods are useful for low-level operations only. To develop a full-featured web application it’s recommended to use a dedicated web framework like stick. 
- 
        ringo/utils/numbersProvides utility functions for working with JavaScript numbers. 
- 
        ringo/utils/objectsAdds utility functions for working with JavaScript Objects 
- 
        ringo/utils/stringsAdds useful methods to the JavaScript String type. 
- 
        ringo/utils/test
- 
        ringo/httpserver/context/application
- 
        ringo/httpserver/context/context
- 
        ringo/httpserver/context/static