FileDocCategorySizeDatePackage
WebServiceHandlerChain.javaAPI DocGlassfish v2 API4857Fri May 04 22:31:24 BST 2007com.sun.enterprise.deployment

WebServiceHandlerChain

public class WebServiceHandlerChain extends Descriptor
Represents a single handler-chains in a webservice in webservices.xml

Fields Summary
private LinkedList
handlers
private String
protocolBinding
private String
serviceNamePattern
private String
portNamePattern
Constructors Summary
public WebServiceHandlerChain(WebServiceHandlerChain other)

    
    // copy constructor
       
	super(other);
        this.protocolBinding = other.protocolBinding;
        this.serviceNamePattern = other.serviceNamePattern;
        this.portNamePattern = other.portNamePattern;
	if (other.handlers != null) {
            handlers = new LinkedList();
	    for (Iterator i = other.handlers.iterator(); i.hasNext();) {
		WebServiceHandler wsh = (WebServiceHandler)i.next();
		handlers.addLast(new WebServiceHandler(wsh));
	    }
	} else {
	    handlers = null;
	}
    
public WebServiceHandlerChain()

        handlers = new LinkedList();
    
Methods Summary
public voidaddHandler(WebServiceHandler handler)
Append handler to end of handler chain for this endpoint.

        handlers.addLast(handler);
        super.changed();
    
public java.util.ListgetHandlers()
Get ordered list of WebServiceHandler handlers for this endpoint.

        return handlers;
    
public java.lang.StringgetPortNamePattern()

        return portNamePattern;
    
public java.lang.StringgetProtocolBindings()

        return protocolBinding;
    
public java.lang.StringgetServiceNamePattern()

        return serviceNamePattern;
    
public booleanhasHandlers()

return
true if this endpoint has at least one handler in its handler chain.

        return ( handlers.size() > 0 );
    
public voidremoveHandler(WebServiceHandler handler)

        handlers.remove(handler);
        super.changed();
    
public voidremoveHandlerByName(java.lang.String handlerName)

        for(Iterator iter = handlers.iterator(); iter.hasNext();) {
            WebServiceHandler next = (WebServiceHandler) iter.next();
            if( next.getHandlerName().equals(handlerName) ) {
                iter.remove();
                super.changed();
                break;
            }
        }
    
public voidsetPortNamePattern(java.lang.String pattern)

        portNamePattern = pattern;
        super.changed();
    
public voidsetProtocolBindings(java.lang.String bindingId)

        protocolBinding = bindingId;
        super.changed();
    
public voidsetServiceNamePattern(java.lang.String pattern)

        serviceNamePattern = pattern;
        super.changed();