Skip to content

Commit

Permalink
Migrated to camel undertow component for websockets (openremote#1082)
Browse files Browse the repository at this point in the history
  • Loading branch information
richturner authored Jun 29, 2023
1 parent bd69894 commit c9b5ef3
Show file tree
Hide file tree
Showing 20 changed files with 293 additions and 986 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@
import org.apache.camel.util.concurrent.CamelThreadFactory;
import org.openremote.container.concurrent.ContainerExecutor;
import org.openremote.container.concurrent.ContainerScheduledExecutor;
import org.openremote.container.web.DefaultWebsocketComponent;
import org.openremote.container.web.socket.WebsocketComponent;
import org.openremote.model.Container;
import org.openremote.model.ContainerService;

Expand All @@ -51,12 +49,8 @@
import java.util.concurrent.ThreadFactory;
import java.util.logging.Logger;

import static org.openremote.container.util.MapAccess.getString;

public class MessageBrokerService implements ContainerService {

public static final String MESSAGE_SESSION_ALLOWED_ORIGIN = "MESSAGE_SESSION_ALLOWED_ORIGIN";
public static final String MESSAGE_SESSION_ALLOWED_ORIGIN_DEFAULT = null;
private static final Logger LOG = Logger.getLogger(MessageBrokerService.class.getName());
public static final int PRIORITY = ContainerService.LOW_PRIORITY;

Expand Down Expand Up @@ -142,13 +136,6 @@ protected String getExecutorName(String name, ThreadFactory threadFactory) {

((SimpleRegistry)((DefaultRegistry)context.getRegistry()).getFallbackRegistry()).put("OpenRemote", Map.of(Container.class, container));

String allowedOrigin = getString(container.getConfig(), MESSAGE_SESSION_ALLOWED_ORIGIN, MESSAGE_SESSION_ALLOWED_ORIGIN_DEFAULT);
WebsocketComponent websocketComponent = new DefaultWebsocketComponent(
container,
allowedOrigin
);

context.addComponent(WebsocketComponent.NAME, websocketComponent);
context.addComponent("snmp", new SnmpComponent());
}

Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,10 @@ protected ResteasyDeployment createResteasyDeployment(Container container, Colle
return resteasyDeployment;
}

public Undertow getUndertow() {
return undertow;
}

public static synchronized FilterInfo getCorsFilterInfo(Container container) {

if (corsFilterRef == null) {
Expand Down

This file was deleted.

Loading

0 comments on commit c9b5ef3

Please sign in to comment.