Changes to PAP infrastructure to support PDP
[policy/pap.git] / main / src / main / java / org / onap / policy / pap / main / parameters / PdpRequestParameters.java
1 /*
2  * ============LICENSE_START=======================================================
3  * ONAP PAP
4  * ================================================================================
5  * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
6  * ================================================================================
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  *      http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  * ============LICENSE_END=========================================================
19  */
20
21 package org.onap.policy.pap.main.parameters;
22
23 import lombok.Getter;
24 import org.onap.policy.common.parameters.ParameterGroupImpl;
25 import org.onap.policy.common.parameters.annotations.Min;
26 import org.onap.policy.common.parameters.annotations.NotBlank;
27 import org.onap.policy.common.parameters.annotations.NotNull;
28
29 /**
30  * Parameters for communicating with PDPs.
31  */
32 @NotNull
33 @NotBlank
34 @Getter
35 public class PdpRequestParameters extends ParameterGroupImpl {
36
37     // NOTE: these fields must not be "private" or the validator will skip them
38
39     /**
40      * Maximum number of times to re-send a request to a PDP.
41      */
42     @Min(value = 0)
43     protected int maxRetryCount;
44
45     /**
46      * Maximum time to wait, in milliseconds, for a PDP response.
47      */
48     @Min(value = 0)
49     protected long maxWaitMs;
50
51
52     /**
53      * Constructs the object.
54      *
55      * @param name name of this set of parameters
56      */
57     public PdpRequestParameters(String name) {
58         super(name);
59     }
60 }