| Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
| ServiceInfoContract |
|
| 1.0;1 |
| 1 | package org.kuali.rice.ksb.api.registry; | |
| 2 | ||
| 3 | import javax.xml.namespace.QName; | |
| 4 | ||
| 5 | import org.kuali.rice.core.api.CoreConstants; | |
| 6 | import org.kuali.rice.core.api.mo.common.Versioned; | |
| 7 | import org.kuali.rice.ksb.api.bus.ServiceConfiguration; | |
| 8 | ||
| 9 | /** | |
| 10 | * Defines the contract for information about a service that is published in | |
| 11 | * the {@link ServiceRegistry}. | |
| 12 | * | |
| 13 | * @see ServiceRegistry | |
| 14 | * | |
| 15 | * @author Kuali Rice Team (rice.collab@kuali.org) | |
| 16 | * | |
| 17 | */ | |
| 18 | public interface ServiceInfoContract extends Versioned { | |
| 19 | ||
| 20 | /** | |
| 21 | * Returns the identifier for the service. | |
| 22 | * | |
| 23 | * @return the identifier for the service, will only be null if the | |
| 24 | * service has not yet been published to the registry | |
| 25 | */ | |
| 26 | public String getServiceId(); | |
| 27 | ||
| 28 | /** | |
| 29 | * Returns the name of the service as a qualified name consisting of a | |
| 30 | * namespace and a name. | |
| 31 | * | |
| 32 | * @return the name of the service, should never be null | |
| 33 | */ | |
| 34 | public QName getServiceName(); | |
| 35 | ||
| 36 | /** | |
| 37 | * Returns the URL of the service as a string. | |
| 38 | * | |
| 39 | * @return the url of the service, should never be null or blank | |
| 40 | */ | |
| 41 | public String getEndpointUrl(); | |
| 42 | ||
| 43 | /** | |
| 44 | * Returns the id of the instance that published and owns the service. | |
| 45 | * | |
| 46 | * @return the instance id of this service, should never be null or blank | |
| 47 | */ | |
| 48 | public String getInstanceId(); | |
| 49 | ||
| 50 | /** | |
| 51 | * Returns the id of the application that published and owns the service. | |
| 52 | * | |
| 53 | * @return the application id of this service, should never be null or blank | |
| 54 | */ | |
| 55 | public String getApplicationId(); | |
| 56 | ||
| 57 | /** | |
| 58 | * Return the IP address of the server on which the application is running which | |
| 59 | * published and owns the service. This value could be either an IPv4 or | |
| 60 | * IPv6 address, but it should never return a null or empty string. | |
| 61 | * | |
| 62 | * @return the IP address of this service, should never be null or blank | |
| 63 | */ | |
| 64 | public String getServerIpAddress(); | |
| 65 | ||
| 66 | /** | |
| 67 | * Returns the type of this service. Will generally distinguish the format | |
| 68 | * of the data being brokered by the service (i.e. SOAP, REST, Java | |
| 69 | * Serialization, etc.) | |
| 70 | * | |
| 71 | * @return the type of this service, should never be null or blank | |
| 72 | */ | |
| 73 | public String getType(); | |
| 74 | ||
| 75 | /** | |
| 76 | * Returns the version information of this service. The publisher of the | |
| 77 | * service can use any value they choose for the service versions. | |
| 78 | * However, there is one standard version which represents a service | |
| 79 | * without any version information, and that is {@link CoreConstants.Versions#UNSPECIFIED}. | |
| 80 | * | |
| 81 | * @return the version of this service, or {@link CoreConstants.Versions#UNSPECIFIED} | |
| 82 | * if no version has been secified, should never return a null or blank value | |
| 83 | */ | |
| 84 | public String getServiceVersion(); | |
| 85 | ||
| 86 | /** | |
| 87 | * Return the status of the service endpoint represented by this service. | |
| 88 | * | |
| 89 | * @return the status of this service | |
| 90 | */ | |
| 91 | public ServiceEndpointStatus getStatus(); | |
| 92 | ||
| 93 | /** | |
| 94 | * Returns the id of the service descriptor for this service. This id can | |
| 95 | * be used to help locate the {@link ServiceDescriptorContract} for this | |
| 96 | * service which includes more detailed information on this service. | |
| 97 | * | |
| 98 | * @return the id of the service descriptor for this service, will only return | |
| 99 | * a null value if the service has not yet been published | |
| 100 | */ | |
| 101 | public String getServiceDescriptorId(); | |
| 102 | ||
| 103 | /** | |
| 104 | * Returns a checksum value for the {@link ServiceConfiguration} stored in the | |
| 105 | * {@link ServiceDescriptorContract} for this service. This allows for fast | |
| 106 | * comparison of services during various registry operations. | |
| 107 | * | |
| 108 | * @return the checksum for this service, should never return a null or blank value | |
| 109 | */ | |
| 110 | public String getChecksum(); | |
| 111 | ||
| 112 | } |