Compare commits
3 Commits
1.0.1-BETA
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c6b892c51d | ||
|
|
d749b9c84c | ||
|
|
ba44cd6f7d |
@@ -3,7 +3,7 @@
|
|||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>org.openautonomousconnection</groupId>
|
<groupId>org.openautonomousconnection</groupId>
|
||||||
<artifactId>WebClient</artifactId>
|
<artifactId>WebClient</artifactId>
|
||||||
<version>1.0.1-BETA.0.3</version>
|
<version>1.0.1-BETA.0.4</version>
|
||||||
<description>The default WebClient</description>
|
<description>The default WebClient</description>
|
||||||
<url>https://open-autonomous-connection.org/</url>
|
<url>https://open-autonomous-connection.org/</url>
|
||||||
<issueManagement>
|
<issueManagement>
|
||||||
|
|||||||
6
pom.xml
6
pom.xml
@@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
<groupId>org.openautonomousconnection</groupId>
|
<groupId>org.openautonomousconnection</groupId>
|
||||||
<artifactId>WebClient</artifactId>
|
<artifactId>WebClient</artifactId>
|
||||||
<version>1.0.1-BETA.0.3</version>
|
<version>1.0.1-BETA.0.4</version>
|
||||||
<organization>
|
<organization>
|
||||||
<name>Open Autonomous Connection</name>
|
<name>Open Autonomous Connection</name>
|
||||||
<url>https://open-autonomous-connection.org/</url>
|
<url>https://open-autonomous-connection.org/</url>
|
||||||
@@ -74,12 +74,12 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.openautonomousconnection</groupId>
|
<groupId>org.openautonomousconnection</groupId>
|
||||||
<artifactId>LuaScript</artifactId>
|
<artifactId>LuaScript</artifactId>
|
||||||
<version>0.0.0-STABLE.1.3</version>
|
<version>0.0.0-STABLE.1.4</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.openautonomousconnection</groupId>
|
<groupId>org.openautonomousconnection</groupId>
|
||||||
<artifactId>Protocol</artifactId>
|
<artifactId>Protocol</artifactId>
|
||||||
<version>1.0.1-BETA.0.5</version>
|
<version>1.0.1-BETA.0.6</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.projectlombok</groupId>
|
<groupId>org.projectlombok</groupId>
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ import org.openautonomousconnection.protocol.packets.v1_0_1.beta.web.impl.resour
|
|||||||
import org.openautonomousconnection.protocol.side.client.ProtocolClient;
|
import org.openautonomousconnection.protocol.side.client.ProtocolClient;
|
||||||
import org.openautonomousconnection.protocol.side.client.ProtocolWebClient;
|
import org.openautonomousconnection.protocol.side.client.ProtocolWebClient;
|
||||||
import org.openautonomousconnection.protocol.side.client.events.ConnectedToProtocolINSServerEvent;
|
import org.openautonomousconnection.protocol.side.client.events.ConnectedToProtocolINSServerEvent;
|
||||||
|
import org.openautonomousconnection.protocol.side.client.events.ConnectedToProtocolServerEvent;
|
||||||
import org.openautonomousconnection.protocol.urlhandler.v1_0_1.beta.LibClientImpl_v1_0_1_B;
|
import org.openautonomousconnection.protocol.urlhandler.v1_0_1.beta.LibClientImpl_v1_0_1_B;
|
||||||
import org.openautonomousconnection.protocol.urlhandler.v1_0_1.beta.web.WebFlagInspector;
|
import org.openautonomousconnection.protocol.urlhandler.v1_0_1.beta.web.WebFlagInspector;
|
||||||
import org.openautonomousconnection.protocol.urlhandler.v1_0_1.beta.web.WebRequestContextProvider;
|
import org.openautonomousconnection.protocol.urlhandler.v1_0_1.beta.web.WebRequestContextProvider;
|
||||||
@@ -205,7 +206,6 @@ public final class ClientImpl extends ProtocolWebClient {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void streamChunk(WebPacketHeader header, int seq, byte[] data) {
|
public void streamChunk(WebPacketHeader header, int seq, byte[] data) {
|
||||||
|
|
||||||
StreamState state = streams.get(new StreamKey(header));
|
StreamState state = streams.get(new StreamKey(header));
|
||||||
if (state == null) {
|
if (state == null) {
|
||||||
throw new IllegalStateException("Chunk without streamStart");
|
throw new IllegalStateException("Chunk without streamStart");
|
||||||
@@ -216,7 +216,6 @@ public final class ClientImpl extends ProtocolWebClient {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void streamEnd(WebPacketHeader header, boolean ok, String error) {
|
public void streamEnd(WebPacketHeader header, boolean ok, String error) {
|
||||||
|
|
||||||
StreamState state = streams.get(new StreamKey(header));
|
StreamState state = streams.get(new StreamKey(header));
|
||||||
if (state != null) {
|
if (state != null) {
|
||||||
state.markEnd(ok, error);
|
state.markEnd(ok, error);
|
||||||
@@ -224,8 +223,7 @@ public final class ClientImpl extends ProtocolWebClient {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void streamFinish(WebPacketHeader header, byte[] ignored) {
|
public void streamFinish(WebPacketHeader header, byte[] data) {
|
||||||
|
|
||||||
StreamKey key = new StreamKey(header);
|
StreamKey key = new StreamKey(header);
|
||||||
StreamState state = streams.remove(key);
|
StreamState state = streams.remove(key);
|
||||||
if (state == null) return;
|
if (state == null) return;
|
||||||
|
|||||||
@@ -5,9 +5,7 @@ import javafx.scene.web.WebEngine;
|
|||||||
import javafx.scene.web.WebView;
|
import javafx.scene.web.WebView;
|
||||||
import org.luaj.vm2.Globals;
|
import org.luaj.vm2.Globals;
|
||||||
import org.luaj.vm2.LuaError;
|
import org.luaj.vm2.LuaError;
|
||||||
import org.openautonomousconnection.luascript.fx.FxDomHost;
|
import org.openautonomousconnection.luascript.fx.*;
|
||||||
import org.openautonomousconnection.luascript.fx.FxEventHost;
|
|
||||||
import org.openautonomousconnection.luascript.fx.FxWebViewResourceHost;
|
|
||||||
import org.openautonomousconnection.luascript.hosts.HostServices;
|
import org.openautonomousconnection.luascript.hosts.HostServices;
|
||||||
import org.openautonomousconnection.luascript.runtime.LuaRuntime;
|
import org.openautonomousconnection.luascript.runtime.LuaRuntime;
|
||||||
import org.openautonomousconnection.luascript.security.LuaExecutionPolicy;
|
import org.openautonomousconnection.luascript.security.LuaExecutionPolicy;
|
||||||
@@ -95,11 +93,26 @@ public final class FxEngine implements AutoCloseable {
|
|||||||
.sandbox(true)
|
.sandbox(true)
|
||||||
);
|
);
|
||||||
|
|
||||||
ConsoleHostImpl console = new ConsoleHostImpl(logger);
|
|
||||||
UiHostImpl uiHost = new UiHostImpl(engine, webView, dom);
|
|
||||||
FxWebViewResourceHost resourceHost = new FxWebViewResourceHost(engine);
|
|
||||||
FxEventHost eventHost = new FxEventHost(dom);
|
FxEventHost eventHost = new FxEventHost(dom);
|
||||||
HostServices services = new HostServices.Default(uiHost, dom, eventHost, resourceHost, console);
|
HostServices services = new HostServices.Default(
|
||||||
|
new FxUiHost(engine, dom),
|
||||||
|
dom,
|
||||||
|
eventHost,
|
||||||
|
new FxWebViewResourceHost(engine),
|
||||||
|
new ConsoleHostImpl(logger),
|
||||||
|
new FxAudioHost(),
|
||||||
|
new FxImageHost(engine, dom),
|
||||||
|
new FxVideoHost(engine, dom),
|
||||||
|
new FxSchedulerHost(),
|
||||||
|
new FxSelectorHost(engine, dom),
|
||||||
|
new FxGeometryHost(engine, dom),
|
||||||
|
new FxCssHost(engine, dom),
|
||||||
|
new FxStorageHost(engine, dom),
|
||||||
|
new FxUtilHost(engine, dom),
|
||||||
|
new FxClipboardHost(),
|
||||||
|
new FxObserverHost(engine, dom)
|
||||||
|
);
|
||||||
|
|
||||||
LuaRuntime rt = new LuaRuntime(globals, services, policy);
|
LuaRuntime rt = new LuaRuntime(globals, services, policy);
|
||||||
eventHost.setRouter(rt.eventRouter());
|
eventHost.setRouter(rt.eventRouter());
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user