2 * ===============================LICENSE_START======================================
\r
4 * ================================================================================
\r
5 * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
\r
6 * ================================================================================
\r
7 * Licensed under the Apache License, Version 2.0 (the "License");
\r
8 * you may not use this file except in compliance with the License.
\r
9 * You may obtain a copy of the License at
\r
11 * http://www.apache.org/licenses/LICENSE-2.0
\r
13 * Unless required by applicable law or agreed to in writing, software
\r
14 * distributed under the License is distributed on an "AS IS" BASIS,
\r
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
\r
16 * See the License for the specific language governing permissions and
\r
17 * limitations under the License.
\r
18 * ============================LICENSE_END===========================================
\r
21 package org.openecomp.dcae.apod.analytics.common.service.processor;
\r
23 import java.io.Serializable;
\r
24 import java.util.List;
\r
28 * A Processor Context is used a an input and output to a {@link MessageProcessor}
\r
30 * DCAE Analytics sub projects should extend this interface and add specific fields
\r
31 * required for input and output
\r
34 * @author Rajiv Singla . Creation Date: 11/7/2016.
\r
36 public interface ProcessorContext extends Serializable {
\r
39 * Returns Processor Context message that will be processed by Chain of Processors
\r
41 * @return message that need to be processed by processors
\r
43 String getMessage();
\r
46 * Processing Context flag which determines if Processing can continue in a processing
\r
49 * @return true if ok to continue processing normally
\r
51 boolean canProcessingContinue();
\r
55 * Sets new value for ProcessingContinue flag which will cause early termination of processing in chain if
\r
58 * @param canProcessingContinue set new value for canProcessing Continue flag
\r
60 void setProcessingContinueFlag(boolean canProcessingContinue);
\r
64 * Provides a List of previous processors which have completed processing
\r
66 * @return list of previous processors
\r
68 List<? super MessageProcessor<? extends ProcessorContext>> getMessageProcessors();
\r