@Test public void getHostname() { testSubject = new MessagingPlatformConfiguration(new SystemInfoProvider() { @Override public int getPort() { return 0; } @Override public String getHostName() throws UnknownHostException { return "test.axoniq.io"; } }); assertEquals("test.axoniq.io", testSubject.getHostname()); }
public String getHostname() { if (StringUtils.isEmpty(hostname)) { try { hostname = systemInfoProvider.getHostName(); if (!StringUtils.isEmpty(domain) && hostname.endsWith("." + domain)) { hostname = hostname.substring(0, hostname.length() - domain.length() - 1); } } catch (UnknownHostException e) { logger.warn("Could not determine hostname from inet address: {}", e.getMessage()); } } return hostname; }
MessagingPlatformConfiguration { public String getHostname() { if (StringUtils.isEmpty(hostname)) { try { hostname = systemInfoProvider.getHostName(); if (!StringUtils.isEmpty(domain) && hostname.endsWith("." + domain)) { hostname = hostname.substring(0, hostname.length() - domain.length() - 1); } } catch (UnknownHostException e) { logger.warn("Could not determine hostname from inet address: {}", e.getMessage()); } } return hostname; } }
MessagingPlatformConfiguration { public String getHostname() { if (StringUtils.isEmpty(hostname)) { try { hostname = systemInfoProvider.getHostName(); if (!StringUtils.isEmpty(domain) && hostname.endsWith("." + domain)) { hostname = hostname.substring(0, hostname.length() - domain.length() - 1); } } catch (UnknownHostException e) { logger.warn("Could not determine hostname from inet address: {}", e.getMessage()); } } return hostname; } MessagingPlatformConfiguration(SystemInfoProvider systemInfoProvider); }
MessagingPlatformConfiguration { public String getHostname() { if (StringUtils.isEmpty(hostname)) { try { hostname = systemInfoProvider.getHostName(); if (!StringUtils.isEmpty(domain) && hostname.endsWith("." + domain)) { hostname = hostname.substring(0, hostname.length() - domain.length() - 1); } } catch (UnknownHostException e) { logger.warn("Could not determine hostname from inet address: {}", e.getMessage()); } } return hostname; } MessagingPlatformConfiguration(SystemInfoProvider systemInfoProvider); @PostConstruct void postConstruct(); int getPort(); void setPort(int port); int getInternalPort(); void setInternalPort(int internalPort); String getName(); void setName(String name); String getHostname(); void setHostname(String hostname); String getDomain(); void setDomain(String domain); String getInternalHostname(); void setInternalHostname(String internalHostname); String getInternalDomain(); int getHttpPort(); void setInternalDomain(String internalDomain); String getFullyQualifiedHostname(); String getFullyQualifiedInternalHostname(); SslConfiguration getSsl(); void setSsl(SslConfiguration ssl); AccessControlConfiguration getAccesscontrol(); void setAccesscontrol(AccessControlConfiguration accesscontrol); int getMetricsInterval(); void setMetricsInterval(int metricsInterval); long getKeepAliveTimeout(); void setKeepAliveTimeout(long keepAliveTimeout); long getKeepAliveTime(); void setKeepAliveTime(long keepAliveTime); long getMinKeepAliveTime(); void setMinKeepAliveTime(long minKeepAliveTime); String getControldbBackupLocation(); void setControldbBackupLocation(String controldbBackupLocation); int getMaxMessageSize(); void setMaxMessageSize(int maxMessageSize); int getMaxTransactionSize(); String getPidFileLocation(); void setMetricsSynchronizationRate(int metricsSynchronizationRate); void setPidFileLocation(String pidFileLocation); int getGrpcBufferedMessages(); void setGrpcBufferedMessages(int grpcBufferedMessages); int getExecutorThreadCount(); void setExecutorThreadCount(int executorThreadCount); int getClusterExecutorThreadCount(); void setClusterExecutorThreadCount(int clusterExecutorThreadCount); boolean isSetWebSocketAllowedOrigins(); void setSetWebSocketAllowedOrigins(boolean setWebSocketAllowedOrigins); String getWebSocketAllowedOrigins(); void setWebSocketAllowedOrigins(String webSocketAllowedOrigins); }
MessagingPlatformConfiguration { public String getHostname() { if (StringUtils.isEmpty(hostname)) { try { hostname = systemInfoProvider.getHostName(); if (!StringUtils.isEmpty(domain) && hostname.endsWith("." + domain)) { hostname = hostname.substring(0, hostname.length() - domain.length() - 1); } } catch (UnknownHostException e) { logger.warn("Could not determine hostname from inet address: {}", e.getMessage()); } } return hostname; } MessagingPlatformConfiguration(SystemInfoProvider systemInfoProvider); @PostConstruct void postConstruct(); int getPort(); void setPort(int port); int getInternalPort(); void setInternalPort(int internalPort); String getName(); void setName(String name); String getHostname(); void setHostname(String hostname); String getDomain(); void setDomain(String domain); String getInternalHostname(); void setInternalHostname(String internalHostname); String getInternalDomain(); int getHttpPort(); void setInternalDomain(String internalDomain); String getFullyQualifiedHostname(); String getFullyQualifiedInternalHostname(); SslConfiguration getSsl(); void setSsl(SslConfiguration ssl); AccessControlConfiguration getAccesscontrol(); void setAccesscontrol(AccessControlConfiguration accesscontrol); int getMetricsInterval(); void setMetricsInterval(int metricsInterval); long getKeepAliveTimeout(); void setKeepAliveTimeout(long keepAliveTimeout); long getKeepAliveTime(); void setKeepAliveTime(long keepAliveTime); long getMinKeepAliveTime(); void setMinKeepAliveTime(long minKeepAliveTime); String getControldbBackupLocation(); void setControldbBackupLocation(String controldbBackupLocation); int getMaxMessageSize(); void setMaxMessageSize(int maxMessageSize); int getMaxTransactionSize(); String getPidFileLocation(); void setMetricsSynchronizationRate(int metricsSynchronizationRate); void setPidFileLocation(String pidFileLocation); int getGrpcBufferedMessages(); void setGrpcBufferedMessages(int grpcBufferedMessages); int getExecutorThreadCount(); void setExecutorThreadCount(int executorThreadCount); int getClusterExecutorThreadCount(); void setClusterExecutorThreadCount(int clusterExecutorThreadCount); boolean isSetWebSocketAllowedOrigins(); void setSetWebSocketAllowedOrigins(boolean setWebSocketAllowedOrigins); String getWebSocketAllowedOrigins(); void setWebSocketAllowedOrigins(String webSocketAllowedOrigins); static final int DEFAULT_INTERNAL_GRPC_PORT; }