Service Interface
Every service interface must also implement a minimum set of methods. These methods are defined in a Java interface called IServiceInterface
.
Through such methods, the service interface will be called to render a presentation or to process a user action.
The LumisXP Server already comes with an implementation of the IServiceInterface
: the class GenericServiceInterface
. It can be extended to customize the functionalities of the service interface, or used directly. If there is no class that implements the interface, the GenericServiceInterface
will be used.
The Java interface IServiceInterface
has two methods for request handling:
-
A method called to render an interface
public void render(IServiceInterfaceRenderRequest request, IServiceInterfaceRenderResponse response)
-
A method called before any render: a routine responsible for executing user requests, potentially altering the state of the system and/or affecting the subsequent render
public void processAction(IServiceInterfaceActionRequest request, IServiceInterfaceActionResponse response)
The example below implements a class ( Message
) that extends the GenericServiceInterface
class from Lumis, so that an interface is rendered (through the render
method) displaying the expression “Hello World”.