| Package | Description |
|---|---|
| net.lecousin.framework.application.launcher |
Application launcher.
|
| net.lecousin.framework.application.libraries.artifacts |
Libraries management using group id, artifact id and version.
|
| net.lecousin.framework.concurrent |
Multi-threading framework.
|
| net.lecousin.framework.concurrent.async |
Classes implementing synchronization points such as asynchronous result, join point...
|
| net.lecousin.framework.concurrent.tasks |
Implementations of tasks.
|
| net.lecousin.framework.concurrent.tasks.drives |
Tasks on files or directories.
|
| net.lecousin.framework.concurrent.util |
Multi-threading utilities.
|
| net.lecousin.framework.concurrent.util.production.simple |
Production model: a producer produces objects that are consumed by a consumer.
This allows asynchronous production and consumption. An example is a server task producing an output, and a consumer sending it over the network. |
| net.lecousin.framework.io |
New java Input/Output model adding more flexibility and asynchronous operations.
|
| net.lecousin.framework.io.buffering |
IO with bufferization.
|
| net.lecousin.framework.io.out2in |
Implementations of IO.OutputToInput.
|
| net.lecousin.framework.io.serialization |
Serialization and deserialization framework.
|
| net.lecousin.framework.io.text |
IO on characters and text.
|
| net.lecousin.framework.io.util |
Utility classes for IO.
|
| net.lecousin.framework.locale |
Localization.
|
| net.lecousin.framework.util |
Utility classes.
|
| net.lecousin.framework.xml |
XML Parsing and generation.
|
| net.lecousin.framework.xml.dom |
Simple (partial) DOM implementation.
|
| net.lecousin.framework.xml.serialization |
XML serialization and deserialization.
|
| Modifier and Type | Method and Description |
|---|---|
AsyncSupplier<LoadedLibrary,LibraryManagementException> |
DynamicLibrariesManager.loadNewLibrary(String groupId,
String artifactId,
VersionSpecification version,
boolean optional,
byte priority,
WorkProgress progress,
long work) |
| Modifier and Type | Method and Description |
|---|---|
AsyncSupplier<File,NoException> |
LibraryDescriptor.getClasses()
Return a directory or a JAR file containing the classes to be loaded.
|
AsyncSupplier<? extends LibraryDescriptor,LibraryManagementException> |
LibraryDescriptorLoader.DependencyNode.getDescriptor() |
AsyncSupplier<File,IOException> |
LibrariesRepository.loadFile(String groupId,
String artifactId,
String version,
String classifier,
String type,
byte priority)
Load a file.
|
AsyncSupplier<? extends LibraryDescriptor,LibraryManagementException> |
LibraryDescriptorLoader.loadLibrary(String groupId,
String artifactId,
VersionSpecification version,
byte priority,
List<LibrariesRepository> additionalRepositories)
Search and load the library descriptor for the given group id, artifact id and version specification.
|
AsyncSupplier<LoadedLibrary,LibraryManagementException> |
ArtifactsLibrariesManager.loadNewLibrary(String groupId,
String artifactId,
VersionSpecification version,
boolean optional,
byte priority,
WorkProgress progress,
long work)
Load a new library.
|
AsyncSupplier<? extends LibraryDescriptor,LibraryManagementException> |
LibraryDescriptorLoader.loadProject(File dir,
byte priority)
Load a library descriptor from the given directory.
|
| Modifier and Type | Method and Description |
|---|---|
void |
LibraryDescriptorLoader.DependencyNode.setDescriptor(AsyncSupplier<? extends LibraryDescriptor,LibraryManagementException> descr) |
| Modifier and Type | Class and Description |
|---|---|
class |
Task.Output
Synchronization point holding the result or error of this task.
|
| Modifier and Type | Method and Description |
|---|---|
static <TError extends Exception> |
Threading.waitUnblockedWithError(Collection<AsyncSupplier<?,TError>> tasks)
Wait for the given tasks to finish, if one has an error this error is immediately thrown without waiting for other tasks.
|
| Modifier and Type | Method and Description |
|---|---|
<TError2 extends Exception> |
AsyncSupplier.convertError(Function<TError,TError2> converter)
Create an AsyncSupplier from the given one, adapting the error.
|
<T2> AsyncSupplier<T2,TError> |
AsyncSupplier.thenStart(Task.Parameter<T,T2,TError> task,
boolean evenIfErrorOrCancel)
Start the given task when this asynchronous unit is unblocked.
|
default AsyncSupplier<Void,TError> |
IAsync.toAsyncSupplier()
Convert this synchronization point into an AsyncWork with Void result.
|
| Modifier and Type | Method and Description |
|---|---|
void |
AsyncSupplier.forward(AsyncSupplier<T,TError> sp)
Forward the result, error, or cancellation to the given AsyncSupplier.
|
<TError2 extends Exception> |
AsyncSupplier.forward(AsyncSupplier<T,TError2> sp,
Function<TError,TError2> errorConverter)
Forward the result, error, or cancellation to the given AsyncSupplier.
|
default <T> void |
IAsync.onDone(AsyncSupplier<T,TError> sp,
Supplier<T> resultSupplier)
Unblock the given AsyncSupplier, or forward the error or cancellation.
|
| Modifier and Type | Method and Description |
|---|---|
static AsyncSupplier<Properties,Exception> |
LoadPropertiesFileTask.loadPropertiesFile(BufferedReadableCharacterStream stream,
byte priority,
IO.OperationType closeStreamAtEnd,
Consumer<Properties> onDone)
Load properties from a character stream.
|
static AsyncSupplier<Properties,Exception> |
LoadPropertiesFileTask.loadPropertiesFile(File file,
Charset charset,
byte priority,
boolean closeSynchronous,
Consumer<Properties> onDone)
Load properties from a file.
|
static AsyncSupplier<Properties,Exception> |
LoadPropertiesFileTask.loadPropertiesFile(IO.Readable.Buffered input,
Charset charset,
byte priority,
IO.OperationType closeInputAtEnd,
Consumer<Properties> onDone)
Load properties from a Buffered IO.
|
static AsyncSupplier<Properties,Exception> |
LoadPropertiesFileTask.loadPropertiesFile(IO.Readable input,
Charset charset,
byte priority,
IO.OperationType closeInputAtEnd,
Consumer<Properties> onDone)
Load properties from a Readable IO.
|
| Modifier and Type | Method and Description |
|---|---|
void |
FileAccess.getSize(AsyncSupplier<Long,IOException> sp) |
| Modifier and Type | Method and Description |
|---|---|
AsyncSupplier<OutputResultType,OutputErrorType> |
LimitAsyncOperations.Executor.execute(InputType data)
Launch asynchronous operation.
|
AsyncSupplier<OutputResultType,OutputErrorType> |
LimitAsyncOperations.getLastPendingOperation()
Return the last pending operation, or null.
|
AsyncSupplier<OutputResultType,OutputErrorType> |
LimitAsyncOperations.write(InputType data)
Queue the data to write.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
LimitAsyncOperations.writeDone(InputType data,
AsyncSupplier<OutputResultType,OutputErrorType> result) |
| Modifier and Type | Method and Description |
|---|---|
AsyncSupplier<?,? extends Exception> |
ProductTransformation.consume(Input product) |
AsyncSupplier<?,? extends Exception> |
Consumer.consume(T product)
Consume the given object.
|
AsyncSupplier<?,? extends Exception> |
ProductTransformation.endOfProduction() |
AsyncSupplier<?,? extends Exception> |
Consumer.endOfProduction()
Signal the end of production, meaning no new object will be given to consume.
|
AsyncSupplier<Void,Exception> |
Production.getSyncOnFinished() |
protected abstract AsyncSupplier<Output,Exception> |
ProductTransformation.process(Input input) |
AsyncSupplier<T,? extends Exception> |
Producer.produce(Production<T> production)
Ask to produce a new object.
|
| Modifier and Type | Method and Description |
|---|---|
static <TResult,TError extends Exception> |
IOUtil.error(TError error,
AsyncSupplier<TResult,TError> result,
Consumer<Pair<TResult,TError>> ondone)
Shortcut to transfer an error to ondone if it is not null, and to the AsyncWork.
|
static <T> void |
IOUtil.listenOnDone(AsyncSupplier<T,IOException> toListen,
AsyncSupplier<T,IOException> toUnblock,
Consumer<Pair<T,IOException>> ondone)
Listen to the given asynchronous operation, then unblock
toUnblock with its result/error/cancellation,
but calls ondone before if not null and the result is not cancelled. |
static <T> void |
IOUtil.listenOnDone(AsyncSupplier<T,IOException> toListen,
AsyncSupplier<T,IOException> toUnblock,
Consumer<Pair<T,IOException>> ondone)
Listen to the given asynchronous operation, then unblock
toUnblock with its result/error/cancellation,
but calls ondone before if not null and the result is not cancelled. |
static <T,T2> void |
IOUtil.listenOnDone(AsyncSupplier<T,IOException> toListen,
Consumer<T> onReady,
IAsync<IOException> onErrorOrCancel,
Consumer<Pair<T2,IOException>> ondone)
Listen to
toListen, then calls onReady if it succeed. |
static <T,T2> void |
IOUtil.listenOnDone(AsyncSupplier<T,IOException> toListen,
Task<?,?> onReady,
IAsync<IOException> onErrorOrCancel,
Consumer<Pair<T2,IOException>> ondone)
Listen to
toListen, then launch onReady if it succeed. |
static <TResult,TError extends Exception> |
IOUtil.notSuccess(IAsync<TError> sp,
AsyncSupplier<TResult,TError> result,
Consumer<Pair<TResult,TError>> ondone)
Shortcut to transfer error or cancellation.
|
static void |
IOUtil.readFully(IO.Readable io,
AsyncSupplier<byte[],IOException> result)
Read fully into a byte[], and unblock the given result upon completion.
|
static void |
IOUtil.readFullyKnownSize(IO.Readable io,
int size,
AsyncSupplier<byte[],IOException> result)
Read fully into a byte[], and unblock the given result upon completion.
|
static <T extends IO.Readable & IO.KnownSize> |
IOUtil.readFullyKnownSize(T io,
AsyncSupplier<byte[],IOException> result)
Read fully into a byte[], and unblock the given result upon completion.
|
static <TResult,TError extends Exception> |
IOUtil.success(TResult res,
AsyncSupplier<TResult,TError> result,
Consumer<Pair<TResult,TError>> ondone)
Shortcut to transfer a result to ondone if it is not null, and to the AsyncWork.
|
protected void |
FragmentedSubIO.writeAsync(Iterator<RangeLong> it,
RangeLong r,
long p,
int done,
long pos,
ByteBuffer buffer,
Consumer<Pair<Integer,IOException>> ondone,
AsyncSupplier<Integer,IOException> sp) |
| Modifier and Type | Field and Description |
|---|---|
protected AsyncSupplier<ByteBuffer,IOException> |
Decoder.nextBuffer |
| Modifier and Type | Method and Description |
|---|---|
AsyncSupplier<Integer,IOException> |
ProgressiveBufferedReadableCharStream.readAsync(char[] buf,
int offset,
int length) |
AsyncSupplier<Integer,IOException> |
ICharacterStream.Readable.readAsync(char[] buf,
int offset,
int length)
Read characters.
|
AsyncSupplier<Integer,IOException> |
BufferedReadableCharacterStreamLocation.readAsync(char[] buf,
int offset,
int length) |
AsyncSupplier<Integer,IOException> |
BufferedReadableCharacterStream.readAsync(char[] buf,
int off,
int len) |
default AsyncSupplier<Integer,IOException> |
ICharacterStream.Readable.readFullyAsync(char[] buf,
int offset,
int length)
Read all requested characters.
|
AsyncSupplier<UnprotectedString,IOException> |
ProgressiveBufferedReadableCharStream.readNextBufferAsync() |
AsyncSupplier<UnprotectedString,IOException> |
ICharacterStream.Readable.Buffered.readNextBufferAsync()
Return the next buffer as soon as available, or null if then end of stream has been reached.
|
AsyncSupplier<UnprotectedString,IOException> |
BufferedReadableCharacterStreamLocation.readNextBufferAsync() |
AsyncSupplier<UnprotectedString,IOException> |
BufferedReadableCharacterStream.readNextBufferAsync() |
AsyncSupplier<Boolean,IOException> |
ProgressiveBufferedReadableCharStream.readUntilAsync(char endChar,
UnprotectedStringBuffer string) |
AsyncSupplier<Boolean,IOException> |
ICharacterStream.Readable.Buffered.readUntilAsync(char endChar,
UnprotectedStringBuffer string)
Read characters until the given end, and put them in the given string.
|
AsyncSupplier<Boolean,IOException> |
BufferedReadableCharacterStreamLocation.readUntilAsync(char endChar,
UnprotectedStringBuffer string) |
AsyncSupplier<Boolean,IOException> |
BufferedReadableCharacterStream.readUntilAsync(char endChar,
UnprotectedStringBuffer string) |
AsyncSupplier<T,Exception> |
FullReadLines.start()
Start to read lines in a separate task.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
LimitWriteOperationsReuseBuffers.writeDone(ByteBuffer buffer,
AsyncSupplier<Integer,IOException> result) |
| Modifier and Type | Method and Description |
|---|---|
default AsyncSupplier<String,NoException> |
ILocalizableString.appLocalization()
Return the string localized in the application language.
|
AsyncSupplier<String,NoException> |
FixedLocalizedString.appLocalization() |
AsyncSupplier<Map<String,String>,IOException> |
LocalizedProperties.getNamespaceContent(String namespace,
String[] languageTag)
Return the localizable properties for the given namespace and language.
|
default AsyncSupplier<String,NoException> |
ILocalizableString.localize(String languageTag)
Return the localized string, based on language tag.
|
AsyncSupplier<String,NoException> |
FixedLocalizedString.localize(String languageTag) |
AsyncSupplier<String,NoException> |
LocalizableStringBuffer.localize(String[] languageTag) |
AsyncSupplier<String,NoException> |
LocalizableString.localize(String[] languageTag) |
AsyncSupplier<String,NoException> |
ILocalizableString.localize(String[] languageTag)
Return the localized string, based on language tag.
|
AsyncSupplier<String,NoException> |
FixedLocalizedString.localize(String[] languageTag) |
AsyncSupplier<String,NoException> |
CompositeLocalizable.localize(String[] languageTag) |
AsyncSupplier<String,NoException> |
LocalizedProperties.localize(String[] languageTag,
String namespace,
String key,
Serializable... values)
Localization.
|
| Modifier and Type | Method and Description |
|---|---|
AsyncSupplier<List<? extends ElementType>,Exception> |
HierarchyProvider.Asynchronous.getChildren(ElementType element,
boolean refresh,
byte priority)
Return the children of the given element.
|
AsyncSupplier<Boolean,Exception> |
HierarchyProvider.Asynchronous.hasChildren(ElementType element,
boolean refresh,
byte priority)
Return true if the given element has children.
|
AsyncSupplier<Integer,IOException> |
UnprotectedStringBuffer.CS.readAsync(char[] buf,
int offset,
int length) |
AsyncSupplier<UnprotectedString,IOException> |
UnprotectedStringBuffer.CS.readNextBufferAsync() |
AsyncSupplier<Boolean,IOException> |
UnprotectedStringBuffer.CS.readUntilAsync(char endChar,
UnprotectedStringBuffer string) |
| Modifier and Type | Method and Description |
|---|---|
AsyncSupplier<Boolean,Exception> |
XMLStreamEventsAsync.goInto(XMLStreamEvents.ElementContext rootContext,
String... innerElements)
Go successively into the given elements.
|
AsyncSupplier<Boolean,Exception> |
XMLStreamEventsAsync.nextInnerElement(XMLStreamEvents.ElementContext parent)
Go to the next inner element.
|
AsyncSupplier<Boolean,Exception> |
XMLStreamEventsAsync.nextInnerElement(XMLStreamEvents.ElementContext parent,
String childName)
Go to the next inner element having the given name.
|
AsyncSupplier<Map<String,String>,Exception> |
XMLStreamEventsAsync.readInnerElementsText()
Read all inner elements with their text, and return a mapping with the element's name as key and inner text as value.
|
AsyncSupplier<UnprotectedStringBuffer,Exception> |
XMLStreamEventsAsync.readInnerText()
Read inner text and close element.
|
static AsyncSupplier<XMLStreamReader,Exception> |
XMLStreamReader.start(IO.Readable.Buffered io,
int charactersBufferSize,
int maxBuffers,
boolean addPositionInErrors)
Utility method that initialize a XMLStreamReader, initialize it, and
return an AsyncWork which is unblocked when characters are available to be read.
|
| Modifier and Type | Method and Description |
|---|---|
static AsyncSupplier<XMLElement,Exception> |
XMLElement.create(XMLDocument doc,
XMLStreamEventsAsync stream)
Create an Element from a XMLStreamEvents.
|
static AsyncSupplier<XMLDocument,Exception> |
XMLDocument.create(XMLStreamEventsAsync stream)
Create a document from a XMLStreamEvents.
|
Copyright © 2019. All rights reserved.