aboutsummaryrefslogtreecommitdiffstats
path: root/tosca-controlloop/participant/participant-intermediary/src/main/java/org/onap/policy/clamp/controlloop/participant/intermediary/api/ParticipantIntermediaryApi.java
diff options
context:
space:
mode:
Diffstat (limited to 'tosca-controlloop/participant/participant-intermediary/src/main/java/org/onap/policy/clamp/controlloop/participant/intermediary/api/ParticipantIntermediaryApi.java')
-rw-r--r--tosca-controlloop/participant/participant-intermediary/src/main/java/org/onap/policy/clamp/controlloop/participant/intermediary/api/ParticipantIntermediaryApi.java32
1 files changed, 21 insertions, 11 deletions
diff --git a/tosca-controlloop/participant/participant-intermediary/src/main/java/org/onap/policy/clamp/controlloop/participant/intermediary/api/ParticipantIntermediaryApi.java b/tosca-controlloop/participant/participant-intermediary/src/main/java/org/onap/policy/clamp/controlloop/participant/intermediary/api/ParticipantIntermediaryApi.java
index 6c3e029fe..7ea8b4f35 100644
--- a/tosca-controlloop/participant/participant-intermediary/src/main/java/org/onap/policy/clamp/controlloop/participant/intermediary/api/ParticipantIntermediaryApi.java
+++ b/tosca-controlloop/participant/participant-intermediary/src/main/java/org/onap/policy/clamp/controlloop/participant/intermediary/api/ParticipantIntermediaryApi.java
@@ -30,6 +30,7 @@ import org.onap.policy.clamp.controlloop.models.controlloop.concepts.ControlLoop
import org.onap.policy.clamp.controlloop.models.controlloop.concepts.Participant;
import org.onap.policy.clamp.controlloop.models.controlloop.concepts.ParticipantState;
import org.onap.policy.clamp.controlloop.models.controlloop.concepts.ParticipantStatistics;
+import org.onap.policy.clamp.controlloop.participant.intermediary.handler.ParticipantHandler;
import org.onap.policy.clamp.controlloop.participant.intermediary.parameters.ParticipantIntermediaryParameters;
import org.onap.policy.models.tosca.authorative.concepts.ToscaConceptIdentifier;
@@ -42,12 +43,12 @@ public interface ParticipantIntermediaryApi {
*
* @param parameters the parameters for the intermediary
*/
- public void init(ParticipantIntermediaryParameters parameters);
+ void init(ParticipantIntermediaryParameters parameters);
/**
* Close the intermediary.
*/
- public void close();
+ void close();
/**
* Get participants loops from the intermediary API.
@@ -56,23 +57,23 @@ public interface ParticipantIntermediaryApi {
* @param version the participant version, null for all
* @return the participants
*/
- public List<Participant> getParticipants(String name, String version);
+ List<Participant> getParticipants(String name, String version);
/**
* Update the state of a participant.
*
* @param definition the definition of the participant to update the state on
* @param state the state of the participant
- * @return updated participant
+ * @return the participant
*/
- public Participant updateParticipantState(ToscaConceptIdentifier definition, ParticipantState state);
+ Participant updateParticipantState(ToscaConceptIdentifier definition, ParticipantState state);
/**
* Update the statistics of a participant.
*
* @param participantStatistics the statistics of the participant
*/
- public void updateParticipantStatistics(ParticipantStatistics participantStatistics);
+ void updateParticipantStatistics(ParticipantStatistics participantStatistics);
/**
* Get control loops from the intermediary API.
@@ -81,7 +82,7 @@ public interface ParticipantIntermediaryApi {
* @param version the control loop element version, null for all
* @return the control loop elements
*/
- public ControlLoops getControlLoops(String name, String version);
+ ControlLoops getControlLoops(String name, String version);
/**
* Get control loop elements from the intermediary API.
@@ -90,7 +91,7 @@ public interface ParticipantIntermediaryApi {
* @param version the control loop element version, null for all
* @return the control loop elements
*/
- public List<ControlLoopElement> getControlLoopElements(String name, String version);
+ List<ControlLoopElement> getControlLoopElements(String name, String version);
/**
* Update the state of a control loop.
@@ -99,7 +100,7 @@ public interface ParticipantIntermediaryApi {
* @param state the state of the control loop
* @return ControlLoop updated control loop
*/
- public ControlLoop updateControlLoopState(ToscaConceptIdentifier definition, ControlLoopOrderedState state);
+ ControlLoop updateControlLoopState(ToscaConceptIdentifier definition, ControlLoopOrderedState state);
/**
* Update the state of a control loop element.
@@ -108,12 +109,21 @@ public interface ParticipantIntermediaryApi {
* @param state the state of the control loop element
* @return ControlLoopElement updated control loop element
*/
- public ControlLoopElement updateControlLoopElementState(UUID id, ControlLoopOrderedState state);
+ ControlLoopElement updateControlLoopElementState(UUID id, ControlLoopOrderedState state);
/**
* Update the control loop element statistics.
*
* @param elementStatistics the updated statistics
*/
- public void updateControlLoopElementStatistics(ClElementStatistics elementStatistics);
+ void updateControlLoopElementStatistics(ClElementStatistics elementStatistics);
+
+ /**
+ * Returns participantHandler, This will not be used in real world, but for junits,
+ * if participantHandler is not returned, there is no way to test state change messages
+ * without dmaap simulator.
+ *
+ * @return ParticipantHandler returns a participantHandler
+ */
+ ParticipantHandler getParticipantHandler();
}