2 // ============LICENSE_START=======================================================
3 // Copyright (C) 2016-2018 Ericsson. All rights reserved.
4 // ================================================================================
5 // This file is licensed under the CREATIVE COMMONS ATTRIBUTION 4.0 INTERNATIONAL LICENSE
6 // Full license text at https://creativecommons.org/licenses/by/4.0/legalcode
8 // SPDX-License-Identifier: CC-BY-4.0
9 // ============LICENSE_END=========================================================
11 // @author Sven van der Meer (sven.van.der.meer@ericsson.com)
16 APEX can act as REST client on the input as well as on the output interface.
17 The media type is `application/json`, so this plugin does only work with the JSON Event protocol.
21 APEX will connect to a given URL to receive events, but not send any events.
22 The server is polled, i.e. APEX will do an HTTP GET, take the result, and then do the next GET.
23 Any required timing needs to be handled by the server configured via the URL.
24 For instance, the server could support a wait timeout via the URL as `?timeout=100ms`.
28 "carrierTechnologyParameters" : {
29 "carrierTechnology" : "RESTCLIENT", <1>
30 "parameterClassName" :
31 "org.onap.policy.apex.plugins.event.carrier.restclient.RESTClientCarrierTechnologyParameters",
33 "url" : "http://example.org:8080/triggers/events", <2>
38 <1> set REST client as carrier technology
39 <2> the URL of the HTTP server for events
42 === REST Client Output
44 APEX will connect to a given URL to send events, but not receive any events.
45 The default HTTP operation is POST (no configuration required).
46 To change it to PUT simply add the configuration parameter (as shown in the example below).
50 "carrierTechnologyParameters" : {
51 "carrierTechnology" : "RESTCLIENT", <1>
52 "parameterClassName" :
53 "org.onap.policy.apex.plugins.event.carrier.restclient.RESTClientCarrierTechnologyParameters",
55 "url" : "http://example.com:8888/actions/events", <2>
56 "httpMethod" : "PUT" <3>
61 <1> set REST client as carrier technology
62 <2> the URL of the HTTP server for events
63 <3> use HTTP PUT (remove this line to use HTTP POST)