corda / net.corda.core

Package net.corda.core

Types

ClientRelevantError

interface ClientRelevantError

Allows an implementing Throwable to be propagated to clients.

CordaOID

object CordaOID

OIDs used for the Corda platform. All entries MUST be defined in this file only and they MUST NOT be removed. If an OID is incorrectly assigned, it should be marked deprecated and NEVER be reused again.

CordaThrowable

interface CordaThrowable

Annotations

CordaInternal

annotation class CordaInternal

These methods and annotations are not part of Corda's API compatibility guarantee and applications should not use them.

DeleteForDJVM

annotation class DeleteForDJVM

Declare the annotated element to unsuitable for the deterministic version of Corda.

DoNotImplement

annotation class DoNotImplement

This annotation is for interfaces and abstract classes that provide Corda functionality to user applications. Future versions of Corda may add new methods to such interfaces and classes, but will not remove or modify existing methods.

KeepForDJVM

annotation class KeepForDJVM

This annotates a class or file that we want to include into the deterministic version of Corda Core. We don't expect everything within that class/file to be deterministic; those non-deterministic elements need to be annotated with either DeleteForDJVM or StubOutForDJVM so that they can be deleted.

StubOutForDJVM

annotation class StubOutForDJVM

We expect that almost every non-deterministic element can have its bytecode deleted entirely from the deterministic version of Corda. This annotation is for those (hopefully!) few occasions where the non-deterministic function cannot be deleted. In these cases, the function will be stubbed out instead.

Exceptions

CordaException

open class CordaException : Exception, CordaThrowable

CordaRuntimeException

open class CordaRuntimeException : RuntimeException, CordaThrowable

Functions

doOnError

fun <SNAPSHOT, ELEMENT> DataFeed<SNAPSHOT, ELEMENT>.doOnError(action: (Throwable) -> Unit): DataFeed<SNAPSHOT, ELEMENT>

Returns a DataFeed that processes errors according to the provided action.

mapErrors

fun <SNAPSHOT, ELEMENT> DataFeed<SNAPSHOT, ELEMENT>.mapErrors(transform: (Throwable) -> Throwable): DataFeed<SNAPSHOT, ELEMENT>

Returns a DataFeed that transforms errors according to the provided transform function.

fun <ELEMENT> <ERROR CLASS><ELEMENT>.mapErrors(transform: (Throwable) -> Throwable): <ERROR CLASS><ELEMENT>

Returns an Observable that transforms errors according to the provided transform function.

toFuture

fun <T> <ERROR CLASS><T>.toFuture(): CordaFuture<T>

Returns a CordaFuture bound to the first item emitted by this Observable. The future will complete with a NoSuchElementException if no items are emitted or any other error thrown by the Observable. If it's cancelled then it will unsubscribe from the observable.

toObservable

fun <A> CordaFuture<out A>.toObservable(): <ERROR CLASS><A>