2 * ===============================LICENSE_START======================================
4 * ================================================================================
5 * Copyright © 2017 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
11 * http://www.apache.org/licenses/LICENSE-2.0
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===========================================
21 package org.openecomp.dcae.apod.analytics.common.service.processor;
23 import java.io.Serializable;
24 import java.util.List;
28 * A Processor Context is used a an input and output to a {@link MessageProcessor}
30 * DCAE Analytics sub projects should extend this interface and add specific fields
31 * required for input and output
34 * @author Rajiv Singla . Creation Date: 11/7/2016.
36 public interface ProcessorContext extends Serializable {
39 * Returns Processor Context message that will be processed by Chain of Processors
41 * @return message that need to be processed by processors
46 * Processing Context flag which determines if Processing can continue in a processing
49 * @return true if ok to continue processing normally
51 boolean canProcessingContinue();
55 * Sets new value for ProcessingContinue flag which will cause early termination of processing in chain if
58 * @param canProcessingContinue set new value for canProcessing Continue flag
60 void setProcessingContinueFlag(boolean canProcessingContinue);
64 * Provides a List of previous processors which have completed processing
66 * @return list of previous processors
68 List<? super MessageProcessor<? extends ProcessorContext>> getMessageProcessors();