Classes
The core building blocks of your Layline JavaScript applications — from data handling and time manipulation to workflow orchestration and external service integration.
Data & Messaging
| Class | Description |
|---|---|
| Arith64 | Performs correct 64-bit arithmetic and bitwise operations for large integers. |
| CompressionUtils | Utility class for compressing and decompressing data. |
| DataDictionary | Navigate your data dictionary hierarchy through this property. The structure mirrors your project's format and data dictionary definitions. |
| DataDictionaryEntity | Represents a single node in your data dictionary hierarchy for type-safe access to message fields. |
| Message | The message payload. Its structure mirrors the data dictionary definition for this message type. |
| PackedMessage | Restores the packed message to a full Message instance. |
| StringUtils | Utility class for common string operations: encoding, decoding, validation, and charset conversion. |
Date & Time
| Class | Description |
|---|---|
| DateTime | Represents a point in time with date, time, and timezone offset information. |
| Duration | Represents an amount of time — days, hours, minutes, seconds, milliseconds, or nanoseconds. |
| LocalDate | Represents a date without time or timezone — just year, month, and day. |
| Time | Represents a time of day without date or timezone — just hour, minute, second, and nanosecond. |
| TimeZone | Represents a timezone for use with DateTime, LocalDate, and Time, handling daylight saving time automatically. |
| ZoneOffset | Represents a fixed offset from UTC with no daylight saving time changes. |
Workflow & Processing
| Class | Description |
|---|---|
| Counter | A thread-safe counter for tracking numeric values — message counts, totals, or any incrementing/decrementing metric. |
| JavaScriptProcessor | Defines the lifecycle hooks available in a JavaScript Asset — startup, message arrival, stream boundaries, and shutdown. |
| Metrics | Retrieves or creates a counter metric. |
| OutputPort | Represents a connection from one processor to another within a workflow. |
| Processor | Provides access to the current processor's configuration and runtime properties. |
| Stream | Represents the current data stream being processed. |
| Workflow | Provides access to the current workflow's metadata — its name and data dictionary. |
Services & Integration
| Class | Description |
|---|---|
| Connection | Represents an active link to a service (e.g., JDBC database, HTTP endpoint) with transaction support. |
| Send emails through a configured Email Service. | |
| Service | Services linked to your JavaScript Asset are available through the services object using their configured names. |
| TimerService | Schedule and manage timers that trigger workflows at specific times or intervals. |
| Vendor | Groups related StatusCode definitions together. |
Status & Error Handling
| Class | Description |
|---|---|
| Status | Creates a Status instance from a vendor and status code. Additional arguments fill placeholder positions in the message template. |
| StatusCode | A single entry in a Resource Status Definition Asset — the template definition for a Status. |
| StatusRegistry | Provides access to all defined vendors and status codes in your project. |