diff options
author | wasala <przemyslaw.wasala@nokia.com> | 2018-06-26 19:29:43 +0200 |
---|---|---|
committer | wasala <przemyslaw.wasala@nokia.com> | 2018-08-07 08:32:28 +0200 |
commit | c8c9a242f7a1f8454e2cf94b0442128533569dc5 (patch) | |
tree | 784673c75693f6f77b624e5c83c12e24b73646ec /prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/tasks/Task.java | |
parent | 8b1502fb0f1af5d00ec26e712e57b792fbd16bd8 (diff) |
DmaapConsumerReactive fixed tests
Change-Id: I888ef94a084f32a18c77c12a18fb6636a4f33649
Issue-ID: DCAEGEN2-557
Signed-off-by: wasala <przemyslaw.wasala@nokia.com>
Diffstat (limited to 'prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/tasks/Task.java')
-rw-r--r-- | prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/tasks/Task.java | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/tasks/Task.java b/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/tasks/Task.java new file mode 100644 index 00000000..c26028a7 --- /dev/null +++ b/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/tasks/Task.java @@ -0,0 +1,42 @@ +/* + * ============LICENSE_START======================================================= + * PNF-REGISTRATION-HANDLER + * ================================================================================ + * Copyright (C) 2018 NOKIA Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ +package org.onap.dcaegen2.services.prh.tasks; + +import org.onap.dcaegen2.services.prh.exceptions.PrhTaskException; + +/** + * @author <a href="mailto:przemyslaw.wasala@nokia.com">Przemysław Wąsala</a> on 4/13/18 + */ + + +public abstract class Task<R, S, C> { + + Task taskProcess; + + protected abstract void receiveRequest(R body) throws PrhTaskException; + + protected abstract S execute(R object) throws PrhTaskException; + + protected abstract C resolveConfiguration(); + + void setNext(Task task) { + this.taskProcess = task; + } +} |