13.2.2 Element description
13.2.2.1 connectors
This element is used to define the Restlet server and client connectors. From the Restlet docs:
A connector in the REST architecture style is a software element that manages network communication for a component, typically by implementing a network protocol (e.g. HTTP).
Example configuration:
<connectors>
<serverConnector protocols="HTTP" port="8888"/>
<clientConnector protocols="HTTP"/>
<clientConnector protocols="FILE"/>
</connectors>
When deploying your application as a Servlet webapp, the server connectors are ignored.
13.2.2.2 serverConnector
Defines a Restlet server connector. From the Restlet docs:
A server connector listens for connections (from clients of any kind), transmits the request to the component that performs the request processing, creates the response and sends it to the client.
Attributes:
- protocols: a protocol or comma-separated list of protocols. Based on the protocol, a matching connector implementation will be searched. When specifying multiple protocols, an implementation is searched which supports all of the listed protocols. The most common protocol is HTTP.
- address: the (IP) address to which to listen.
- port: the port to which to listen.
Using nested <parameter> elements you can specify implementation-specific configuration options.
The server connector implementation that will be used depends on what Restlet finds on the classpath. Kauri includes Jetty by default, so that is what will be used. More information on the available protocols and parameters for this connector can be found in the Restlet documentation.
For an example configuration, see connectors.
13.2.2.3 clientConnector
Defines a Restlet client connector. From the Restlet docs:
A client connector initiates communication with a server (of any kind) by creating a request.
Attributes:
- protocols: a protocol or comma-separated list of protocols. Based on the protocol, a matching connector implementation will be searched. When specifying multiple protocols, an implementation is searched which supports all of the listed protocols. Common client connectors include HTTP, FILE and CLAP.
In Kauri you can always make use of the
For an example configuration, see connectors.
Previous