Skip to content
This repository has been archived by the owner on Nov 11, 2024. It is now read-only.

Commit

Permalink
Merge branch 'main' into setupeco-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
eamansour authored May 30, 2024
2 parents 432ece9 + c9c0335 commit b3d45f3
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,18 @@
*/
package dev.galasa.framework.internal.events;

import dev.galasa.framework.spi.events.IEvent;
import dev.galasa.framework.spi.IEventsService;

public class FrameworkEventsService implements IEventsService {

// The implementation of an Events Service would be in here, but there is no implementation for local runs...
// The Events Service has no implementation for local runs...


@Override
public void produceEvent(String topic, IEvent event) {
}

@Override
public void shutdown(){
// Nothing to shut down
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package dev.galasa.framework.spi;

import dev.galasa.framework.spi.events.IEvent;

public interface IEventProducer {

void sendEvent(IEvent event);

void close();

}
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,12 @@
*/
package dev.galasa.framework.spi;

import dev.galasa.framework.spi.events.IEvent;

public interface IEventsService {

void produceEvent(String topic, IEvent event) throws EventsException;

void shutdown();

}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/*
* Copyright contributors to the Galasa project
*
* SPDX-License-Identifier: EPL-2.0
*/
package dev.galasa.framework.spi.events;

public interface IEvent {

String getId();

void setId(String id);

String getTimestamp();

void setTimestamp(String timestamp);

String getMessage();

void setMessage(String message);

}
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,15 @@
package dev.galasa.framework.mocks;

import dev.galasa.framework.spi.IEventsService;
import dev.galasa.framework.spi.events.IEvent;

public class MockEventsService implements IEventsService {

@Override
public void produceEvent(String topic, IEvent event) {
throw new UnsupportedOperationException("Unimplemented method 'produceEvent'");
}

@Override
public void shutdown() {
throw new UnsupportedOperationException("Unimplemented method 'shutdown'");
Expand Down

0 comments on commit b3d45f3

Please sign in to comment.