Page History
...
This exposes the LexEVS Service model via a Remote Method Invocation service.
...
LexEVS Installation and Configuration
The distributed LexEVS API is exposed by the LexEVS caCORE System for remote access as shown in the figure below. The caCORE System's LexEVSApplicationService
class implements the LexBIGService
interface.
The distributed LexEVS API environment will be configured on the LexEVS Server currently at (http://lexevsapi6.nci.nih.gov/lexevsapi64).
LexEVS Annotations
To address LexEVS DAOs, the LexEVS API integration incorporates:
- Java annotation marking methods that can be safely executed on the client side
- classes that can be passed to the client without being wrapped by a proxy. The annotation is named
@lgClientSideSafe
. Every method in the LexEVS API that is accessible to the caCORE LexEVS user had to be considered and annotated if necessary. - Spring Aspect Oriented Programming (AOP) to proxy the LexEVS classes and intercept calls to their methods.
- The LexEVS client wraps every object returned by the LexBIGService inside an AOP Proxy with advice from a LexBIGMethodInterceptor ("the interceptor").
The following graphic shows a sequence diagram showing method interception. The interceptor is responsible for intercepting all client calls on the methods in each object. If a method is marked with the @lgClientSideSafe annotation, it proceeds normally. Otherwise, the object, method name, and parameters are sent to the caCORE LexEVS server for remote execution.
LexEVS Installation and Configuration
The distributed LexEVS API is strictly a Java interface and requires Internet access for remote connectivity to the caCORE LexEVS server.
Client configuration is represented in a client project in github: https://github.com/lexevs/LexEVS_Distributed_Client
The 6.4.0 version of the client features a mavenized project. Instructions for using the client in a maven project are found here
Example: Using the distributed LexEVS API
The following code sample shows how to retrieve all available coding schemes in the LexEVS repository.
strictly a Java interface and requires Internet access for remote connectivity to the caCORE LexEVS server.
Client configuration is represented in a client project in github: https://github.com/lexevs/LexEVS_Distributed_Client
Using the distributed LexEVS API
Example code can be found at the above client project link for a number of use cases.
For versions 6.4.0 and above the distributed java client features a mavenized project.
Step by step instructions for integration into a maven project in an eclipse environment.
This client has a large dependency set. Maven simplifies dependency resolution.
Requires Java 1.7, Maven 3.2.3, Git, and Eclipse Neon or some other maven enabled Eclipse IDE.
This example assumes some familiarity with Eclipse and Maven.
run git clone https://github.com/lexevs/LexEVS_Distributed_Client.git
change working directory to LexEVS_Distributed_Client
Run mvn clean install, if tests fail you may add -DskipTests
Create a new Java Project
Configure as a Maven project
add as dependency to the pom file:
Code Block | ||||
---|---|---|---|---|
| ||||
<dependencies>
<dependency>
<groupId>lexevs.dist.client</groupId>
<artifactId>lexevs.dist.client</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>
</dependencies> |
The following code sample shows how to retrieve all available coding schemes in the LexEVS repository.
Include Page | ||||
---|---|---|---|---|
|
Architecture
The LexEVS API is exposed by the LexEVS caCORE System for remote access as shown in the figure below. The caCORE System's LexEVSApplicationService
class implements the LexBIGService
interface.
The distributed LexEVS API environment will be configured on the LexEVS Server currently at (http://lexevsapi6.nci.nih.gov/lexevsapi64).
LexEVS Annotations
To address LexEVS DAOs, the LexEVS API integration incorporates:
- Java annotation marking methods that can be safely executed on the client side
- classes that can be passed to the client without being wrapped by a proxy. The annotation is named
@lgClientSideSafe
. Every method in the LexEVS API that is accessible to the caCORE LexEVS user had to be considered and annotated if necessary. - Spring Aspect Oriented Programming (AOP) to proxy the LexEVS classes and intercept calls to their methods.
- The LexEVS client wraps every object returned by the LexBIGService inside an AOP Proxy with advice from a LexBIGMethodInterceptor ("the interceptor").
The following graphic shows a sequence diagram showing method interception. The interceptor is responsible for intercepting all client calls on the methods in each object. If a method is marked with the @lgClientSideSafe annotation, it proceeds normally. Otherwise, the object, method name, and parameters are sent to the caCORE LexEVS server for remote execution. Include Page
LexEVSDataService
Warning | ||
---|---|---|
| ||
See the CTS2 API for REST Services |
...