001 /**
002 * Copyright 2005-2013 The Kuali Foundation
003 *
004 * Licensed under the Educational Community License, Version 2.0 (the "License");
005 * you may not use this file except in compliance with the License.
006 * You may obtain a copy of the License at
007 *
008 * http://www.opensource.org/licenses/ecl2.php
009 *
010 * Unless required by applicable law or agreed to in writing, software
011 * distributed under the License is distributed on an "AS IS" BASIS,
012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 * See the License for the specific language governing permissions and
014 * limitations under the License.
015 */
016 package org.kuali.rice.ksb.api.registry;
017
018 import javax.xml.namespace.QName;
019
020 import org.kuali.rice.core.api.CoreConstants;
021 import org.kuali.rice.core.api.mo.common.Versioned;
022 import org.kuali.rice.ksb.api.bus.ServiceConfiguration;
023
024 /**
025 * Defines the contract for information about a service that is published in
026 * the {@link ServiceRegistry}.
027 *
028 * @see ServiceRegistry
029 *
030 * @author Kuali Rice Team (rice.collab@kuali.org)
031 *
032 */
033 public interface ServiceInfoContract extends Versioned {
034
035 /**
036 * Returns the identifier for the service.
037 *
038 * @return the identifier for the service, will only be null if the
039 * service has not yet been published to the registry
040 */
041 public String getServiceId();
042
043 /**
044 * Returns the name of the service as a qualified name consisting of a
045 * namespace and a name.
046 *
047 * @return the name of the service, should never be null
048 */
049 public QName getServiceName();
050
051 /**
052 * Returns the URL of the service as a string.
053 *
054 * @return the url of the service, should never be null or blank
055 */
056 public String getEndpointUrl();
057
058 /**
059 * Returns the id of the instance that published and owns the service.
060 *
061 * @return the instance id of this service, should never be null or blank
062 */
063 public String getInstanceId();
064
065 /**
066 * Returns the id of the application that published and owns the service.
067 *
068 * @return the application id of this service, should never be null or blank
069 */
070 public String getApplicationId();
071
072 /**
073 * Return the IP address of the server on which the application is running which
074 * published and owns the service. This value could be either an IPv4 or
075 * IPv6 address, but it should never return a null or empty string.
076 *
077 * @return the IP address of this service, should never be null or blank
078 */
079 public String getServerIpAddress();
080
081 /**
082 * Returns the type of this service. Will generally distinguish the format
083 * of the data being brokered by the service (i.e. SOAP, REST, Java
084 * Serialization, etc.)
085 *
086 * @return the type of this service, should never be null or blank
087 */
088 public String getType();
089
090 /**
091 * Returns the version information of this service. The publisher of the
092 * service can use any value they choose for the service versions.
093 * However, there is one standard version which represents a service
094 * without any version information, and that is {@link CoreConstants.Versions#UNSPECIFIED}.
095 *
096 * @return the version of this service, or {@link CoreConstants.Versions#UNSPECIFIED}
097 * if no version has been secified, should never return a null or blank value
098 */
099 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 }