Package org.kuali.rice.ksb.api.registry
Class ServiceInfo.Builder
java.lang.Object
org.kuali.rice.ksb.api.registry.ServiceInfo.Builder
- All Implemented Interfaces:
Serializable,Versioned,ModelBuilder,ServiceInfoContract
- Enclosing class:
ServiceInfo
public static final class ServiceInfo.Builder
extends Object
implements Serializable, ModelBuilder, ServiceInfoContract
A builder which can be used to construct
ServiceInfo instances.
Enforces the constraints of the ServiceInfoContract.- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionbuild()static ServiceInfo.Buildercreate()static ServiceInfo.Buildercreate(ServiceInfoContract contract) Returns the id of the application that published and owns the service.Returns a checksum value for theServiceConfigurationstored in theServiceDescriptorContractfor this service.Returns the URL of the service as a string.Returns the id of the instance that published and owns the service.Return the IP address of the server on which the application is running which published and owns the service.Returns the id of the service descriptor for this service.Returns the identifier for the service.Returns the name of the service as a qualified name consisting of a namespace and a name.Returns the version information of this service.Return the status of the service endpoint represented by this service.getType()Returns the type of this service.Deprecated.voidsetApplicationId(String applicationId) voidsetChecksum(String checksum) voidsetEndpointUrl(String endpointUrl) voidsetInstanceId(String instanceId) voidsetServerIpAddress(String serverIpAddress) voidsetServiceDescriptorId(String serviceDescriptorId) voidsetServiceId(String serviceId) voidsetServiceName(QName serviceName) voidsetServiceVersion(String serviceVersion) voidsetStatus(ServiceEndpointStatus status) voidvoidsetVersionNumber(Long versionNumber) Deprecated.version number is no longer used
-
Method Details
-
create
-
create
-
build
- Specified by:
buildin interfaceModelBuilder
-
getServiceId
Description copied from interface:ServiceInfoContractReturns the identifier for the service.- Specified by:
getServiceIdin interfaceServiceInfoContract- Returns:
- the identifier for the service, will only be null if the service has not yet been published to the registry
-
getServiceName
Description copied from interface:ServiceInfoContractReturns the name of the service as a qualified name consisting of a namespace and a name.- Specified by:
getServiceNamein interfaceServiceInfoContract- Returns:
- the name of the service, should never be null
-
getEndpointUrl
Description copied from interface:ServiceInfoContractReturns the URL of the service as a string.- Specified by:
getEndpointUrlin interfaceServiceInfoContract- Returns:
- the url of the service, should never be null or blank
-
getInstanceId
Description copied from interface:ServiceInfoContractReturns the id of the instance that published and owns the service.- Specified by:
getInstanceIdin interfaceServiceInfoContract- Returns:
- the instance id of this service, should never be null or blank
-
getApplicationId
Description copied from interface:ServiceInfoContractReturns the id of the application that published and owns the service.- Specified by:
getApplicationIdin interfaceServiceInfoContract- Returns:
- the application id of this service, should never be null or blank
-
getServerIpAddress
Description copied from interface:ServiceInfoContractReturn the IP address of the server on which the application is running which published and owns the service. This value could be either an IPv4 or IPv6 address, but it should never return a null or empty string.- Specified by:
getServerIpAddressin interfaceServiceInfoContract- Returns:
- the IP address of this service, should never be null or blank
-
getType
Description copied from interface:ServiceInfoContractReturns the type of this service. Will generally distinguish the format of the data being brokered by the service (i.e. SOAP, REST, Java Serialization, etc.)- Specified by:
getTypein interfaceServiceInfoContract- Returns:
- the type of this service, should never be null or blank
-
getServiceVersion
Description copied from interface:ServiceInfoContractReturns the version information of this service. The publisher of the service can use any value they choose for the service versions. However, there is one standard version which represents a service without any version information, and that isCoreConstants.Versions.UNSPECIFIED.- Specified by:
getServiceVersionin interfaceServiceInfoContract- Returns:
- the version of this service, or
CoreConstants.Versions.UNSPECIFIEDif no version has been secified, should never return a null or blank value
-
getStatus
Description copied from interface:ServiceInfoContractReturn the status of the service endpoint represented by this service.- Specified by:
getStatusin interfaceServiceInfoContract- Returns:
- the status of this service
-
getServiceDescriptorId
Description copied from interface:ServiceInfoContractReturns the id of the service descriptor for this service. This id can be used to help locate theServiceDescriptorContractfor this service which includes more detailed information on this service.- Specified by:
getServiceDescriptorIdin interfaceServiceInfoContract- Returns:
- the id of the service descriptor for this service, will only return a null value if the service has not yet been published
-
getChecksum
Description copied from interface:ServiceInfoContractReturns a checksum value for theServiceConfigurationstored in theServiceDescriptorContractfor this service. This allows for fast comparison of services during various registry operations.- Specified by:
getChecksumin interfaceServiceInfoContract- Returns:
- the checksum for this service, should never return a null or blank value
-
getVersionNumber
Deprecated.Description copied from interface:ServiceInfoContractDeprecated value which previously stored version number for optimistic locking purposes. Optimistic locking was never really necessary for service info. This method will always return 1.- Specified by:
getVersionNumberin interfaceServiceInfoContract- Specified by:
getVersionNumberin interfaceVersioned- Returns:
- 1
-
setServiceId
-
setServiceName
-
setEndpointUrl
-
setInstanceId
-
setApplicationId
-
setServerIpAddress
-
setType
-
setServiceVersion
-
setStatus
-
setServiceDescriptorId
-
setChecksum
-
setVersionNumber
Deprecated.version number is no longer usedVersion number is deprecated, so this method does nothing.
-