001/** 002 * Copyright 2005-2016 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 */ 016package org.kuali.rice.ksb.api.bus; 017 018import java.io.Serializable; 019import java.net.URL; 020 021import javax.xml.namespace.QName; 022 023import org.kuali.rice.core.api.security.credentials.CredentialsType; 024 025/** 026 * An interface which defines common configuration information for all services. 027 * Specific implementations might add additional configuration attributes which 028 * are appropriate for their given domain or service configuration method. 029 * 030 * @author Kuali Rice Team (rice.collab@kuali.org) 031 * 032 */ 033public interface ServiceConfiguration extends Serializable { 034 035 /** 036 * Returns the qualified name for this service. 037 * 038 * @return the qualified name for this service, should never be null 039 */ 040 QName getServiceName(); 041 042 /** 043 * Returns the URL of the endpoint which provides this service. 044 * 045 * @return the endpoint URL of the service, should never be null 046 */ 047 URL getEndpointUrl(); 048 049 /** 050 * Returns the id of the specific instance of the application which owns this service. 051 * 052 * @return the id of the specific instance of the application which owns this service, should never 053 * be null 054 */ 055 String getInstanceId(); 056 057 /** 058 * Returns the id of the application which owns this service. 059 * 060 * @return the id of the application which owns this service, should never 061 * be null 062 */ 063 String getApplicationId(); 064 065 /** 066 * Returns the version of this service. 067 * 068 * @return the version of this service, should never be null 069 */ 070 String getServiceVersion(); 071 072 /** 073 * Returns the type of this service. 074 * 075 * @return the type of this service, should never be null 076 */ 077 String getType(); 078 079 /** 080 * Return true if this service uses queue-style messaging, false if it uses 081 * topic-style messaging. 082 * 083 * @return true if this service uses queue-style messaging, false if it uses 084 * topic-style messaging 085 */ 086 boolean isQueue(); 087 088 /** 089 * Returns the processing priority for messages that are sent to this service. 090 * 091 * @return the message processing priority for this service 092 */ 093 Integer getPriority(); 094 095 /** 096 * Returns the retry attempts to use when processing messages sent to this 097 * service. 098 * 099 * @return the retry attempts for this service 100 */ 101 Integer getRetryAttempts(); 102 103 /** 104 * Returns the maximum amount of milliseconds a message to this service can 105 * live and attempt to be processed successfully by this service before it's 106 * forced into processing by it's exception handler. 107 * 108 * @return the maximum lifetime for this message, if null then this message has 109 * an infinite lifetime 110 */ 111 Long getMillisToLive(); 112 113 /** 114 * Returns the name of the exception handler to invoke whenever messages to 115 * this service fail to be sent. If null, the default message exception 116 * handler will be used. 117 * 118 * @return the name of the message exception handler for this service, or 119 * null if the default handler should be used 120 */ 121 String getMessageExceptionHandler(); 122 123 /** 124 * Returns true if this service is secured by standard KSB security features. 125 * 126 * @return true if this service is secured, false otherwise 127 */ 128 Boolean getBusSecurity(); 129 130 /** 131 * Returns the type of security credentials that should be used when 132 * attempting to authorize access to this service. 133 * 134 * @return the type of security credentials to use when access this service 135 */ 136 CredentialsType getCredentialsType(); 137 138 /** 139 * Returns whether the service is secured with basic authentication 140 * 141 * @since 2.1.3 142 */ 143 Boolean isBasicAuthentication(); 144}