2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2017-2018 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.onap.policy.common.endpoints.event.comm.bus;
23 import java.util.List;
24 import java.util.Properties;
27 * Noop Topic Sink Factory
29 public interface NoopTopicSinkFactory {
32 * Creates noop topic sinks based on properties files
34 * @param properties Properties containing initialization values
36 * @return a noop topic sink
37 * @throws IllegalArgumentException if invalid parameters are present
39 public List<NoopTopicSink> build(Properties properties);
44 * @param servers list of servers
45 * @param topic topic name
46 * @param managed is this sink endpoint managed?
47 * @return a noop topic sink
48 * @throws IllegalArgumentException if invalid parameters are present
50 public NoopTopicSink build(List<String> servers, String topic, boolean managed);
53 * Destroys a sink based on the topic
55 * @param topic topic name
56 * @throws IllegalArgumentException if invalid parameters are present
58 public void destroy(String topic);
61 * gets a sink based on topic name
63 * @param topic the topic name
65 * @return a sink with topic name
66 * @throws IllegalArgumentException if an invalid topic is provided
67 * @throws IllegalStateException if the sink is in an incorrect state
69 public NoopTopicSink get(String topic);
72 * Provides a snapshot of the UEB Topic Writers
74 * @return a list of the UEB Topic Writers
76 public List<NoopTopicSink> inventory();
81 public void destroy();