interface defines a component that is capable of acting as a client to an external server.
This document explains how to implement and deploy a custom client provider.
The client providers of a JDisc application manage all outgoing requests made to remote services.
Upon receiving a
it initiates a corresponding connection to the appropriate remote server.
Once the remote server responds,
the client provider instantiates and dispatches a corresponding
To implement a client provider, either implement the
ClientProvider interface directly, or subclass the more convenient
Please note the following:
ContentChannelis the same as for dispatching a response from a request handler.
To install a client provider in a container, use the client element in services.xml, e.g.:
<container id="default" version="1.0"> <client id="my.package.MyClientProvider" bundle="the name in <artifactId> in your pom.xml"> <binding>http://*/*</binding> </client> <nodes> <node hostalias="node1" /> </nodes> </container>
Notice that the
binding element declared within a
client element implies a client-binding.
To configure a server-binding for a client,
serverBinding element instead.