io.quarkus.reactivemessaging.http.runtime.QuarkusWebSocketConnectorIncomingConfiguration Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of quarkus-reactive-messaging-http Show documentation
Show all versions of quarkus-reactive-messaging-http Show documentation
Connect to HTTP or WebSocket and expose HTTP or WebSocket endpoints for Reactive Messaging
package io.quarkus.reactivemessaging.http.runtime;
import java.util.Optional;
import org.eclipse.microprofile.config.Config;
/**
* Extract the incoming configuration for the {@code quarkus-websocket} connector.
*/
public class QuarkusWebSocketConnectorIncomingConfiguration extends QuarkusWebSocketConnectorCommonConfiguration {
/**
* Creates a new QuarkusWebSocketConnectorIncomingConfiguration.
*/
public QuarkusWebSocketConnectorIncomingConfiguration(Config config) {
super(config);
validate();
}
/**
* Gets the path value from the configuration.
* Attribute Name: path
* Description: The path of the endpoint
* Mandatory: yes
* @return the path
*/
public String getPath() {
return config.getOptionalValue("path", String.class)
.orElseThrow(() -> new IllegalArgumentException("The attribute `path` on connector 'quarkus-websocket' (channel: " + getChannel() + ") must be set"));
}
/**
* Gets the buffer-size value from the configuration.
* Attribute Name: buffer-size
* Description: Web socket endpoint buffers messages if a consumer is not able to keep up. This setting specifies the size of the buffer.
* Default Value: 8
* @return the buffer-size
*/
public String getBufferSize() {
return config.getOptionalValue("buffer-size", String.class)
.orElse("8");
}
public void validate() {
super.validate();
getPath();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy