Package-level declarations

Types

Link copied to clipboard
@Requires(property = "elide.assets.isEnabled", notEquals = "false")
@Controller(value = "${elide.assets.prefix:/_/assets}")
class AssetController @Inject constructor(assetManager: AssetManager) : StatusEnabledController

Built-in controller implementation which bridges the configured asset serving prefix to the active AssetManager layer for this server run.

Link copied to clipboard
interface AssetManager

Describes the API surface of an Asset Manager, which controls access to embedded server-side assets such as CSS and JS documents.

Link copied to clipboard

Defines the API surface of a loader which is capable of searching for an asset manifest at server startup, and then de-serializing the manifest, so it can be indexed and then made available via an AssetManager implementation.

Link copied to clipboard
data class AssetPointer(val moduleId: AssetModuleId, val type: AssetType, val token: String, val tag: String, val etag: String, val modified: Long, val index: SortedSet<Int>?) : Serializable

Reference to an application-embedded asset.

Link copied to clipboard

Describes the API surface expected for a reader of static assets from some data source; responsible for efficiently reading assets from a resource path and producing resulting content.

Link copied to clipboard
@Serializable
data class AssetReference(val module: AssetModuleId, val assetType: AssetType, val href: String, val type: String? = null, val inline: Boolean = false, val preload: Boolean = false) : Serializable

Represents a resolved reference to an asset at serving-time, before it is rendered into a link or other tag.

Link copied to clipboard
interface AssetResolver

Describes the expected API surface for a resolver of server-side assets, which, in cooperation with an AssetReader and under the management of an AssetManager, is responsible for checking asset paths for existence and translating them to absolute paths which may be read and served.

Link copied to clipboard

Enumerates known kinds of registered application assets.

Link copied to clipboard
class RenderedAsset(val module: AssetModuleId, val type: AssetType, val variant: CompressionMode, val headers: Map<String, String>, val size: Long, val lastModified: Long, val digest: Pair<HashAlgorithm, ByteString>?, val producer: () -> ByteString)

Intermediary class which represents an asset that has been fully prepared to serve to an end-user request, including any headers which should apply to the response.

Link copied to clipboard
sealed class ServerAsset

Describes a server-side asset which is embedded in an application bundle through Elide's asset tools and protocol buffer for asset bundle metadata.

Link copied to clipboard

Built-in asset manager implementation for use with Elide applications.

Link copied to clipboard
@Context
@Singleton
class ServerAssetReader : AssetReader

Default implementation of an AssetReader; used in concert with the default AssetManager to fulfill HTTP requests for static assets embedded within the application.