package com.ejie.w43df.pid.header;

import java.util.ArrayList;
import java.util.List;

import javax.xml.ws.handler.Handler;
import javax.xml.ws.handler.HandlerResolver;
import javax.xml.ws.handler.PortInfo;


public class W43dfHeaderHandlerResolver implements HandlerResolver {
	
	private String securityToken = null;
	
	public W43dfHeaderHandlerResolver(String securityToken) {
		this.securityToken = securityToken;		
	}

	@SuppressWarnings("rawtypes")
	public List<Handler> getHandlerChain(PortInfo portInfo) {
		List<Handler> handlerChain = new ArrayList<Handler>();
		W43dfHeaderHandler hh = null;
		try{
			hh = new W43dfHeaderHandler(securityToken);
			handlerChain.add(hh);
		} catch (Exception e) {
			// TODO Tratar la excepcion
			e.printStackTrace();
		}					
		return handlerChain;
	}
}

	
	