1 /* 2 * Copyright 2001-2004 The Apache Software Foundation. 3 * 4 * Licensed under the Apache 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.apache.org/licenses/LICENSE-2.0 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 javax.xml.rpc.handler; 17 18 import javax.xml.namespace.QName; 19 import java.io.Serializable; 20 21 /** 22 * The <code>javax.xml.rpc.handler.HandlerRegistry</code> 23 * provides support for the programmatic configuration of 24 * handlers in a <code>HandlerRegistry</code>. 25 * <p> 26 * A handler chain is registered per service endpoint, as 27 * indicated by the qualified name of a port. The getHandlerChain 28 * returns the handler chain (as a java.util.List) for the 29 * specified service endpoint. The returned handler chain is 30 * configured using the java.util.List interface. Each element 31 * in this list is required to be of the Java type 32 * <code>javax.xml.rpc.handler.HandlerInfo</code> 33 * 34 * @version 1.0 35 */ 36 public interface HandlerRegistry extends Serializable { 37 38 /** 39 * Gets the handler chain for the specified service endpoint. 40 * The returned <code>List</code> is used to configure this 41 * specific handler chain in this <code>HandlerRegistry</code>. 42 * Each element in this list is required to be of the Java type 43 * <code>javax.xml.rpc.handler.HandlerInfo</code>. 44 * 45 * @param portName Qualified name of the target service 46 * @return HandlerChain java.util.List Handler chain 47 * @throws java.lang.IllegalArgumentException If an invalid <code>portName</code> is specified 48 */ 49 public java.util.List getHandlerChain(QName portName); 50 51 /** 52 * Sets the handler chain for the specified service endpoint 53 * as a <code>java.util.List</code>. Each element in this list 54 * is required to be of the Java type 55 * <code>javax.xml.rpc.handler.HandlerInfo</code>. 56 * 57 * @param portName Qualified name of the target service endpoint 58 * @param chain a List representing configuration for the 59 * handler chain 60 * @throws javax.xml.rpc.JAXRPCException if there is any error in the 61 * configuration of the handler chain 62 * @throws java.lang.UnsupportedOperationException if this 63 * set operation is not supported. This is done to 64 * avoid any overriding of a pre-configured handler 65 * chain. 66 * @throws java.lang.IllegalArgumentException If an invalid 67 * <code>portName</code> is specified 68 */ 69 public abstract void setHandlerChain(QName portName, java.util.List chain); 70 } 71 72