2 * ============LICENSE_START=======================================================
3 * Copyright (C) 2016-2018 Ericsson. All rights reserved.
4 * Modifications Copyright (C) 2019-2020 Nordix Foundation.
5 * ================================================================================
6 * Licensed under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
10 * http://www.apache.org/licenses/LICENSE-2.0
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
18 * SPDX-License-Identifier: Apache-2.0
19 * ============LICENSE_END=========================================================
22 package org.onap.policy.apex.plugins.event.carrier.restclient;
26 import org.onap.policy.apex.service.parameters.carriertechnology.RestPluginCarrierTechnologyParameters;
30 * Apex parameters for REST as an event carrier technology with Apex as a REST client.
32 * <p>The parameters for this plugin are:
34 * <li>url: The URL that the Apex Rest client will connect to over REST for event reception or event sending. This
35 * parameter is mandatory.
36 * <li>httpMethod: The HTTP method to use when sending events over REST, legal values are POST (default) and PUT. When
37 * receiving events, the REST client plugin always uses the HTTP GET method.
38 * <li>httpHeaders, the HTTP headers to send on REST requests, optional parameter, defaults to none.
39 * <li>httpCodeFilter: a regular expression filter for returned HTTP codes, if the returned HTTP code passes this
40 * filter, then the request is assumed to have succeeded by the plugin, optional, defaults to allowing 2xx codes
41 * through, that is a regular expression of "[2][0-9][0-9]"
44 * @author Joss Armstrong (joss.armstrong@ericsson.com)
49 public class RestClientCarrierTechnologyParameters extends RestPluginCarrierTechnologyParameters {
52 * Constructor to create a REST carrier technology parameters instance and register the instance with the parameter
55 public RestClientCarrierTechnologyParameters() {
58 this.setLabel("RESTCLIENT");
59 this.setEventProducerPluginClass(ApexRestClientProducer.class.getName());
60 this.setEventConsumerPluginClass(ApexRestClientConsumer.class.getName());