Service as a Webpage: Information Handlers in servENT
During the previous examples we have seen that we can invoke services via a custom commandline client or even using a REST-like approach. As the servent is integrated with Jetty, it is possible to extend the our service to implement a Handler (org.dbe.servent.http.ServiceHandler) that extend (or is based) the Jetty Handlers.
To integrate a ServiceHandler in our service, we need to do a couple of things. First of all is to declare in deployment.props that our service has a Handler. This is done by assigning the property “handler” to point to the class that implements the ServiceHandler interface (see below)
File: deployment.props
anapplicationName=HelloWorldServiceExample
smid=HelloWorldServiceExample
adapter=org.dbe.examples.HelloWorldServiceAdapter
handler=org.dbe.examples.HelloWorldServiceHandler





0 Comments:
Post a Comment
<< Home