All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.elasticmq.NodeAddress.scala Maven / Gradle / Ivy

The newest version!
package org.elasticmq

case class NodeAddress(
    protocol: String = "http",
    host: String = "localhost",
    port: Int = 9324,
    contextPath: String = ""
) {
  def hostAndPort: String = host + ":" + port
  def fullAddress: String = protocol + "://" + hostAndPort + suffix
  def isWildcard: Boolean = host == "*"
  def contextPathStripped: String = contextPath.stripPrefix("/").stripSuffix("/")
  def suffix: String = if (contextPath.trim.isEmpty) "" else "/" + contextPathStripped
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy