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