| | |
| | | |
| | | public class CustomDestinationDataProvider implements DestinationDataProvider { |
| | | |
| | | private final Properties properties = new Properties(); |
| | | private final String destName; |
| | | private final Properties properties; |
| | | |
| | | public void addDestination(String destinationName, Properties connectProperties) { |
| | | properties.put(destinationName, connectProperties); |
| | | public CustomDestinationDataProvider(String destName, Properties props) { |
| | | this.destName = destName; |
| | | this.properties = props; |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public boolean supportsEvents() { |
| | |
| | | |
| | | @Override |
| | | public Properties getDestinationProperties(String destinationName) { |
| | | return properties.getProperty(destinationName) != null |
| | | ? (Properties) properties.get(destinationName) |
| | | : null; |
| | | if (destName.equals(destinationName)) { |
| | | return properties; |
| | | } |
| | | return null; |
| | | } |
| | | } |