Package org.wildfly.discovery
Class ServiceType
java.lang.Object
org.wildfly.discovery.ServiceDesignation
org.wildfly.discovery.ServiceType
- All Implemented Interfaces:
Serializable
An abstract service type.
- Author:
- David M. Lloyd
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionbooleanDetermine if this service type is equal to another.booleanequals(ServiceDesignation other) Determine if this service type is equal to another.booleanequals(ServiceType other) Determine if this service type is equal to another.final StringGet the abstract type of this service type.final StringGet the abstract type authority of this service type.Get the concrete type name of this service type, if any.Get the concrete type authority name of this service type, if any.inthashCode()Get the hash code for this service type.booleanimplies(ServiceDesignation other) Determine whether the given service designation is implied by this service designation.booleanimplies(ServiceType serviceType) Determine if this service type implies the other service type.booleanimplies(ServiceURL serviceURL) Determine if this service type implies the given service URL.static ServiceTypeGet a service type with the given abstract type and optional abstract type authority.static ServiceTypeof(String abstractType, String abstractTypeAuthority, String concreteType, String concreteTypeAuthority) Get a service type with the given abstract and concrete type and optional abstract and/or concrete type authority.toString()Get the string representation of this service type.
-
Method Details
-
implies
Description copied from class:ServiceDesignationDetermine whether the given service designation is implied by this service designation.- Specified by:
impliesin classServiceDesignation- Parameters:
other- the other service designation- Returns:
trueof the other service designation is implied by this one,falseotherwise
-
implies
Determine if this service type implies the other service type. This is the case for any other service type which has the same abstract type and abstract type authority, and the same URL scheme and URL scheme authority (if one is specified) as this service type.- Parameters:
serviceType- the other service type (must not benull)- Returns:
trueif the other service type is implied by this type,falseotherwise
-
implies
Determine if this service type implies the given service URL. This is the case for any service URL which either has no abstract type and whose concrete type matches this service type's abstract type, or has an abstract type that is equal to this service type's abstract type and has a concrete type equal to this service type's concrete type.- Parameters:
serviceURL- the service URL (must not benull)- Returns:
trueif the service URL is implied by this type,falseotherwise
-
equals
Determine if this service type is equal to another.- Parameters:
other- the other service type- Returns:
trueif the service types are equal,falseotherwise
-
equals
Determine if this service type is equal to another.- Specified by:
equalsin classServiceDesignation- Parameters:
other- the other service type- Returns:
trueif the service types are equal,falseotherwise
-
equals
Determine if this service type is equal to another.- Specified by:
equalsin classServiceDesignation- Parameters:
other- the other service type- Returns:
trueif the service types are equal,falseotherwise
-
hashCode
public int hashCode()Get the hash code for this service type. Service types are immutable and are suitable for use as hash keys.- Specified by:
hashCodein classServiceDesignation- Returns:
- the hash code for this service type
-
toString
Get the string representation of this service type.- Specified by:
toStringin classServiceDesignation- Returns:
- the string representation of this service type (not
null)
-
getAbstractType
Get the abstract type of this service type. If this service type has no URL scheme, then the abstract type is also the concrete type.- Specified by:
getAbstractTypein classServiceDesignation- Returns:
- the abstract type (not
null)
-
getAbstractTypeAuthority
Get the abstract type authority of this service type. Abstract types with no authority will returnnullfor this value.- Specified by:
getAbstractTypeAuthorityin classServiceDesignation- Returns:
- the abstract type authority of this service type (may be
null)
-
getUriScheme
Get the concrete type name of this service type, if any.- Specified by:
getUriSchemein classServiceDesignation- Returns:
- the concrete service type (may be
null)
-
getUriSchemeAuthority
Get the concrete type authority name of this service type, if any.- Specified by:
getUriSchemeAuthorityin classServiceDesignation- Returns:
- the concrete type authority name (may be
null)
-
of
Get a service type with the given abstract type and optional abstract type authority.- Parameters:
abstractType- the abstract service type (must not benull)abstractTypeAuthority- the abstract type authority (may benull)- Returns:
- the service type (not
null)
-
of
public static ServiceType of(String abstractType, String abstractTypeAuthority, String concreteType, String concreteTypeAuthority) Get a service type with the given abstract and concrete type and optional abstract and/or concrete type authority.- Parameters:
abstractType- the abstract service type (must not benull)abstractTypeAuthority- the abstract type authority (may benull)concreteType- the concrete service type (must not benull)concreteTypeAuthority- the concrete type authority (may benull)- Returns:
- the service type (not
null)
-