1 23 package com.sun.enterprise.webservice; 24 25 import java.util.ArrayList ; 26 import java.util.HashMap ; 27 import java.util.List ; 28 import java.util.Map ; 29 30 import javax.xml.ws.handler.Handler; 31 import javax.xml.ws.handler.HandlerResolver; 32 import javax.xml.ws.handler.PortInfo; 33 34 37 public class HandlerResolverImpl implements HandlerResolver { 38 39 private Map <PortInfo, List <Handler>> chainMap; 40 41 public HandlerResolverImpl() { 42 chainMap = new HashMap <PortInfo, List <Handler>>(); 43 } 44 45 public List <Handler> getHandlerChain(PortInfo info) { 46 List <Handler> chain = chainMap.get(info); 47 if (chain == null) { 48 chain = new ArrayList <Handler>(); 49 } 50 return chain; 51 } 52 53 public void setHandlerChain(PortInfo info, List <Handler> chain) { 54 List <Handler> currentList = chainMap.get(info); 55 if(currentList!=null && currentList.isEmpty()) { 56 chainMap.put(info, chain); 57 } else { 58 currentList.addAll(chain); 59 } 60 } 61 } 62 | Popular Tags |