|
|
## [Home](https://git.opendfki.de/delight/delight/wikis/Home) | [Documentation](https://git.opendfki.de/delight/delight/wikis/Home) | [People / Contact](https://git.opendfki.de/delight/delight/wikis/people) | [Legal & Data Protection](https://config.opendfki.de/imprint)
|
|
|
---
|
|
|
|
|
|
Legacy: [XML-RPC Delight](xmlrpc/Documentation)
|
|
|
# Welcome to the delight JSON over HTTP
|
|
|
|
|
|
**JSON-over-HTTP** is a Delight backend implementation that offers JSON-based RPC calls to **services made out of simple Java objects implementing Java interfaces**.
|
|
|
|
|
|
[Maven dependency](#maven-coordinates)
|
|
|
The interface is used to forge requests from __easy-to-use Java clients__ to the server. Non-java clients profit from
|
|
|
the simple HTTP-request format which is also __browser-friendly__.
|
|
|
|
|
|
[Available Features](#available-features)
|
|
|
|
|
|
[Example Server](ExampleServer), [Example Web Application](ExampleWebApp)
|
|
|
[Maven dependency](#maven-coordinates)
|
|
|
|
|
|
[Additional Features](#available-features)
|
|
|
|
|
|
[Example Standalone Server](ExampleServer), [Example Web Application](ExampleWebApp)
|
|
|
|
|
|
# Welcome to the delight JSON over HTTP
|
|
|
|
|
|
**JSON-over-HTTP** is a Delight backend implementation that offers JSON-based RPC calls to **services made out of simple Java objects implementing Java interfaces**.
|
|
|
|
|
|
The interface is used to forge requests from __easy-to-use Java clients__ to the server. Non-java clients profit from
|
|
|
the simple HTTP-request format which is also __browser-friendly__.
|
|
|
|
|
|
## How it works
|
|
|
|
... | ... | @@ -32,9 +30,13 @@ e.g., with a self-defined bean named `TestPojo` |
|
|
int number;
|
|
|
String string;
|
|
|
}
|
|
|
and an implementation of the service (the so-called `handler`):
|
|
|
|
|
|
Then you can register an implementation (let's call it `ServiceImpl`) of this API with the Delight backend.
|
|
|
The implementation is called a handler.
|
|
|
public class ServiceImpl implements ServiceApi {
|
|
|
String doSometing(TestPojo parameter) { return "whatever" }
|
|
|
}
|
|
|
|
|
|
Then you can register the handler with the Delight backend.
|
|
|
|
|
|
DelightConfig cfg = DelightConfigFinder.getDefaultConfig()
|
|
|
DelightServer server = new DelightServer(cfg)
|
... | ... | @@ -130,8 +132,15 @@ Use this maven coordinate: |
|
|
|
|
|
### Available Features
|
|
|
|
|
|
Plugin additional functionality by adding the components to the classpath:
|
|
|
|
|
|
* [Online Documentation Generator](DocuFeature)
|
|
|
|
|
|
* [Server-Sent Events](ServerSentEventsFeature)
|
|
|
|
|
|
* [Call Statistics](StatsFeature)
|
|
|
|
|
|
### Outdated
|
|
|
|
|
|
Legacy: [XML-RPC Delight](xmlrpc/Documentation)
|
|
|
|