001 /*
002 * Licensed to the Apache Software Foundation (ASF) under one
003 * or more contributor license agreements. See the NOTICE file
004 * distributed with this work for additional information
005 * regarding copyright ownership. The ASF licenses this file
006 * to you under the Apache License, Version 2.0 (the
007 * "License"); you may not use this file except in compliance
008 * with the License. You may obtain a copy of the License at
009 *
010 * http://www.apache.org/licenses/LICENSE-2.0
011 *
012 * Unless required by applicable law or agreed to in writing,
013 * software distributed under the License is distributed on an
014 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
015 * KIND, either express or implied. See the License for the
016 * specific language governing permissions and limitations
017 * under the License.
018 */
019
020 package javax.xml.rpc.handler;
021
022 import javax.xml.namespace.QName;
023 import java.io.Serializable;
024
025 /**
026 * The <code>javax.xml.rpc.handler.HandlerRegistry</code>
027 * provides support for the programmatic configuration of
028 * handlers in a <code>HandlerRegistry</code>.
029 * <p>
030 * A handler chain is registered per service endpoint, as
031 * indicated by the qualified name of a port. The getHandlerChain
032 * returns the handler chain (as a java.util.List) for the
033 * specified service endpoint. The returned handler chain is
034 * configured using the java.util.List interface. Each element
035 * in this list is required to be of the Java type
036 * <code>javax.xml.rpc.handler.HandlerInfo</code>
037 *
038 * @version $Rev: 467553 $ $Date: 2006-10-25 00:01:51 -0400 (Wed, 25 Oct 2006) $
039 */
040 public interface HandlerRegistry extends Serializable {
041
042 /**
043 * Gets the handler chain for the specified service endpoint.
044 * The returned <code>List</code> is used to configure this
045 * specific handler chain in this <code>HandlerRegistry</code>.
046 * Each element in this list is required to be of the Java type
047 * <code>javax.xml.rpc.handler.HandlerInfo</code>.
048 *
049 * @param portName Qualified name of the target service
050 * @return HandlerChain java.util.List Handler chain
051 * @throws java.lang.IllegalArgumentException If an invalid <code>portName</code> is specified
052 */
053 public java.util.List getHandlerChain(QName portName);
054
055 /**
056 * Sets the handler chain for the specified service endpoint
057 * as a <code>java.util.List</code>. Each element in this list
058 * is required to be of the Java type
059 * <code>javax.xml.rpc.handler.HandlerInfo</code>.
060 *
061 * @param portName Qualified name of the target service endpoint
062 * @param chain a List representing configuration for the
063 * handler chain
064 * @throws javax.xml.rpc.JAXRPCException if there is any error in the
065 * configuration of the handler chain
066 * @throws java.lang.UnsupportedOperationException if this
067 * set operation is not supported. This is done to
068 * avoid any overriding of a pre-configured handler
069 * chain.
070 * @throws java.lang.IllegalArgumentException If an invalid
071 * <code>portName</code> is specified
072 */
073 public abstract void setHandlerChain(QName portName, java.util.List chain);
074 }
075