1 /** 2 * Copyright 2005-2015 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.bus; 17 18 import java.io.Serializable; 19 import java.net.URL; 20 21 import javax.xml.namespace.QName; 22 23 import org.kuali.rice.core.api.security.credentials.CredentialsType; 24 25 /** 26 * An interface which defines common configuration information for all services. 27 * Specific implementations might add additional configuration attributes which 28 * are appropriate for their given domain or service configuration method. 29 * 30 * @author Kuali Rice Team (rice.collab@kuali.org) 31 * 32 */ 33 public interface ServiceConfiguration extends Serializable { 34 35 /** 36 * Returns the qualified name for this service. 37 * 38 * @return the qualified name for this service, should never be null 39 */ 40 QName getServiceName(); 41 42 /** 43 * Returns the URL of the endpoint which provides this service. 44 * 45 * @return the endpoint URL of the service, should never be null 46 */ 47 URL getEndpointUrl(); 48 49 /** 50 * Returns the id of the specific instance of the application which owns this service. 51 * 52 * @return the id of the specific instance of the application which owns this service, should never 53 * be null 54 */ 55 String getInstanceId(); 56 57 /** 58 * Returns the id of the application which owns this service. 59 * 60 * @return the id of the application which owns this service, should never 61 * be null 62 */ 63 String getApplicationId(); 64 65 /** 66 * Returns the version of this service. 67 * 68 * @return the version of this service, should never be null 69 */ 70 String getServiceVersion(); 71 72 /** 73 * Returns the type of this service. 74 * 75 * @return the type of this service, should never be null 76 */ 77 String getType(); 78 79 /** 80 * Return true if this service uses queue-style messaging, false if it uses 81 * topic-style messaging. 82 * 83 * @return true if this service uses queue-style messaging, false if it uses 84 * topic-style messaging 85 */ 86 boolean isQueue(); 87 88 /** 89 * Returns the processing priority for messages that are sent to this service. 90 * 91 * @return the message processing priority for this service 92 */ 93 Integer getPriority(); 94 95 /** 96 * Returns the retry attempts to use when processing messages sent to this 97 * service. 98 * 99 * @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 }