2 * ============LICENSE_START=======================================================
3 * Copyright (C) 2016-2018 Ericsson. All rights reserved.
4 * Modifications Copyright (C) 2019 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.restrequestor;
24 import java.util.Properties;
27 * This class holds a record of a REST request for the REST requestor plugin.
29 * @author Liam Fallon (liam.fallon@ericsson.com)
31 public class ApexRestRequest {
32 private long executionId;
33 private String eventName;
35 private Properties executionProperties;
36 private long timestamp;
39 * Instantiates a new apex rest request.
41 * @param executionId the execution id
42 * @param eventName the event name
43 * @param event the event
45 public ApexRestRequest(final long executionId, final Properties executionProperties,
46 final String eventName, final Object event) {
47 this.executionId = executionId;
48 this.executionProperties = executionProperties;
49 this.eventName = eventName;
54 * Gets the execution id.
56 * @return the execution id
58 public long getExecutionId() {
63 * Gets the event name.
65 * @return the event name
67 public String getEventName() {
76 public Object getEvent() {
81 * Gets the executionProperties.
83 * @return the executionProperties
85 public Properties getExecutionProperties() {
86 return executionProperties;
92 * @return the timestamp
94 public long getTimestamp() {
101 * @param timestamp the new timestamp
103 public void setTimestamp(final long timestamp) {
104 this.timestamp = timestamp;
111 public String toString() {
112 return "ApexRestRequest [executionId=" + executionId + ", eventName=" + eventName + ", event=" + event
113 + ", timestamp=" + timestamp + "]";