Package org.wildfly.discovery
Class ServiceURL
java.lang.Object
org.wildfly.discovery.ServiceDesignation
org.wildfly.discovery.ServiceURL
- All Implemented Interfaces:
Serializable
An RFC 2609-compliant service description URL. This implementation
only deviates from the specification in that it does not support AppleTalk or IPX address schemes.
- Author:
- David M. Lloyd
- See Also:
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionbooleanDetermine whether this service URL is equal to the given object.booleanequals(ServiceDesignation other) Determine whether this service URL is equal to the given object.booleanequals(ServiceURL other) Determine whether this service URL is equal to the given object.Get the abstract type, if any.Get the abstract type authority, if any.Get the attribute names.getAttributeValues(String name) Get the values of the attribute with the given name.getFirstAttributeValue(String name) Get the first attribute value for the given name.getFirstAttributeValue(String name, AttributeValue defaultValue) Get the first attribute value for the given name.Get the host name of the concrete URI.getLastAttributeValue(String name) Get the last attribute value for the given name.getLastAttributeValue(String name, AttributeValue defaultValue) Get the last attribute value for the given name.Get the concrete location URI of this service URL.getPath()Get the path name of the concrete URI, if any.intgetPort()Get the port number of the concrete URI, if any.Get the service type of this URL.Get the concrete URI scheme.Get the concrete URI scheme authority, if any.Get the user name of the concrete URI, if any.inthashCode()Get the hash code of this service URL.booleanimplies(ServiceDesignation other) Determine if this service URL implies the other service designation.booleanimplies(ServiceURL other) Determine if this service URL implies the other service URL.booleansatisfies(FilterSpec filterSpec) Determine whether this service URL satisfies the given filter specification.Convert this service URL into a URI whose contents are exactly equal to this object's.toString()Get the string representation of this service URL.
-
Method Details
-
satisfies
Determine whether this service URL satisfies the given filter specification.- Parameters:
filterSpec- the filter specification- Returns:
trueif this service satisfies the filter specification,falseif it does not
-
implies
Determine if this service URL implies the other service URL. This is true only when the two are equal.- Parameters:
other- the other service URL- Returns:
trueif they are equal,falseotherwise
-
implies
Determine if this service URL implies the other service designation. This is true only when the other designation is a service URL and the two are equal.- Specified by:
impliesin classServiceDesignation- Parameters:
other- the other service designation- Returns:
trueif they are equal service URLs,falseotherwise
-
equals
Determine whether this service URL is equal to the given object. This is true when the other object is a service URL with the same abstract type and authority, the same concrete URI, and the same attributes.- Parameters:
other- the other object- Returns:
trueif they are equal,falseotherwise
-
equals
Determine whether this service URL is equal to the given object. This is true when the other object is a service URL with the same abstract type and authority, the same concrete URI, and the same attributes.- Specified by:
equalsin classServiceDesignation- Parameters:
other- the other object- Returns:
trueif they are equal,falseotherwise
-
equals
Determine whether this service URL is equal to the given object. This is true when the other object is a service URL with the same abstract type and authority, the same concrete URI, and the same attributes.- Specified by:
equalsin classServiceDesignation- Parameters:
other- the other object- Returns:
trueif they are equal,falseotherwise
-
hashCode
public int hashCode()Get the hash code of this service URL. Service URLs are suitable for use as hash table keys.- Specified by:
hashCodein classServiceDesignation- Returns:
- the hash code
-
toString
Get the string representation of this service URL.- Specified by:
toStringin classServiceDesignation- Returns:
- the string representation
-
toServiceURI
Convert this service URL into a URI whose contents are exactly equal to this object's.- Returns:
- the URI (not
null) - Throws:
URISyntaxException- if there was some syntactical problem in the URI being constructed
-
getLocationURI
Get the concrete location URI of this service URL.- Returns:
- the concrete location (not
null)
-
getServiceType
Get the service type of this URL.- Returns:
- the service type (not
null)
-
getAbstractType
Get the abstract type, if any.- Specified by:
getAbstractTypein classServiceDesignation- Returns:
- the abstract type, or
nullif no abstract type is set
-
getAbstractTypeAuthority
Get the abstract type authority, if any.- Specified by:
getAbstractTypeAuthorityin classServiceDesignation- Returns:
- the abstract type authority, or
nullif no abstract type authority is set
-
getUriScheme
Get the concrete URI scheme.- Specified by:
getUriSchemein classServiceDesignation- Returns:
- the concrete URI scheme (not
null)
-
getUriSchemeAuthority
Get the concrete URI scheme authority, if any.- Specified by:
getUriSchemeAuthorityin classServiceDesignation- Returns:
- the concrete URI scheme authority, or
nullif none is set
-
getUserName
Get the user name of the concrete URI, if any.- Returns:
- the user name of the concrete URI, or
nullif none is set
-
getHostName
Get the host name of the concrete URI.- Returns:
- the host name of the concrete URI (not
null)
-
getPort
public int getPort()Get the port number of the concrete URI, if any.- Returns:
- the port number of the concrete URI, or -1 if it is undefined
-
getPath
Get the path name of the concrete URI, if any.- Returns:
- the path name of the concrete URI, or
nullif none is set
-
getFirstAttributeValue
Get the first attribute value for the given name.- Parameters:
name- the attribute name (must not benull)- Returns:
- the first attribute value for the given name, or
nullif no such attribute exists
-
getFirstAttributeValue
Get the first attribute value for the given name.- Parameters:
name- the attribute name (must not benull)defaultValue- the value to return if no such attribute exists- Returns:
- the first attribute value for the given name, or
defaultValueif no such attribute exists
-
getLastAttributeValue
Get the last attribute value for the given name.- Parameters:
name- the attribute name (must not benull)- Returns:
- the last attribute value for the given name, or
nullif no such attribute exists
-
getLastAttributeValue
Get the last attribute value for the given name.- Parameters:
name- the attribute name (must not benull)defaultValue- the value to return if no such attribute exists- Returns:
- the last attribute value for the given name, or
nullif no such attribute exists
-
getAttributeValues
Get the values of the attribute with the given name. If no such attribute exists, an empty list is returned.- Parameters:
name- the attribute name (must not benull)- Returns:
- the values of the attribute with the given name (not
null)
-
getAttributeNames
Get the attribute names. If no attributes exist, an empty set is returned.- Returns:
- an unmodifiable set of attribute names (not
null)
-