You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by mm...@apache.org on 2020/06/17 18:40:10 UTC
[pulsar] branch master updated: [pulsar-websocket] remove getters
and setters from websocket config (#7253)
This is an automated email from the ASF dual-hosted git repository.
mmerli pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar.git
The following commit(s) were added to refs/heads/master by this push:
new a7c54ff [pulsar-websocket] remove getters and setters from websocket config (#7253)
a7c54ff is described below
commit a7c54ffa0892bd8ac6263d495ddaada9e48b89fb
Author: Rajan Dhabalia <rd...@apache.org>
AuthorDate: Wed Jun 17 11:39:57 2020 -0700
[pulsar-websocket] remove getters and setters from websocket config (#7253)
---
.../pulsar/websocket/service/ProxyServer.java | 2 +-
.../service/WebSocketProxyConfiguration.java | 315 +--------------------
2 files changed, 6 insertions(+), 311 deletions(-)
diff --git a/pulsar-websocket/src/main/java/org/apache/pulsar/websocket/service/ProxyServer.java b/pulsar-websocket/src/main/java/org/apache/pulsar/websocket/service/ProxyServer.java
index c2151ac..c179dd9 100644
--- a/pulsar-websocket/src/main/java/org/apache/pulsar/websocket/service/ProxyServer.java
+++ b/pulsar-websocket/src/main/java/org/apache/pulsar/websocket/service/ProxyServer.java
@@ -81,7 +81,7 @@ public class ProxyServer {
config.getTlsTrustCertsFilePath(),
config.getTlsCertificateFilePath(),
config.getTlsKeyFilePath(),
- config.getTlsRequireTrustedClientCertOnConnect(),
+ config.isTlsRequireTrustedClientCertOnConnect(),
true,
config.getTlsCertRefreshCheckDurationSec());
connectorTls = new ServerConnector(server, -1, -1, sslCtxFactory);
diff --git a/pulsar-websocket/src/main/java/org/apache/pulsar/websocket/service/WebSocketProxyConfiguration.java b/pulsar-websocket/src/main/java/org/apache/pulsar/websocket/service/WebSocketProxyConfiguration.java
index 840faf5..d8b33d9 100644
--- a/pulsar-websocket/src/main/java/org/apache/pulsar/websocket/service/WebSocketProxyConfiguration.java
+++ b/pulsar-websocket/src/main/java/org/apache/pulsar/websocket/service/WebSocketProxyConfiguration.java
@@ -28,6 +28,11 @@ import org.apache.pulsar.common.configuration.PulsarConfiguration;
import com.google.common.collect.Sets;
+import lombok.Getter;
+import lombok.Setter;
+
+@Getter
+@Setter
public class WebSocketProxyConfiguration implements PulsarConfiguration {
// Number of threads used by Proxy server
@@ -127,314 +132,4 @@ public class WebSocketProxyConfiguration implements PulsarConfiguration {
private long tlsCertRefreshCheckDurationSec = 300;
private Properties properties = new Properties();
-
- public String getClusterName() {
- return clusterName;
- }
-
- public void setClusterName(String clusterName) {
- this.clusterName = clusterName;
- }
-
- public String getServiceUrl() {
- return serviceUrl;
- }
-
- public void setServiceUrl(String serviceUrl) {
- this.serviceUrl = serviceUrl;
- }
-
- public String getServiceUrlTls() {
- return serviceUrlTls;
- }
-
- public void setServiceUrlTls(String serviceUrlTls) {
- this.serviceUrlTls = serviceUrlTls;
- }
-
- public String getBrokerServiceUrl() {
- return brokerServiceUrl;
- }
-
- public void setBrokerServiceUrl(String brokerServiceUrl) {
- this.brokerServiceUrl = brokerServiceUrl;
- }
-
- public String getBrokerServiceUrlTls() {
- return brokerServiceUrlTls;
- }
-
- public void setBrokerServiceUrlTls(String brokerServiceUrlTls) {
- this.brokerServiceUrlTls = brokerServiceUrlTls;
- }
-
- public String getStatusFilePath() {
- return statusFilePath;
- }
-
- public void setStatusFilePath(String statusFilePath) {
- this.statusFilePath = statusFilePath;
- }
-
- @Deprecated
- public String getGlobalZookeeperServers() {
- return globalZookeeperServers;
- }
-
- @Deprecated
- public void setGlobalZookeeperServers(String globalZookeeperServers) {
- this.globalZookeeperServers = globalZookeeperServers;
- }
-
- public String getConfigurationStoreServers() {
- return null == configurationStoreServers ? getGlobalZookeeperServers() : configurationStoreServers;
- }
-
- public void setConfigurationStoreServers(String configurationStoreServers) {
- this.configurationStoreServers = configurationStoreServers;
- }
-
- public long getZooKeeperSessionTimeoutMillis() {
- return zooKeeperSessionTimeoutMillis;
- }
-
- public void setZooKeeperSessionTimeoutMillis(long zooKeeperSessionTimeoutMillis) {
- this.zooKeeperSessionTimeoutMillis = zooKeeperSessionTimeoutMillis;
- }
-
- public int getZooKeeperCacheExpirySeconds() {
- return zooKeeperCacheExpirySeconds;
- }
-
- public void setZooKeeperCacheExpirySeconds(int zooKeeperCacheExpirySeconds) {
- this.zooKeeperCacheExpirySeconds = zooKeeperCacheExpirySeconds;
- }
-
- public Optional<Integer> getWebServicePort() {
- return webServicePort;
- }
-
- public void setWebServicePort(Optional<Integer> webServicePort) {
- this.webServicePort = webServicePort;
- }
-
- public Optional<Integer> getWebServicePortTls() {
- return webServicePortTls;
- }
-
- public void setWebServicePortTls(Optional<Integer> webServicePortTls) {
- this.webServicePortTls = webServicePortTls;
- }
-
- public String getBindAddress() {
- return bindAddress;
- }
-
- public void setBindAddress(String bindAddress) {
- this.bindAddress = bindAddress;
- }
-
- public int getWebSocketMaxTextFrameSize() {
- return webSocketMaxTextFrameSize;
- }
-
- public void setWebSocketMaxTextFrameSize(int webSocketMaxTextFrameSize) {
- this.webSocketMaxTextFrameSize = webSocketMaxTextFrameSize;
- }
-
- public boolean isAuthenticationEnabled() {
- return authenticationEnabled;
- }
-
- public void setAuthenticationEnabled(boolean authenticationEnabled) {
- this.authenticationEnabled = authenticationEnabled;
- }
-
- public void setAuthenticationProviders(Set<String> providersClassNames) {
- authenticationProviders = providersClassNames;
- }
-
- public Set<String> getAuthenticationProviders() {
- return authenticationProviders;
- }
-
- public boolean isAuthorizationEnabled() {
- return authorizationEnabled;
- }
-
- public void setAuthorizationEnabled(boolean authorizationEnabled) {
- this.authorizationEnabled = authorizationEnabled;
- }
-
- public String getAuthorizationProvider() {
- return authorizationProvider;
- }
-
- public void setAuthorizationProvider(String authorizationProvider) {
- this.authorizationProvider = authorizationProvider;
- }
-
- public boolean getAuthorizationAllowWildcardsMatching() {
- return authorizationAllowWildcardsMatching;
- }
-
- public void setAuthorizationAllowWildcardsMatching(boolean authorizationAllowWildcardsMatching) {
- this.authorizationAllowWildcardsMatching = authorizationAllowWildcardsMatching;
- }
-
- public Set<String> getSuperUserRoles() {
- return superUserRoles;
- }
-
- public void setSuperUserRoles(Set<String> superUserRoles) {
- this.superUserRoles = superUserRoles;
- }
-
- public String getBrokerClientAuthenticationPlugin() {
- return brokerClientAuthenticationPlugin;
- }
-
- public void setBrokerClientAuthenticationPlugin(String brokerClientAuthenticationPlugin) {
- this.brokerClientAuthenticationPlugin = brokerClientAuthenticationPlugin;
- }
-
- public String getBrokerClientTrustCertsFilePath() {
- return brokerClientTrustCertsFilePath;
- }
-
- public void setBrokerClientTrustCertsFilePath(String brokerClientTrustCertsFilePath) {
- this.brokerClientTrustCertsFilePath = brokerClientTrustCertsFilePath;
- }
-
- public String getBrokerClientAuthenticationParameters() {
- return brokerClientAuthenticationParameters;
- }
-
- public void setBrokerClientAuthenticationParameters(String brokerClientAuthenticationParameters) {
- this.brokerClientAuthenticationParameters = brokerClientAuthenticationParameters;
- }
-
- @Deprecated
- public int getNumIoThreads() {
- return getWebSocketNumIoThreads();
- }
-
- @Deprecated
- public void setNumIoThreads(int numIoThreads) {
- setWebSocketNumIoThreads(numIoThreads);
- }
-
- public int getWebSocketNumIoThreads() {
- return webSocketNumIoThreads;
- }
-
- public void setWebSocketNumIoThreads(int webSocketNumIoThreads) {
- this.webSocketNumIoThreads = webSocketNumIoThreads;
- }
-
- public int getNumHttpServerThreads() {
- return numHttpServerThreads;
- }
-
- public void setNumHttpServerThreads(int numHttpServerThreads) {
- this.numHttpServerThreads = numHttpServerThreads;
- }
-
- @Deprecated
- public int getConnectionsPerBroker() {
- return getWebSocketConnectionsPerBroker();
- }
-
- @Deprecated
- public void setConnectionsPerBroker(int connectionsPerBroker) {
- setWebSocketConnectionsPerBroker(connectionsPerBroker);
- }
-
- public int getWebSocketConnectionsPerBroker() {
- return webSocketConnectionsPerBroker;
- }
-
- public void setWebSocketConnectionsPerBroker(int webSocketConnectionsPerBroker) {
- this.webSocketConnectionsPerBroker = webSocketConnectionsPerBroker;
- }
-
- public int getWebSocketSessionIdleTimeoutMillis() {
- return webSocketSessionIdleTimeoutMillis;
- }
-
- public void setWebSocketSessionIdleTimeoutMillis(int webSocketSessionIdleTimeoutMillis) {
- this.webSocketSessionIdleTimeoutMillis = webSocketSessionIdleTimeoutMillis;
- }
-
- public String getAnonymousUserRole() {
- return anonymousUserRole;
- }
-
- public void setAnonymousUserRole(String anonymousUserRole) {
- this.anonymousUserRole = anonymousUserRole;
- }
-
- public boolean isBrokerClientTlsEnabled() {
- return brokerClientTlsEnabled || tlsEnabled;
- }
-
- public void setBrokerClientTlsEnabled(boolean brokerClientTlsEnabled) {
- this.brokerClientTlsEnabled = brokerClientTlsEnabled;
- }
-
- public String getTlsCertificateFilePath() {
- return tlsCertificateFilePath;
- }
-
- public void setTlsCertificateFilePath(String tlsCertificateFilePath) {
- this.tlsCertificateFilePath = tlsCertificateFilePath;
- }
-
- public String getTlsKeyFilePath() {
- return tlsKeyFilePath;
- }
-
- public void setTlsKeyFilePath(String tlsKeyFilePath) {
- this.tlsKeyFilePath = tlsKeyFilePath;
- }
-
- public String getTlsTrustCertsFilePath() {
- return tlsTrustCertsFilePath;
- }
-
- public void setTlsTrustCertsFilePath(String tlsTrustCertsFilePath) {
- this.tlsTrustCertsFilePath = tlsTrustCertsFilePath;
- }
-
- public boolean isTlsAllowInsecureConnection() {
- return tlsAllowInsecureConnection;
- }
-
- public void setTlsAllowInsecureConnection(boolean tlsAllowInsecureConnection) {
- this.tlsAllowInsecureConnection = tlsAllowInsecureConnection;
- }
-
- public Properties getProperties() {
- return properties;
- }
-
- public void setProperties(Properties properties) {
- this.properties = properties;
- }
-
- public boolean getTlsRequireTrustedClientCertOnConnect() {
- return tlsRequireTrustedClientCertOnConnect;
- }
-
- public void setTlsRequireTrustedClientCertOnConnect(boolean tlsRequireTrustedClientCertOnConnect) {
- this.tlsRequireTrustedClientCertOnConnect = tlsRequireTrustedClientCertOnConnect;
- }
-
- public long getTlsCertRefreshCheckDurationSec() {
- return tlsCertRefreshCheckDurationSec;
- }
-
- public void setTlsCertRefreshCheckDurationSec(long tlsCertRefreshCheckDurationSec) {
- this.tlsCertRefreshCheckDurationSec = tlsCertRefreshCheckDurationSec;
- }
}