LPFCP

object LPFCP

The LPFCP object provides all core methods to make Server-side and Client-side working with LPFCP

Types

Link copied to clipboard
@Target(allowedTargets = [AnnotationTarget.FUNCTION])
annotation class ExposedFunction

Annotation to mark functions as exposed for processing requests. Only functions annotated with @ExposedFunction can be invoked by processRequest.

Link copied to clipboard

Exception thrown when the functionArgs key is missing or invalid in the request.

Link copied to clipboard

Exception thrown when the functionName key is missing or invalid in the request.

Link copied to clipboard

Exception thrown when no function with the specified name and parameters is found.

Functions

Link copied to clipboard
inline fun <Interface> getProcessor(processorLPFCP: URI): Interface
inline fun <Interface> getProcessor(processorLPFCPURI: String): Interface

Creates a proxy instance of the specified interface that forwards method calls to the provided processor LPFCP URI.

inline fun <Interface> getProcessor(noinline processorLPFCP: (JSONObject, Type) -> Any?): Interface

Creates a proxy instance of the specified interface that forwards method calls to the provided processor function.

Link copied to clipboard
fun processRequest(request: JSONObject, processor: Any): EncodableResult<Any?>

Processes a request to invoke a function on the given processor object safely.

Link copied to clipboard
fun processRequestUnsafely(request: JSONObject, processor: Any): Any?

Processes a request to invoke a function on the given processor object.