org.kuali.rice.ksb.api.registry
Class ServiceInfo.Builder

java.lang.Object
  extended by 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:
Serialized Form

Method Summary
 ServiceInfo build()
          Returns an instance of the object being built by this builder based on the current state of the builder.
static ServiceInfo.Builder create()
           
static ServiceInfo.Builder create(ServiceInfoContract contract)
           
 String getApplicationId()
          Returns the id of the application that published and owns the service.
 String getChecksum()
          Returns a checksum value for the ServiceConfiguration stored in the ServiceDescriptorContract for this service.
 String getEndpointUrl()
          Returns the URL of the service as a string.
 String getInstanceId()
          Returns the id of the instance that published and owns the service.
 String getServerIpAddress()
          Return the IP address of the server on which the application is running which published and owns the service.
 String getServiceDescriptorId()
          Returns the id of the service descriptor for this service.
 String getServiceId()
          Returns the identifier for the service.
 QName getServiceName()
          Returns the name of the service as a qualified name consisting of a namespace and a name.
 String getServiceVersion()
          Returns the version information of this service.
 ServiceEndpointStatus getStatus()
          Return the status of the service endpoint represented by this service.
 String getType()
          Returns the type of this service.
 Long getVersionNumber()
          Returns the version number for this object.
 void setApplicationId(String applicationId)
           
 void setChecksum(String checksum)
           
 void setEndpointUrl(String endpointUrl)
           
 void setInstanceId(String instanceId)
           
 void setServerIpAddress(String serverIpAddress)
           
 void setServiceDescriptorId(String serviceDescriptorId)
           
 void setServiceId(String serviceId)
           
 void setServiceName(QName serviceName)
           
 void setServiceVersion(String serviceVersion)
           
 void setStatus(ServiceEndpointStatus status)
           
 void setType(String type)
           
 void setVersionNumber(Long versionNumber)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

create

public static ServiceInfo.Builder create()

create

public static ServiceInfo.Builder create(ServiceInfoContract contract)

build

public ServiceInfo build()
Description copied from interface: ModelBuilder
Returns an instance of the object being built by this builder based on the current state of the builder. It should be possible to invoke this method more than once on the same builder. It should never return null;

Specified by:
build in interface ModelBuilder
Returns:
an instance of the object being built by this builder, should never return null

getServiceId

public String getServiceId()
Description copied from interface: ServiceInfoContract
Returns the identifier for the service.

Specified by:
getServiceId in interface ServiceInfoContract
Returns:
the identifier for the service, will only be null if the service has not yet been published to the registry

getServiceName

public QName getServiceName()
Description copied from interface: ServiceInfoContract
Returns the name of the service as a qualified name consisting of a namespace and a name.

Specified by:
getServiceName in interface ServiceInfoContract
Returns:
the name of the service, should never be null

getEndpointUrl

public String getEndpointUrl()
Description copied from interface: ServiceInfoContract
Returns the URL of the service as a string.

Specified by:
getEndpointUrl in interface ServiceInfoContract
Returns:
the url of the service, should never be null or blank

getInstanceId

public String getInstanceId()
Description copied from interface: ServiceInfoContract
Returns the id of the instance that published and owns the service.

Specified by:
getInstanceId in interface ServiceInfoContract
Returns:
the instance id of this service, should never be null or blank

getApplicationId

public String getApplicationId()
Description copied from interface: ServiceInfoContract
Returns the id of the application that published and owns the service.

Specified by:
getApplicationId in interface ServiceInfoContract
Returns:
the application id of this service, should never be null or blank

getServerIpAddress

public String getServerIpAddress()
Description copied from interface: ServiceInfoContract
Return 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:
getServerIpAddress in interface ServiceInfoContract
Returns:
the IP address of this service, should never be null or blank

getType

public String getType()
Description copied from interface: ServiceInfoContract
Returns 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:
getType in interface ServiceInfoContract
Returns:
the type of this service, should never be null or blank

getServiceVersion

public String getServiceVersion()
Description copied from interface: ServiceInfoContract
Returns 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 is CoreConstants.Versions#UNSPECIFIED.

Specified by:
getServiceVersion in interface ServiceInfoContract
Returns:
the version of this service, or CoreConstants.Versions#UNSPECIFIED if no version has been secified, should never return a null or blank value

getStatus

public ServiceEndpointStatus getStatus()
Description copied from interface: ServiceInfoContract
Return the status of the service endpoint represented by this service.

Specified by:
getStatus in interface ServiceInfoContract
Returns:
the status of this service

getServiceDescriptorId

public String getServiceDescriptorId()
Description copied from interface: ServiceInfoContract
Returns the id of the service descriptor for this service. This id can be used to help locate the ServiceDescriptorContract for this service which includes more detailed information on this service.

Specified by:
getServiceDescriptorId in interface ServiceInfoContract
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

public String getChecksum()
Description copied from interface: ServiceInfoContract
Returns a checksum value for the ServiceConfiguration stored in the ServiceDescriptorContract for this service. This allows for fast comparison of services during various registry operations.

Specified by:
getChecksum in interface ServiceInfoContract
Returns:
the checksum for this service, should never return a null or blank value

getVersionNumber

public Long getVersionNumber()
Description copied from interface: Versioned
Returns the version number for this object. In general, this value should only be null if the object has not yet been stored to a persistent data store. This version number is generally used for the purposes of optimistic locking.

Specified by:
getVersionNumber in interface Versioned
Returns:
the version number, or null if one has not been assigned yet

setServiceId

public void setServiceId(String serviceId)

setServiceName

public void setServiceName(QName serviceName)

setEndpointUrl

public void setEndpointUrl(String endpointUrl)

setInstanceId

public void setInstanceId(String instanceId)

setApplicationId

public void setApplicationId(String applicationId)

setServerIpAddress

public void setServerIpAddress(String serverIpAddress)

setType

public void setType(String type)

setServiceVersion

public void setServiceVersion(String serviceVersion)

setStatus

public void setStatus(ServiceEndpointStatus status)

setServiceDescriptorId

public void setServiceDescriptorId(String serviceDescriptorId)

setChecksum

public void setChecksum(String checksum)

setVersionNumber

public void setVersionNumber(Long versionNumber)


Copyright © 2005-2014 The Kuali Foundation. All Rights Reserved.