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;
27 import org.onap.policy.apex.service.parameters.carriertechnology.RestPluginCarrierTechnologyParameters;
31 * Apex parameters for REST as an event carrier technology with Apex as a REST client.
33 * <p>The parameters for this plugin are:
35 * <li>url: The URL that the Apex Rest client will connect to over REST for event reception or event sending. This
36 * parameter is mandatory.
37 * <li>httpMethod: The HTTP method to use when sending events over REST, legal values are POST (default) and PUT. When
38 * receiving events, the REST client plugin always uses the HTTP GET method.
39 * <li>httpHeaders, the HTTP headers to send on REST requests, optional parameter, defaults to none.
40 * <li>httpCodeFilter: a regular expression filter for returned HTTP codes, if the returned HTTP code passes this
41 * filter, then the request is assumed to have succeeded by the plugin, optional, defaults to allowing 2xx codes
42 * through, that is a regular expression of "[2][0-9][0-9]"
45 * @author Joss Armstrong (joss.armstrong@ericsson.com)
50 public class RestClientCarrierTechnologyParameters extends RestPluginCarrierTechnologyParameters {
53 * Constructor to create a REST carrier technology parameters instance and register the instance with the parameter
56 public RestClientCarrierTechnologyParameters() {
59 this.setLabel("RESTCLIENT");
60 this.setEventProducerPluginClass(ApexRestClientProducer.class.getName());
61 this.setEventConsumerPluginClass(ApexRestClientConsumer.class.getName());