Package-level declarations

Types

Link copied to clipboard

Implements the logic of substitution for StreamSubstitutionType.BLOCKING

Link copied to clipboard
class CapturingOutputStream(parentStream: PrintStream?, conf: OutputConfig, captureOutput: Boolean, val onCaptured: (String) -> Unit) : OutputStream

An OutputStream that captures the written content while optionally forwarding it to a parentStream. Capturing only happens if captureOutput is true. The captured content is passed to a callback function onCaptured when certain buffer conditions are met. These conditions are defined by conf.

Link copied to clipboard
typealias DataFactory<DataT> = (initialData: DataT?) -> DataT

Creates new data using possibly existing initial data

Link copied to clipboard
typealias DataFinalizer<DataT> = (newData: DataT, oldData: DataT) -> Unit

Substitutes old data back to the property. Possibly destroys newData as long it's no longer necessary

Link copied to clipboard
class DataFlowComponents<DataT>(val initialData: DataT, val substitutor: DataSubstitutor<DataT>, val finalizer: DataFinalizer<DataT>)

Parameters of SubstitutionEngine

Link copied to clipboard
class DataList<DataT>(initialData: DataT)

Represents a list of data items. Supports three operations:

Link copied to clipboard
typealias DataSubstitutor<DataT> = (newData: DataT) -> DataT

Substitutes the shared data property with the newData. Returns previous value of the property

Link copied to clipboard
class DelegatingInputStream(val getDelegate: () -> InputStream) : InputStream
Link copied to clipboard
class DelegatingPrintStream(getDelegate: () -> PrintStream) : PrintStream
Link copied to clipboard
Link copied to clipboard

Implements the logic of substitution for StreamSubstitutionType.NON_BLOCKING

Link copied to clipboard
Link copied to clipboard
abstract class StreamSubstitutionManager<StreamT : Closeable>(systemStreamProp: KMutableProperty0<StreamT>, kernelStreamProp: KMutableProperty0<StreamT>?, delegatingStreamFactory: (delegateFactory: () -> StreamT) -> StreamT, substitutionEngineType: StreamSubstitutionType)

An abstract class designed to manage substituting of standard streams with some custom streams.

Link copied to clipboard
abstract class SubstitutionEngine<DataT>(dataFlowComponents: DataFlowComponents<DataT>)

Handles the logic of how data is created, when it's substituted instead of the previous value of a shared resource, and how it's substituted back