public interface StructuredService
A StructuredService must be registered using the Register
annotation
provided with a name, which also defines the URL of the service.
The generated output can be either JSON or XML, which is completely handled by the framework.
Note: Simple AJAX calls using JSON can also be realized using the controller framework. See Routed.jsonCall()
for further information.
Modifier and Type | Method and Description |
---|---|
void |
call(ServiceCall call,
sirius.kernel.xml.StructuredOutput out)
Handles the incoming call while using out to generate the result.
|
default void |
handleException(ServiceCall call,
sirius.kernel.xml.StructuredOutput out,
sirius.kernel.health.HandledException e)
Handles the exception caused by handling the incoming call.
|
void call(ServiceCall call, sirius.kernel.xml.StructuredOutput out) throws Exception
call
- the HTTP request to processout
- the encoder used to generate the desired outputException
- in case of an error. An appropriate result will be generated in the selected format.default void handleException(ServiceCall call, sirius.kernel.xml.StructuredOutput out, sirius.kernel.health.HandledException e)
call
- the HTTP request to processout
- the encoder used to generate the desired outpute
- HandledException
which caused an error while processing the requestCopyright © 2018. All rights reserved.