Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 21 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,24 +15,33 @@ You can build the JAR files and the launch4j executable file using the `mvn pack
- JavaSwingExample - Example Java Swing application
- JavaHeadlessExample - Example of a window-less Java application
- AuthenticationExample - Example component that performs authentication from within Java
- MultiWindow - JavaSwingExample - Same as JavaSwingExample but running in multi-window (several windows running under the same
process)
- MultiWindow - AuthenticationExample - Same as AuthenticationExample but running in multi-window (several windows running under the same
process)
- InteropServiceExample - Example of JavaFX FDC3 Desktop Agent client

## Configuring the Java examples
Copy the _java-example.json_ included in the project to _src/components/java-example/java-example.json_. Update the application manifest to include:
``` JSON
"finsemble": {
"applicationRoot": "http://localhost:3375",
"moduleRoot": "http://localhost:3375/finsemble",
"servicesRoot": "http://localhost:3375/finsemble/services",
"notificationURL": "http://localhost:3375/components/notification/notification.html",
"javaExampleJarRoot": "<path to finsemble-java-example target (e.g. C:/Users/andy/Documents/SourceCode/finsemble-java-example/target)>",
...,
"custom": {
"javaExampleJarRoot": "<path_to_the_jar_files_directory>"
},
"importConfig": [
"$applicationRoot/configs/application/config.json",
"$applicationRoot/components/java-example/java-example.json"
],
"IAC": {
"serverAddress" : "ws://127.0.0.1:3376"
}
"../../configs/application/config.json",
"../../configs/application/java-example.json"
]
}
```

**NOTE:** The _java-example.json_ file includes two copies of the JavaFX example: Java Example (local) and Java Example (asset). The "local" component uses `javaExampleRoot` to specify the path to the JAR file on the local system. The "asset" component uses the `appAsset` (described below) to download and run the application.
**NOTE:**
- The _java-example.json_ file includes two copies of the JavaFX example:
- Java Example (local)
- Java Example (asset).

The "local" component uses `javaExampleRoot` to specify the path to the JAR file on the local system. The "asset" component uses the `appAsset` to download and run the application - Please refer to our tutorial
on [integrating native applications](https://documentation.finsemble.com/tutorial-integratingNativeApplications.html) for more details.


88 changes: 88 additions & 0 deletions appd.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
{
"appd": {
"Java FDC3 Desktop Client": {
"appId": "Java FDC3 Desktop Client",
"name": "Java FDC3 Desktop Client",
"description": "Java FDC3 Desktop Agent Client example app, by Cosaic.",
"manifest": {
"window": {
"id": "InteropServiceExampleApplication",
"windowType": "FinsembleNativeWindow",
"path": "$javaExampleJarRoot/InteropServiceExampleApplication.jar",
"arguments": "",
"defaultHeight": 600,
"autoShow": true,
"alwaysOnTop": false,
"resizable": true,
"showTaskbarIcon": false,
"contextMenu": true,
"addToWorkspace": true,
"options": {
"customData": {
"authenticationToken": "fooBar"
}
}
},
"component": {
"mode": "native",
"category": "system"
},
"foreign": {
"services": {
"workspaceService": {
"allowAutoArrange": true
}
},
"components": {
"App Launcher": {
"launchableByUser": true
},
"Window Manager": {
"persistWindowState": false,
"FSBLHeader": true
},
"Toolbar": {
"iconURL": "$applicationRoot/assets/img/notepad.png"
}
}
},
"interop": {
"rewire": [
{
"contextType": "layout",
"fwd": "#Workspace"
},
{
"contextType": "fdc3.instrument",
"cc": "#Workspace"
}
]
}
},
"version": "1.0.0",
"tooltip": "ChartIQ Technical Chart",
"images": [
{
"url": "https://i.imgur.com/10C3LdH.png",
"tooltip": "ChartIQ FDC3 compatible chart"
}
],
"tags": ["fdc3"],
"contactEmail": "info@cosaic.io",
"supportEmail": "support@finsemble.com",
"publisher": "Cosaic",
"icons": [
{
"url": "https://i.imgur.com/mpBdiHd.png"
}
],
"intents": [
{
"name": "ViewChart",
"displayName": "View Chart",
"contexts": ["fdc3.instrument"]
}
]
}
}
}
98 changes: 84 additions & 14 deletions java-example.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@
"Java Example (local)": {
"window": {
"id": "JavaExample",
"windowType": "native",
"windowType": "FinsembleNativeWindow",
"path": "$javaExampleJarRoot/FinsembleJavaFXExample.jar",
"url": "",
"arguments": "",
"defaultHeight": 600,
"autoShow": true,
Expand All @@ -21,7 +20,7 @@
"foreign": {
"services": {
"workspaceService": {
"isArrangable": true
"allowAutoArrange": true
}
},
"components": {
Expand All @@ -41,9 +40,8 @@
"Java Example (asset)": {
"window": {
"id": "JavaExample",
"windowType": "native",
"windowType": "FinsembleNativeWindow",
"alias": "finsembleJavaExample",
"url": "",
"arguments": "",
"defaultHeight": 600,
"autoShow": true,
Expand All @@ -59,7 +57,7 @@
"foreign": {
"services": {
"workspaceService": {
"isArrangable": true
"allowAutoArrange": true
}
},
"components": {
Expand All @@ -79,9 +77,8 @@
"Java Swing Example": {
"window": {
"id": "JavaExample",
"windowType": "native",
"windowType": "FinsembleNativeWindow",
"path": "$javaExampleJarRoot/JavaSwingExample.jar",
"url": "",
"arguments": "",
"defaultHeight": 600,
"autoShow": true,
Expand All @@ -97,7 +94,7 @@
"foreign": {
"services": {
"workspaceService": {
"isArrangable": true
"allowAutoArrange": true
}
},
"components": {
Expand All @@ -116,7 +113,7 @@
},
"Java Authentication Example": {
"window": {
"windowType": "native",
"windowType": "FinsembleNativeWindow",
"path": "$javaExampleJarRoot/FinsembleJavaAuthenticationExample.jar",
"top": "center",
"left": "center",
Expand All @@ -138,7 +135,7 @@
"foreign": {
"services": {
"workspaceService": {
"isArrangable": false
"allowAutoArrange": false
}
},
"components": {
Expand All @@ -155,9 +152,8 @@
"Java Headless Example": {
"window": {
"id": "JavaExample",
"windowType": "native",
"windowType": "FinsembleNativeWindow",
"path": "$javaExampleJarRoot/FinsembleJavaHeadlessExample.jar",
"url": "",
"arguments": "",
"defaultHeight": 600,
"autoShow": true,
Expand All @@ -173,7 +169,7 @@
"foreign": {
"services": {
"workspaceService": {
"isArrangable": true
"allowAutoArrange": true
}
},
"components": {
Expand All @@ -189,6 +185,80 @@
}
}
}
},
"MultiWindow - JavaSwingExample": {
"window": {
"id": "MultiWindowJavaSwingExample",
"windowType": "FinsembleNativeWindow",
"path": "$javaExampleJarRoot/MultiWindowJavaSwingExample.jar",
"arguments": "example=JavaSwingExample",
"defaultHeight": 600,
"autoShow": true,
"alwaysOnTop": false,
"resizable": true,
"showTaskbarIcon": false,
"contextMenu": true,
"addToWorkspace": true
},
"component": {
"spawnOnStartup": false
},
"foreign": {
"services": {
"workspaceService": {
"allowAutoArrange": true
}
},
"components": {
"App Launcher": {
"launchableByUser": true
},
"Window Manager": {
"persistWindowState": false,
"FSBLHeader": true
},
"Toolbar": {
"iconURL": "$applicationRoot/assets/img/notepad.png"
}
}
}
},
"MultiWindow - AuthenticationExample": {
"window": {
"id": "MultiWindowJavaSwingExample",
"windowType": "FinsembleNativeWindow",
"path": "$javaExampleJarRoot/MultiWindowJavaSwingExample.jar",
"arguments": "example=AuthenticationExample",
"defaultHeight": 600,
"autoShow": true,
"alwaysOnTop": false,
"resizable": true,
"showTaskbarIcon": false,
"contextMenu": true,
"addToWorkspace": true
},
"component": {
"spawnOnStartup": false
},
"foreign": {
"services": {
"workspaceService": {
"allowAutoArrange": true
}
},
"components": {
"App Launcher": {
"launchableByUser": true
},
"Window Manager": {
"persistWindowState": false,
"FSBLHeader": true
},
"Toolbar": {
"iconURL": "$applicationRoot/assets/img/notepad.png"
}
}
}
}
}
}
8 changes: 4 additions & 4 deletions logging.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ handlers=java.util.logging.FileHandler, java.util.logging.ConsoleHandler

java.util.logging.ConsoleHandler.level=INFO
java.util.logging.ConsoleHandler.formatter=java.util.logging.SimpleFormatter

java.util.logging.FileHandler.level=INFO
java.util.logging.FileHandler.pattern=%t/FinsembleJavaTest.log
java.util.logging.FileHandler.formatter=java.util.logging.SimpleFormatter

# Write 10MB before rotating this file
java.util.logging.FileHandler.limit=10000000

# Number of rotating files to be used
java.util.logging.FileHandler.count=4

.level=ALL
Loading