FileDocCategorySizeDatePackage
TCPAdapterList.javaAPI DocExample4246Tue May 29 16:57:10 BST 2007com.sun.xml.ws.transport.tcp.server

TCPAdapterList

public final class TCPAdapterList extends AbstractList implements com.sun.xml.ws.transport.http.DeploymentDescriptorParser.AdapterFactory
author
jax-ws team

Fields Summary
private final List
adapters
private final Map
addressMap
Constructors Summary
Methods Summary
public TCPAdaptercreateAdapter(java.lang.String name, java.lang.String urlPattern, com.sun.xml.ws.api.server.WSEndpoint endpoint)

    
    // TODO: documented because it's used by AS
               
        final TCPAdapter tcpAdapter = new TCPAdapter(name, urlPattern, endpoint);
        adapters.add(tcpAdapter);
        final WSDLPort port = endpoint.getPort();
        if (port != null) {
            addressMap.put(port.getName().getLocalPart(), getValidPath(urlPattern));
        }
        return tcpAdapter;
    
protected com.sun.xml.ws.api.server.PortAddressResolvercreatePortAddressResolver(java.lang.String baseAddress)
Creates a PortAddressResolver that maps portname to its address

        return new PortAddressResolver() {
            public String getAddressFor(QName serviceName, @NotNull String portName) {
                final String urlPattern = addressMap.get(portName);
                return (urlPattern == null) ? null : baseAddress+urlPattern;
            }
        };
    
public TCPAdapterget(int index)

        return adapters.get(index);
    
private java.lang.StringgetValidPath(java.lang.String urlPattern)

return
urlPattern without "/*"

        if (urlPattern.endsWith("/*")) {
            return urlPattern.substring(0, urlPattern.length() - 2);
        } else {
            return urlPattern;
        }
    
public intsize()

        return adapters.size();