mirror of
https://github.com/xpipe-io/xpipe.git
synced 2024-11-24 08:30:27 +00:00
More preparation for proper release
This commit is contained in:
parent
f7b37412b4
commit
146d1b5d6a
8 changed files with 87 additions and 5 deletions
17
README.md
Normal file
17
README.md
Normal file
|
@ -0,0 +1,17 @@
|
|||
## X-Pipe Java
|
||||
|
||||
This repository contains the following four modules:
|
||||
|
||||
- Core - Shared core classes of the Java API and the X-Pipe daemon implementation
|
||||
- API - The API that can be used to interact with X-Pipe from any JVM-based languages
|
||||
- Beacon - The X-Pipe beacon component is responsible for handling all communications between the X-Pipe daemon
|
||||
and the client applications, for example the various programming language APIs and the CLI
|
||||
- Extension - An API to create all different kinds of extensions for the X-Pipe platform
|
||||
|
||||
## Development
|
||||
|
||||
All X-Pipe components target [JDK 17](https://openjdk.java.net/projects/jdk/17/) and make full use of the Java Module System (JPMS).
|
||||
All components are modularized, including all their dependencies.
|
||||
In case a dependency is (sadly) not modularized yet, module information is manually added using [moditect](https://github.com/moditect/moditect-gradle-plugin).
|
||||
These dependency generation rules are accumulated in the [X-Pipe dependencies](https://github.com/xpipe-io/xpipe_java_deps)
|
||||
repository, which is shared between all components and integrated as a git submodule.
|
|
@ -19,15 +19,22 @@ repositories {
|
|||
}
|
||||
|
||||
dependencies {
|
||||
// Fix warnings about missing annotations
|
||||
compileOnly group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: "2.13.0"
|
||||
testCompileOnly group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: "2.13.0"
|
||||
|
||||
implementation project(':core')
|
||||
implementation project(':beacon')
|
||||
}
|
||||
|
||||
def canTestWithDev = findProject(':app') != null
|
||||
def daemonCommand = canTestWithDev ? "cmd.exe /c \"$rootDir\\gradlew.bat\" :app:run" : 'xpipe.exe'
|
||||
|
||||
test {
|
||||
workingDir = rootDir
|
||||
|
||||
// Daemon properties
|
||||
systemProperty "io.xpipe.beacon.exec", "cmd.exe /c \"$rootDir\\gradlew.bat\" :app:run" +
|
||||
systemProperty "io.xpipe.beacon.exec", daemonCommand +
|
||||
" -Dio.xpipe.app.mode=tray" +
|
||||
" -Dio.xpipe.beacon.port=21722" +
|
||||
" -Dio.xpipe.app.dataDir=$projectDir/local/" +
|
||||
|
@ -38,6 +45,6 @@ test {
|
|||
|
||||
// API properties
|
||||
// systemProperty 'io.xpipe.beacon.debugOutput', "true"
|
||||
systemProperty 'io.xpipe.beacon.debugExecOutput', "true"
|
||||
// systemProperty 'io.xpipe.beacon.debugExecOutput', "true"
|
||||
systemProperty "io.xpipe.beacon.port", "21722"
|
||||
}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
module io.xpipe.api {
|
||||
exports io.xpipe.api;
|
||||
exports io.xpipe.api.connector;
|
||||
|
||||
requires transitive io.xpipe.core;
|
||||
requires io.xpipe.beacon;
|
||||
|
|
15
core/README.md
Normal file
15
core/README.md
Normal file
|
@ -0,0 +1,15 @@
|
|||
## X-Pipe Core
|
||||
|
||||
The X-Pipe core component contains all the shared core classes used by the API, beacon, and daemon.
|
||||
|
||||
The main part can be found in the [data package]().
|
||||
It contains all definitions of the internal X-Pipe data model and all IO functionality for these data structures.
|
||||
|
||||
The [source package]() contains the basic data source model classes.
|
||||
These have to be used by every custom data source implementation.
|
||||
|
||||
The [store package]() contains the basic data store model classes.
|
||||
These have to be used by every custom data store implementation.
|
||||
|
||||
Every class is expected to be potentially used in the context of files and message exchanges.
|
||||
As a result, all data structures exchanged must be serializable/deserializable with jackson.
|
16
extension/README.md
Normal file
16
extension/README.md
Normal file
|
@ -0,0 +1,16 @@
|
|||
## X-Pipe Extension API
|
||||
|
||||
The X-Pipe extension API allows you to create extensions of any kind for X-Pipe.
|
||||
|
||||
|
||||
### Custom data sources
|
||||
|
||||
A custom data source type can be implemented by creating a custom [DataSourceProvider]().
|
||||
This provider contains all the information required for proper handling of your custom data sources,
|
||||
whether you access it from the CLI, any API, or the X-Pipe commander gui.
|
||||
|
||||
### Custom data sinks
|
||||
|
||||
A custom data sink type can be implemented by creating a custom [DataSinkProvider]().
|
||||
As the notion of a sink is abstract, it allows you to basically implement any type of sink you want.
|
||||
Whether the target is a programming language, another application, a database, or a regular file.
|
|
@ -13,6 +13,7 @@ apply from: "$rootDir/deps/jackson.gradle"
|
|||
apply from: "$rootDir/deps/commons.gradle"
|
||||
apply from: "$rootDir/deps/lombok.gradle"
|
||||
apply from: "$rootDir/deps/ikonli.gradle"
|
||||
apply from: "$rootDir/deps/slf4j.gradle"
|
||||
apply from: 'publish.gradle'
|
||||
apply from: "$rootDir/deps/publish-base.gradle"
|
||||
|
||||
|
@ -27,4 +28,7 @@ repositories {
|
|||
dependencies {
|
||||
implementation project(':core')
|
||||
implementation project(':fxcomps')
|
||||
|
||||
implementation 'com.google.code.gson:gson:2.9.0'
|
||||
implementation 'org.controlsfx:controlsfx:11.1.1'
|
||||
}
|
||||
|
|
|
@ -1,15 +1,34 @@
|
|||
package io.xpipe.extension.event;
|
||||
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.ServiceLoader;
|
||||
|
||||
public abstract class EventHandler {
|
||||
|
||||
private static final EventHandler DEFAULT = new EventHandler() {
|
||||
@Override
|
||||
public List<TrackEvent> snapshotEvents() {
|
||||
return List.of();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handle(TrackEvent te) {
|
||||
LoggerFactory.getLogger(te.getCategory()).info(te.getMessage());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handle(ErrorEvent ee) {
|
||||
LoggerFactory.getLogger(EventHandler.class).error(ee.getDescription(), ee.getThrowable());
|
||||
}
|
||||
};
|
||||
|
||||
private static EventHandler INSTANCE;
|
||||
|
||||
private static void init() {
|
||||
if (INSTANCE == null) {
|
||||
INSTANCE = ServiceLoader.load(EventHandler.class).findFirst().orElseThrow();
|
||||
INSTANCE = ServiceLoader.load(EventHandler.class).findFirst().orElse(DEFAULT);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -14,8 +14,11 @@ module io.xpipe.extension {
|
|||
requires io.xpipe.fxcomps;
|
||||
requires org.apache.commons.collections4;
|
||||
requires static lombok;
|
||||
requires com.dlsc.preferencesfx;
|
||||
requires com.dlsc.formsfx;
|
||||
requires static com.dlsc.preferencesfx;
|
||||
requires static com.dlsc.formsfx;
|
||||
requires static org.slf4j;
|
||||
requires static com.google.gson;
|
||||
requires static org.controlsfx.controls;
|
||||
requires java.desktop;
|
||||
requires org.fxmisc.richtext;
|
||||
requires org.fxmisc.flowless;
|
||||
|
|
Loading…
Reference in a new issue