object Lookup extends Product with Serializable
- Source
- ServiceDiscovery.scala
- Alphabetic
- By Inheritance
- Lookup
- Serializable
- Serializable
- Product
- Equals
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Value Members
-
def
apply(serviceName: String, portName: Option[String], protocol: Option[String]): Lookup
Create a service Lookup with
serviceName
, optionalportName
and optionalprotocol
. -
def
apply(serviceName: String): Lookup
Create a service Lookup with only a serviceName.
Create a service Lookup with only a serviceName. Use withPortName and withProtocol to provide optional portName and protocol
-
def
create(serviceName: String): Lookup
Java API
Java API
Create a service Lookup with only a serviceName. Use withPortName and withProtocol to provide optional portName and protocol
-
def
isValidSrv(srv: String): Boolean
Returns true if passed string conforms with SRV format.
Returns true if passed string conforms with SRV format. Otherwise returns false.
-
def
parseSrv(str: String): Lookup
Create a service Lookup from a string with format: _portName._protocol.serviceName.
Create a service Lookup from a string with format: _portName._protocol.serviceName. (as specified by https://www.ietf.org/rfc/rfc2782.txt)
If the passed string conforms with this format, a SRV Lookup is returned. The serviceName part must be a valid domain name. (as defined in https://tools.ietf.org/html/rfc1034)
The string is parsed and dismembered to build a Lookup as following: Lookup(serviceName).withPortName(portName).withProtocol(protocol)
- Exceptions thrown
java.lang.IllegalArgumentException
If the string doesn't not conform with the SRV formatjava.lang.NullPointerException
If the passed string is null