openfin-gateway

OpenFin Gateway

Лицензия

Лицензия

Группа

Группа

com.mijibox.openfin
Идентификатор

Идентификатор

openfin-gateway
Последняя версия

Последняя версия

1.3
Дата

Дата

Тип

Тип

jar
Описание

Описание

openfin-gateway
OpenFin Gateway
Ссылка на сайт

Ссылка на сайт

https://github.com/mijibox/openfin-java-gateway
Система контроля версий

Система контроля версий

https://github.com/mijibox/openfin-java-gateway

Скачать openfin-gateway

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/com.mijibox.openfin/openfin-gateway/ -->
<dependency>
    <groupId>com.mijibox.openfin</groupId>
    <artifactId>openfin-gateway</artifactId>
    <version>1.3</version>
</dependency>
// https://jarcasting.com/artifacts/com.mijibox.openfin/openfin-gateway/
implementation 'com.mijibox.openfin:openfin-gateway:1.3'
// https://jarcasting.com/artifacts/com.mijibox.openfin/openfin-gateway/
implementation ("com.mijibox.openfin:openfin-gateway:1.3")
'com.mijibox.openfin:openfin-gateway:jar:1.3'
<dependency org="com.mijibox.openfin" name="openfin-gateway" rev="1.3">
  <artifact name="openfin-gateway" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.mijibox.openfin', module='openfin-gateway', version='1.3')
)
libraryDependencies += "com.mijibox.openfin" % "openfin-gateway" % "1.3"
[com.mijibox.openfin/openfin-gateway "1.3"]

Зависимости

compile (4)

Идентификатор библиотеки Тип Версия
net.java.dev.jna : jna-platform jar 5.5.0
org.slf4j : slf4j-api jar 1.7.30
org.apache.commons : commons-compress jar 1.20
javax.json : javax.json-api jar 1.1.4

test (3)

Идентификатор библиотеки Тип Версия
ch.qos.logback : logback-classic jar 1.2.3
org.glassfish : javax.json jar 1.1.4
junit : junit jar 4.13

Модули Проекта

Данный проект не имеет модулей.

OpenFin Java Gateway

Using OpenFin API Protocol and built on top of the InterApplicationBus messaging. It opens the gateway between your Java application and OpenFin JavaScript V2 API.

Using the gateway, you can send and receive OpenFin InterApplicationBus messages natively or invoke almost any OpenFin JavaScript V2 API methods.

The following code snippet shows how to connect to OpenFin Runtime and invoke OpenFin JavaScript V2 APIs.

OpenFinGatewayLauncher.newOpenFinGatewayLauncher()
        .launcherBuilder(OpenFinLauncher.newOpenFinLauncherBuilder()
                .runtimeVersion("stable")
                .addRuntimeOption("--v=1")
                .addRuntimeOption("--no-sandbox"))
        .open()
        .thenAccept(gateway -> {
            gateway.invoke("fin.System.getVersion").thenAccept(r -> {
                System.out.println("openfin version: " + r.getResultAsString());
            });

            gateway.invoke(true, "fin.Application.startFromManifest",
                    Json.createValue("https://cdn.openfin.co/demos/hello/app.json")).thenAccept(r -> {
                        JsonObject appObj = r.getResultAsJsonObject();
                        System.out.println("appUuid: " + appObj.getJsonObject("identity").getString("uuid"));
                        ProxyObject proxyAppObj = r.getProxyObject();
                        proxyAppObj.addListener("on", "closed", (e) -> {
                            System.out.println("hello openfin closed, listener got event: " + e);
                            gateway.close();
                        });
                    }).exceptionally(e -> {
                        System.err.println("error starting hello openfin app");
                        e.printStackTrace();
                        gateway.close();
                        return null;
                    });
        });

Under the hood, it launches OpenFin Runtime directly on MacOS or Linux, and via OpenFin RVM on Windows. If OpenFin Runtime or RVM cannot be found locally, it will be downloaded from OpenFin's server or specified assetsUrl.

More examples using OpenFin Java Gateway can be found in OpenFin Java Gateway Examples

If asynchronous programming is not your thing, check out OpenFin Java-JavaScript Adapter, which is built on top of OpenFin Java Gateway.

Methods like fin.System.monitorExternalProcess that have listener nested inside an object cannot be invoked correctly at the moment. Gateway v2 will have the ability to support such.

License

Apache License 2.0

The code in this repository is covered by the included license.

However, if you run this code, it may call on the OpenFin RVM or OpenFin Runtime, which are covered by OpenFin’s Developer, Community, and Enterprise licenses. You can learn more about OpenFin licensing at the links listed below or just email OpenFin at support@openfin.co with questions.

https://openfin.co/developer-agreement/
https://openfin.co/licensing/

Версии библиотеки

Версия
1.3
1.2
1.1
1.0