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 requestor 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.
19 === REST Requestor Input
21 APEX will connect to a given URL to request an input.
25 "carrierTechnologyParameters": {
26 "carrierTechnology": "RESTREQUESTOR", <1>
27 "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restrequestor.RESTRequestorCarrierTechnologyParameters",
29 "url": "http://localhost:54321/some/path/to/rest/resource", <2>
30 "httpMethod": "POST", <3>
31 "restRequestTimeout": 2000 <4>
36 <1> set REST requestor as carrier technology
37 <2> the URL of the HTTP server for events
38 <3> use HTTP PUT (remove this line to use HTTP POST)
39 <4> request timeout in milliseconds
41 Further settings are required on the consumer to define the event that is requested, for example:
45 "eventName": "GuardResponseEvent", <1>
46 "eventNameFilter": "GuardResponseEvent", <2>
47 "requestorMode": true, <3>
48 "requestorPeer": "GuardRequestorProducer", <4>
49 "requestorTimeout": 500 <5>
53 <2> a filter on the event
54 <3> the mode of the requestor
55 <4> a peer for the requestor
56 <5> a general request timeout
59 === REST Requestor Output
61 APEX will connect to a given URL to send events, but not receive any events.
65 "carrierTechnologyParameters": {
66 "carrierTechnology": "RESTREQUESTOR", <1>
67 "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restrequestor.RESTRequestorCarrierTechnologyParameters"
71 <1> set REST requestor as carrier technology
73 Further settings are required on the consumer to define the event that is requested, for example:
77 "eventNameFilter": "GuardRequestEvent", <1>
78 "requestorMode": true, <2>
79 "requestorPeer": "GuardRequestorConsumer", <3>
80 "requestorTimeout": 500 <4>
83 <1> a filter on the event
84 <2> the mode of the requestor
85 <3> a peer for the requestor
86 <4> a general request timeout