Skip to content

FileAnalysisSuite/adaptersdk-impl-jaxrs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Java Adapter SDK JAX-RS Implementation

This module implements the FAS Adapter REST Contract using Jakarta RESTful Web Services 2.1.

It implements the Java Adapter SDK Framework Interfaces, so that adapters written against the Java Adapter SDK can be hosted on any platform that supports Jakarta EE 8.

Usage

There is only one method exposed - the AdapterSdk::wrap method.

This method takes a custom adapter's implementation of the RepositoryAdapter interface, and it returns a set of objects which should be registered as singletons with the JAX-RS implementation being used for hosting.

DropWizard Example

Here is an example taken from the REST Filesystem Adapter that is hosted in DropWizard:
restadapter-filesystem-dropwizard/.../FileSystemAdapterApplication.java:44-46

for (final Object singleton : AdapterSdk.wrap(new FileSystemAdapter())) {
    jersey.register(singleton);
}

WAR File Example

Here is another example taken from the REST Filesystem Adapter that is packaged as a WAR file:
restadapter-filesystem-war/.../FileSystemAdapterApplication.java:31