This is an automated email from the ASF dual-hosted git repository. isjarana pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/airavata-data-lake.git
commit a4252a953390b731f9e67699599635a900da8ed4 Author: Isuru Ranawaka <[email protected]> AuthorDate: Thu May 13 23:01:05 2021 -0400 data orchestrator clients, file listener --- .../data-orchestrator-clients-core/pom.xml | 32 ++++ .../dataorchestrator/clients/core/Utils.java | 4 + .../clients/core/listener/AbstractListener.java | 38 +++++ .../clients/core/model/NotificationEvent.java | 72 +++++++++ .../clients/core/processor/EventProcessor.java | 25 +++ .../core/publisher/ClientEventsPublisher.java | 23 +++ .../clients/core/publisher/PublisherCallback.java | 16 ++ .../data-orchestrator-file-event-listener/pom.xml | 71 ++++++++ .../file/client/FileClientInitializer.java | 32 ++++ .../file/client/adaptor/FileAdaptor.java | 27 ++++ .../file/client/model/FileEvent.java | 24 +++ .../file/client/watcher/FileWatcher.java | 178 +++++++++++++++++++++ .../src/main/resources/logback.xml | 45 ++++++ .../data-orchestrator-clients/pom.xml | 24 +++ .../data-orchestrator-messaging/pom.xml | 18 +++ .../messaging/MessagingEvents.java | 9 ++ .../messaging/model/NotificationMessage.java | 4 + 17 files changed, 642 insertions(+) diff --git a/data-orchestrator/data-orchestrator-clients/data-orchestrator-clients-core/pom.xml b/data-orchestrator/data-orchestrator-clients/data-orchestrator-clients-core/pom.xml new file mode 100644 index 0000000..6178750 --- /dev/null +++ b/data-orchestrator/data-orchestrator-clients/data-orchestrator-clients-core/pom.xml @@ -0,0 +1,32 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project xmlns="http://maven.apache.org/POM/4.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <parent> + <artifactId>data-orchestrator-clients</artifactId> + <groupId>org.apache.airavata.data.lake</groupId> + <version>0.01-SNAPSHOT</version> + </parent> + <modelVersion>4.0.0</modelVersion> + + <artifactId>data-orchestrator-clients-core</artifactId> + + <properties> + <maven.compiler.source>11</maven.compiler.source> + <maven.compiler.target>11</maven.compiler.target> + </properties> + + <dependencies> + <dependency> + <groupId>org.apache.airavata.data.lake</groupId> + <artifactId>data-orchestrator-messaging</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>org.apache.kafka</groupId> + <artifactId>kafka-clients</artifactId> + <version>${kafka-clients.version}</version> + </dependency> + </dependencies> + +</project> \ No newline at end of file diff --git a/data-orchestrator/data-orchestrator-clients/data-orchestrator-clients-core/src/main/java/org/apache/airavata/dataorchestrator/clients/core/Utils.java b/data-orchestrator/data-orchestrator-clients/data-orchestrator-clients-core/src/main/java/org/apache/airavata/dataorchestrator/clients/core/Utils.java new file mode 100644 index 0000000..42cacf2 --- /dev/null +++ b/data-orchestrator/data-orchestrator-clients/data-orchestrator-clients-core/src/main/java/org/apache/airavata/dataorchestrator/clients/core/Utils.java @@ -0,0 +1,4 @@ +package org.apache.airavata.dataorchestrator.clients.core; + +public class Utils { +} diff --git a/data-orchestrator/data-orchestrator-clients/data-orchestrator-clients-core/src/main/java/org/apache/airavata/dataorchestrator/clients/core/listener/AbstractListener.java b/data-orchestrator/data-orchestrator-clients/data-orchestrator-clients-core/src/main/java/org/apache/airavata/dataorchestrator/clients/core/listener/AbstractListener.java new file mode 100644 index 0000000..b226b5b --- /dev/null +++ b/data-orchestrator/data-orchestrator-clients/data-orchestrator-clients-core/src/main/java/org/apache/airavata/dataorchestrator/clients/core/listener/AbstractListener.java @@ -0,0 +1,38 @@ +package org.apache.airavata.dataorchestrator.clients.core.listener; + +import org.apache.airavata.dataorchestrator.clients.core.model.NotificationEvent; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.util.EventListener; + +/** + * Abstract class for data orchestrator clients event listeners. + */ +public abstract class AbstractListener implements EventListener { + + private static final Logger LOGGER = LoggerFactory.getLogger(AbstractListener.class); + + + public void onRegistered(NotificationEvent event) { + LOGGER.info("Calling register method "); + + } + + public void onCreated(NotificationEvent event) { + LOGGER.info("Calling onCreated method "); + + } + + public void onModified(NotificationEvent event) { + LOGGER.info("Calling onModified method "); + + } + + public void onDeleted(NotificationEvent event) { + LOGGER.info("Calling onDeleted method "); + + } + + +} diff --git a/data-orchestrator/data-orchestrator-clients/data-orchestrator-clients-core/src/main/java/org/apache/airavata/dataorchestrator/clients/core/model/NotificationEvent.java b/data-orchestrator/data-orchestrator-clients/data-orchestrator-clients-core/src/main/java/org/apache/airavata/dataorchestrator/clients/core/model/NotificationEvent.java new file mode 100644 index 0000000..4808431 --- /dev/null +++ b/data-orchestrator/data-orchestrator-clients/data-orchestrator-clients-core/src/main/java/org/apache/airavata/dataorchestrator/clients/core/model/NotificationEvent.java @@ -0,0 +1,72 @@ +package org.apache.airavata.dataorchestrator.clients.core.model; + +import java.util.EventObject; + +public abstract class NotificationEvent extends EventObject { + + private String host; + private String port; + private String protocol; + private String resourcePath; + private String resourceName; + private String resourceType; + + + /** + * Constructs a prototypical Event. + * + * @param source the object on which the Event initially occurred + * @throws IllegalArgumentException if source is null + */ + public NotificationEvent(Object source) { + super(source); + } + + public String getHost() { + return host; + } + + public void setHost(String host) { + this.host = host; + } + + public String getPort() { + return port; + } + + public void setPort(String port) { + this.port = port; + } + + public String getProtocol() { + return protocol; + } + + public void setProtocol(String protocol) { + this.protocol = protocol; + } + + public String getResourcePath() { + return resourcePath; + } + + public void setResourcePath(String resourcePath) { + this.resourcePath = resourcePath; + } + + public String getResourceName() { + return resourceName; + } + + public void setResourceName(String resourceName) { + this.resourceName = resourceName; + } + + public String getResourceType() { + return resourceType; + } + + public void setResourceType(String resourceType) { + this.resourceType = resourceType; + } +} diff --git a/data-orchestrator/data-orchestrator-clients/data-orchestrator-clients-core/src/main/java/org/apache/airavata/dataorchestrator/clients/core/processor/EventProcessor.java b/data-orchestrator/data-orchestrator-clients/data-orchestrator-clients-core/src/main/java/org/apache/airavata/dataorchestrator/clients/core/processor/EventProcessor.java new file mode 100644 index 0000000..abd6747 --- /dev/null +++ b/data-orchestrator/data-orchestrator-clients/data-orchestrator-clients-core/src/main/java/org/apache/airavata/dataorchestrator/clients/core/processor/EventProcessor.java @@ -0,0 +1,25 @@ +package org.apache.airavata.dataorchestrator.clients.core.processor; + +import org.apache.airavata.dataorchestrator.clients.core.model.NotificationEvent; +import org.apache.airavata.dataorchestrator.messaging.MessagingEvents; + +/** + * A class responsible for process incoming notification events, callbacks from kafka producer, message replays + */ +public class EventProcessor { + + public static EventProcessor eventProcessor = new EventProcessor(); + + private EventProcessor() { + } + + public void publish(NotificationEvent notificationEvent, MessagingEvents event){ + + } + + + public static EventProcessor getEventProcessor() { + return eventProcessor; + } + +} diff --git a/data-orchestrator/data-orchestrator-clients/data-orchestrator-clients-core/src/main/java/org/apache/airavata/dataorchestrator/clients/core/publisher/ClientEventsPublisher.java b/data-orchestrator/data-orchestrator-clients/data-orchestrator-clients-core/src/main/java/org/apache/airavata/dataorchestrator/clients/core/publisher/ClientEventsPublisher.java new file mode 100644 index 0000000..28ab00e --- /dev/null +++ b/data-orchestrator/data-orchestrator-clients/data-orchestrator-clients-core/src/main/java/org/apache/airavata/dataorchestrator/clients/core/publisher/ClientEventsPublisher.java @@ -0,0 +1,23 @@ +package org.apache.airavata.dataorchestrator.clients.core.publisher; + +import org.apache.airavata.dataorchestrator.messaging.model.NotificationMessage; + +/** + * Publish events to kafka queue that is listened by Kafka receiver + */ +public class ClientEventsPublisher { + + private static ClientEventsPublisher clientEventsPublisher = new ClientEventsPublisher(); + + private ClientEventsPublisher() { + + } + + public void publish(NotificationMessage notificationMessage, PublisherCallback callback) { + + } + + public static ClientEventsPublisher getClientEventsPublisher() { + return clientEventsPublisher; + } +} diff --git a/data-orchestrator/data-orchestrator-clients/data-orchestrator-clients-core/src/main/java/org/apache/airavata/dataorchestrator/clients/core/publisher/PublisherCallback.java b/data-orchestrator/data-orchestrator-clients/data-orchestrator-clients-core/src/main/java/org/apache/airavata/dataorchestrator/clients/core/publisher/PublisherCallback.java new file mode 100644 index 0000000..1113c66 --- /dev/null +++ b/data-orchestrator/data-orchestrator-clients/data-orchestrator-clients-core/src/main/java/org/apache/airavata/dataorchestrator/clients/core/publisher/PublisherCallback.java @@ -0,0 +1,16 @@ +package org.apache.airavata.dataorchestrator.clients.core.publisher; + +import org.apache.kafka.clients.producer.RecordMetadata; + +@FunctionalInterface +public interface PublisherCallback { + + /** + * Handle response from Kafka producer + * @param recordMetadata + * @param exception + */ + public void handleResponse(RecordMetadata recordMetadata, Exception exception); + + +} diff --git a/data-orchestrator/data-orchestrator-clients/data-orchestrator-file-event-listener/pom.xml b/data-orchestrator/data-orchestrator-clients/data-orchestrator-file-event-listener/pom.xml new file mode 100644 index 0000000..2a613c7 --- /dev/null +++ b/data-orchestrator/data-orchestrator-clients/data-orchestrator-file-event-listener/pom.xml @@ -0,0 +1,71 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project xmlns="http://maven.apache.org/POM/4.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <parent> + <artifactId>data-orchestrator-clients</artifactId> + <groupId>org.apache.airavata.data.lake</groupId> + <version>0.01-SNAPSHOT</version> + </parent> + <modelVersion>4.0.0</modelVersion> + + <artifactId>data-orchestrator-file-event-listener</artifactId> + + <properties> + <maven.compiler.source>11</maven.compiler.source> + <maven.compiler.target>11</maven.compiler.target> + </properties> + + <dependencies> + <dependency> + <groupId>io.github.lognet</groupId> + <artifactId>grpc-spring-boot-starter</artifactId> + <version>${grpc.spring.boot}</version> + <exclusions> + <exclusion> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-starter</artifactId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-starter</artifactId> + <version>${spring.boot.data.jpa}</version> + </dependency> + <dependency> + <groupId>org.apache.airavata.data.lake</groupId> + <artifactId>data-orchestrator-clients-core</artifactId> + <version>${project.version}</version> + </dependency> + </dependencies> + + <build> + <plugins> + <plugin> + <artifactId>maven-assembly-plugin</artifactId> + <executions> + <execution> + <phase>package</phase> + <goals> + <goal>single</goal> + </goals> + </execution> + </executions> + <configuration> + <archive> + <manifest> + <addClasspath>true</addClasspath> + <mainClass>org.apache.airavata.dataorchestrator.file.client.FileClientInitializer</mainClass> + </manifest> + </archive> + <descriptorRefs> + <descriptorRef>jar-with-dependencies</descriptorRef> + </descriptorRefs> + </configuration> + </plugin> + </plugins> + </build> + + +</project> \ No newline at end of file diff --git a/data-orchestrator/data-orchestrator-clients/data-orchestrator-file-event-listener/src/main/java/org/apache/airavata/dataorchestrator/file/client/FileClientInitializer.java b/data-orchestrator/data-orchestrator-clients/data-orchestrator-file-event-listener/src/main/java/org/apache/airavata/dataorchestrator/file/client/FileClientInitializer.java new file mode 100644 index 0000000..6b10964 --- /dev/null +++ b/data-orchestrator/data-orchestrator-clients/data-orchestrator-file-event-listener/src/main/java/org/apache/airavata/dataorchestrator/file/client/FileClientInitializer.java @@ -0,0 +1,32 @@ +package org.apache.airavata.dataorchestrator.file.client; + +import org.apache.airavata.dataorchestrator.file.client.adaptor.FileAdaptor; +import org.apache.airavata.dataorchestrator.file.client.watcher.FileWatcher; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.boot.CommandLineRunner; +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; + +import java.io.File; + +@SpringBootApplication +public class FileClientInitializer implements CommandLineRunner { + + private static final Logger LOGGER = LoggerFactory.getLogger(FileClientInitializer.class); + + public static void main(String[] args) { + SpringApplication.run(FileClientInitializer.class, args); + } + + + @Override + public void run(String... args) throws Exception { + LOGGER.info("Initializing File watcher service ..."); + LOGGER.info("Listening to file path " + args[0]); + String path = args[0]; + File folder = new File(path); + FileWatcher watcher = new FileWatcher(folder); + watcher.addListener(new FileAdaptor()).watch(); + } +} diff --git a/data-orchestrator/data-orchestrator-clients/data-orchestrator-file-event-listener/src/main/java/org/apache/airavata/dataorchestrator/file/client/adaptor/FileAdaptor.java b/data-orchestrator/data-orchestrator-clients/data-orchestrator-file-event-listener/src/main/java/org/apache/airavata/dataorchestrator/file/client/adaptor/FileAdaptor.java new file mode 100644 index 0000000..4b27a29 --- /dev/null +++ b/data-orchestrator/data-orchestrator-clients/data-orchestrator-file-event-listener/src/main/java/org/apache/airavata/dataorchestrator/file/client/adaptor/FileAdaptor.java @@ -0,0 +1,27 @@ +package org.apache.airavata.dataorchestrator.file.client.adaptor; + +import org.apache.airavata.dataorchestrator.clients.core.listener.AbstractListener; +import org.apache.airavata.dataorchestrator.clients.core.model.NotificationEvent; + +public class FileAdaptor extends AbstractListener { + + @Override + public void onRegistered(NotificationEvent event) { + super.onRegistered(event); + } + + @Override + public void onCreated(NotificationEvent event) { + super.onCreated(event); + } + + @Override + public void onModified(NotificationEvent event) { + super.onModified(event); + } + + @Override + public void onDeleted(NotificationEvent event) { + super.onDeleted(event); + } +} diff --git a/data-orchestrator/data-orchestrator-clients/data-orchestrator-file-event-listener/src/main/java/org/apache/airavata/dataorchestrator/file/client/model/FileEvent.java b/data-orchestrator/data-orchestrator-clients/data-orchestrator-file-event-listener/src/main/java/org/apache/airavata/dataorchestrator/file/client/model/FileEvent.java new file mode 100644 index 0000000..b03f92d --- /dev/null +++ b/data-orchestrator/data-orchestrator-clients/data-orchestrator-file-event-listener/src/main/java/org/apache/airavata/dataorchestrator/file/client/model/FileEvent.java @@ -0,0 +1,24 @@ +package org.apache.airavata.dataorchestrator.file.client.model; + +import org.apache.airavata.dataorchestrator.clients.core.model.NotificationEvent; + +import java.io.File; + +/** + * A class representing a file + */ +public class FileEvent extends NotificationEvent { + /** + * Constructs a prototypical Event. + * + * @param source the object on which the Event initially occurred + * @throws IllegalArgumentException if source is null + */ + public FileEvent(File file) { + super(file); + } + + public File getFile() { + return (File) getSource(); + } +} diff --git a/data-orchestrator/data-orchestrator-clients/data-orchestrator-file-event-listener/src/main/java/org/apache/airavata/dataorchestrator/file/client/watcher/FileWatcher.java b/data-orchestrator/data-orchestrator-clients/data-orchestrator-file-event-listener/src/main/java/org/apache/airavata/dataorchestrator/file/client/watcher/FileWatcher.java new file mode 100644 index 0000000..8b2e09f --- /dev/null +++ b/data-orchestrator/data-orchestrator-clients/data-orchestrator-file-event-listener/src/main/java/org/apache/airavata/dataorchestrator/file/client/watcher/FileWatcher.java @@ -0,0 +1,178 @@ +package org.apache.airavata.dataorchestrator.file.client.watcher; + +import org.apache.airavata.dataorchestrator.clients.core.listener.AbstractListener; +import org.apache.airavata.dataorchestrator.file.client.model.FileEvent; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.io.File; +import java.io.IOException; +import java.nio.file.*; +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; + +import static java.nio.file.StandardWatchEventKinds.*; + +/** + * Watch for given folder path and notify changes + */ +public class FileWatcher implements Runnable { + private static final Logger LOGGER = LoggerFactory.getLogger(FileWatcher.class); + protected List<AbstractListener> listeners = new ArrayList<>(); + + protected final File folder; + + protected static final List<WatchService> watchServices = new ArrayList<>(); + + + public FileWatcher(File folder) { + + this.folder = folder; + + } + + public void watch() { + + if (folder.exists()) { + LOGGER.info("Starting watcher thread ..."); + for (AbstractListener listener : listeners) { + listener.onRegistered(new FileEvent(folder)); + } + + Thread thread = new Thread(this); + +// thread.setDaemon(true); + + thread.start(); + + } + } + + @Override + + public void run() { + + LOGGER.info("FileWatcher started at " + folder.getAbsolutePath()); + try (WatchService watchService = FileSystems.getDefault().newWatchService()) { + + Path path = Paths.get(folder.getAbsolutePath()); + + path.register(watchService, ENTRY_CREATE, ENTRY_MODIFY, ENTRY_DELETE); + + watchServices.add(watchService); + + boolean poll = true; + while (poll) { + + poll = pollEvents(watchService); + + } + + } catch (IOException | InterruptedException | ClosedWatchServiceException e) { + LOGGER.error("Error occurred while watching folders ", e); + Thread.currentThread().interrupt(); + + } + + } + + + protected boolean pollEvents(WatchService watchService) throws InterruptedException { + + WatchKey key = watchService.take(); + + Path path = (Path) key.watchable(); + + for (WatchEvent<?> event : key.pollEvents()) { + + notifyListeners(event.kind(), path.resolve((Path) event.context()).toFile()); + + } + + return key.reset(); + + } + + + protected void notifyListeners(WatchEvent.Kind<?> kind, File file) { + + FileEvent event = new FileEvent(file); + + if (kind == ENTRY_CREATE) { + + for (AbstractListener listener : listeners) { + + listener.onCreated(event); + + } + + if (file.isDirectory()) { + + new FileWatcher(file).setListeners(listeners).watch(); + + } + + } else if (kind == ENTRY_MODIFY) { + + for (AbstractListener listener : listeners) { + + listener.onModified(event); + + } + + } else if (kind == ENTRY_DELETE) { + + for (AbstractListener listener : listeners) { + + listener.onDeleted(event); + + } + + } + + } + + + public FileWatcher addListener(AbstractListener listener) { + + listeners.add(listener); + + return this; + + } + + + public FileWatcher removeListener(AbstractListener listener) { + + listeners.remove(listener); + + return this; + + } + + + public List<AbstractListener> getListeners() { + + return listeners; + + } + + + public FileWatcher setListeners(List<AbstractListener> listeners) { + + this.listeners = listeners; + + return this; + + } + + + public static List<WatchService> getWatchServices() { + + return Collections.unmodifiableList(watchServices); + + } + + +} diff --git a/data-orchestrator/data-orchestrator-clients/data-orchestrator-file-event-listener/src/main/resources/logback.xml b/data-orchestrator/data-orchestrator-clients/data-orchestrator-file-event-listener/src/main/resources/logback.xml new file mode 100644 index 0000000..05f7681 --- /dev/null +++ b/data-orchestrator/data-orchestrator-clients/data-orchestrator-file-event-listener/src/main/resources/logback.xml @@ -0,0 +1,45 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you 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. +--> +<configuration> + + <appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender"> + <encoder> + <pattern>%d [%t] %-5p %c{30} %m [%X]%n</pattern> + </encoder> + </appender> + + <appender name="LOGFILE" class="ch.qos.logback.core.rolling.RollingFileAppender"> + <File>../logs/airavata.log</File> + <Append>true</Append> + <encoder> + <pattern>%d [%t] %-5p %c{30} %m [%X]%n</pattern> + </encoder> + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> + <fileNamePattern>logs/filewatcher.log.%d{yyyy-MM-dd}</fileNamePattern> + <maxHistory>30</maxHistory> + <totalSizeCap>1GB</totalSizeCap> + </rollingPolicy> + </appender> + + <logger name="ch.qos.logback" level="WARN"/> + <logger name="org.apache.airavata" level="INFO"/> + <root level="INFO"> + <appender-ref ref="CONSOLE"/> + <appender-ref ref="LOGFILE"/> + </root> +</configuration> \ No newline at end of file diff --git a/data-orchestrator/data-orchestrator-clients/pom.xml b/data-orchestrator/data-orchestrator-clients/pom.xml new file mode 100644 index 0000000..b33a879 --- /dev/null +++ b/data-orchestrator/data-orchestrator-clients/pom.xml @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project xmlns="http://maven.apache.org/POM/4.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <parent> + <artifactId>data-orchestrator</artifactId> + <groupId>org.apache.airavata.data.lake</groupId> + <version>0.01-SNAPSHOT</version> + </parent> + <artifactId>data-orchestrator-clients</artifactId> + <packaging>pom</packaging> + <modules> + <module>data-orchestrator-clients-core</module> + <module>data-orchestrator-file-event-listener</module> + </modules> + <modelVersion>4.0.0</modelVersion> + + + <properties> + <maven.compiler.source>11</maven.compiler.source> + <maven.compiler.target>11</maven.compiler.target> + </properties> + +</project> \ No newline at end of file diff --git a/data-orchestrator/data-orchestrator-messaging/pom.xml b/data-orchestrator/data-orchestrator-messaging/pom.xml new file mode 100644 index 0000000..d86d1b2 --- /dev/null +++ b/data-orchestrator/data-orchestrator-messaging/pom.xml @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project xmlns="http://maven.apache.org/POM/4.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <parent> + <artifactId>data-orchestrator</artifactId> + <groupId>org.apache.airavata.data.lake</groupId> + <version>0.01-SNAPSHOT</version> + </parent> + <artifactId>data-orchestrator-messaging</artifactId> + <modelVersion>4.0.0</modelVersion> + + <properties> + <maven.compiler.source>11</maven.compiler.source> + <maven.compiler.target>11</maven.compiler.target> + </properties> + +</project> \ No newline at end of file diff --git a/data-orchestrator/data-orchestrator-messaging/src/main/java/org/apache/airavata/dataorchestrator/messaging/MessagingEvents.java b/data-orchestrator/data-orchestrator-messaging/src/main/java/org/apache/airavata/dataorchestrator/messaging/MessagingEvents.java new file mode 100644 index 0000000..5f7d226 --- /dev/null +++ b/data-orchestrator/data-orchestrator-messaging/src/main/java/org/apache/airavata/dataorchestrator/messaging/MessagingEvents.java @@ -0,0 +1,9 @@ +package org.apache.airavata.dataorchestrator.messaging; + +public enum MessagingEvents { + + REGISTER, + CREATE, + MODIFIED, + DELETE +} diff --git a/data-orchestrator/data-orchestrator-messaging/src/main/java/org/apache/airavata/dataorchestrator/messaging/model/NotificationMessage.java b/data-orchestrator/data-orchestrator-messaging/src/main/java/org/apache/airavata/dataorchestrator/messaging/model/NotificationMessage.java new file mode 100644 index 0000000..6aeac4d --- /dev/null +++ b/data-orchestrator/data-orchestrator-messaging/src/main/java/org/apache/airavata/dataorchestrator/messaging/model/NotificationMessage.java @@ -0,0 +1,4 @@ +package org.apache.airavata.dataorchestrator.messaging.model; + +public class NotificationMessage { +}
