PddPluginLoader.java

  1. /*
  2.  * GovWay - A customizable API Gateway
  3.  * https://govway.org
  4.  *
  5.  * Copyright (c) 2005-2025 Link.it srl (https://link.it).
  6.  *
  7.  * This program is free software: you can redistribute it and/or modify
  8.  * it under the terms of the GNU General Public License version 3, as published by
  9.  * the Free Software Foundation.
  10.  *
  11.  * This program is distributed in the hope that it will be useful,
  12.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14.  * GNU General Public License for more details.
  15.  *
  16.  * You should have received a copy of the GNU General Public License
  17.  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  18.  *
  19.  */

  20. package org.openspcoop2.pdd.config.dynamic;

  21. import org.openspcoop2.core.commons.CoreException;
  22. import org.openspcoop2.core.config.constants.PluginCostanti;
  23. import org.openspcoop2.core.config.driver.DriverConfigurazioneException;
  24. import org.openspcoop2.core.config.driver.DriverConfigurazioneNotFound;
  25. import org.openspcoop2.core.plugins.constants.TipoPlugin;
  26. import org.openspcoop2.monitor.engine.dynamic.CorePluginLoader;
  27. import org.openspcoop2.monitor.engine.dynamic.IPluginLoader;
  28. import org.openspcoop2.monitor.engine.dynamic.PluginLoader;
  29. import org.openspcoop2.pdd.config.ClassNameProperties;
  30. import org.openspcoop2.pdd.config.ConfigurazionePdDManager;
  31. import org.openspcoop2.pdd.core.autenticazione.pa.IAutenticazionePortaApplicativa;
  32. import org.openspcoop2.pdd.core.autenticazione.pd.IAutenticazionePortaDelegata;
  33. import org.openspcoop2.pdd.core.autorizzazione.pa.IAutorizzazioneContenutoPortaApplicativa;
  34. import org.openspcoop2.pdd.core.autorizzazione.pa.IAutorizzazionePortaApplicativa;
  35. import org.openspcoop2.pdd.core.autorizzazione.pd.IAutorizzazioneContenutoPortaDelegata;
  36. import org.openspcoop2.pdd.core.autorizzazione.pd.IAutorizzazionePortaDelegata;
  37. import org.openspcoop2.pdd.core.behaviour.IBehaviour;
  38. import org.openspcoop2.pdd.core.connettori.IConnettore;
  39. import org.openspcoop2.pdd.core.controllo_traffico.plugins.IRateLimiting;
  40. import org.openspcoop2.pdd.core.handlers.ExitHandler;
  41. import org.openspcoop2.pdd.core.handlers.InRequestHandler;
  42. import org.openspcoop2.pdd.core.handlers.InRequestProtocolHandler;
  43. import org.openspcoop2.pdd.core.handlers.InResponseHandler;
  44. import org.openspcoop2.pdd.core.handlers.InitHandler;
  45. import org.openspcoop2.pdd.core.handlers.IntegrationManagerRequestHandler;
  46. import org.openspcoop2.pdd.core.handlers.IntegrationManagerResponseHandler;
  47. import org.openspcoop2.pdd.core.handlers.OutRequestHandler;
  48. import org.openspcoop2.pdd.core.handlers.OutResponseHandler;
  49. import org.openspcoop2.pdd.core.handlers.PostOutRequestHandler;
  50. import org.openspcoop2.pdd.core.handlers.PostOutResponseHandler;
  51. import org.openspcoop2.pdd.core.handlers.PreInRequestHandler;
  52. import org.openspcoop2.pdd.core.handlers.PreInResponseHandler;
  53. import org.openspcoop2.pdd.core.integrazione.IGestoreIntegrazionePA;
  54. import org.openspcoop2.pdd.core.integrazione.IGestoreIntegrazionePD;
  55. import org.openspcoop2.pdd.core.token.attribute_authority.IRetrieveAttributeAuthorityResponseParser;
  56. import org.openspcoop2.pdd.core.token.parser.IDynamicDiscoveryParser;
  57. import org.openspcoop2.pdd.core.token.parser.INegoziazioneTokenParser;
  58. import org.openspcoop2.pdd.core.token.parser.ITokenParser;
  59. import org.openspcoop2.utils.NameValue;

  60. /**
  61.  * PluginLoader
  62.  *
  63.  * @author Poli Andrea (apoli@link.it)
  64.  * @author $Author$
  65.  * @version $Rev$, $Date$
  66.  */
  67. public class PddPluginLoader extends PluginLoader implements IPluginLoader {

  68.     public static PddPluginLoader getInstance() {
  69.         return (PddPluginLoader) CorePluginLoader.getInstance();
  70.     }
  71.    
  72.    
  73.     private ClassNameProperties className = null;
  74.     private ConfigurazionePdDManager configPdDManager = null;
  75.    
  76.     public PddPluginLoader() {
  77.         super();
  78.         this.className = ClassNameProperties.getInstance();
  79.         this.configPdDManager = ConfigurazionePdDManager.getInstance();
  80.     }
  81.    

  82.    
  83.     // UTILITY
  84.    
  85.     public String getPluginClassName(TipoPlugin tipoPlugin, String tipo, NameValue ... filtri) throws DriverConfigurazioneException {
  86.         return this.getPluginClassName(tipoPlugin.getValue(), tipo, filtri);
  87.     }
  88.     public String getPluginClassName(String tipoPlugin, String tipo, NameValue ... filtri) throws DriverConfigurazioneException {
  89.         if(this.isPluginManagerEnabled()) {
  90.             try {
  91.                 if(filtri!=null && filtri.length>0) {
  92.                     return this.configPdDManager.getPluginClassNameByFilter(tipoPlugin, tipo, filtri);
  93.                 }
  94.                 else {
  95.                     return this.configPdDManager.getPluginClassName(tipoPlugin, tipo);
  96.                 }
  97.             }catch(DriverConfigurazioneNotFound notFound) {
  98.                 return null;
  99.             }
  100.         }
  101.         return null;
  102.     }
  103.     public Class<?> getPddDynamicClass(String className, TipoPlugin tipoPlugin, String tipo, NameValue ... filtri) throws CoreException {
  104.         return getPddDynamicClass(className, tipoPlugin.getValue(), tipo, filtri);
  105.     }
  106.     public Class<?> getPddDynamicClass(String className, String tipoPlugin, String tipo, NameValue ... filtri) throws CoreException {
  107.         StringBuilder sFiltro = new StringBuilder();
  108.         if(filtri!=null && filtri.length>0) {
  109.             for (int i = 0; i < filtri.length; i++) {
  110.                 NameValue filtro = filtri[i];
  111.                 sFiltro.append(" filter-").append(i).append(" '").append(filtro.toString()).append("'");
  112.             }
  113.         }
  114.         if(className==null) {
  115.             try {
  116.                 className = getPluginClassName(tipoPlugin, tipo, filtri);
  117.             }catch(Exception e) {
  118.                 throw new CoreException("Class not found in registry ("+super.getObjectName(tipoPlugin)+" type '"+tipo+"' "+sFiltro.toString()+"): "+e.getMessage(),e);
  119.             }
  120.         }
  121.         if(className==null) {
  122.             throw new CoreException("Class not found in registry ("+super.getObjectName(tipoPlugin)+" type '"+tipo+"' "+sFiltro.toString()+")");
  123.         }
  124.         return super.getDynamicClass(className, tipoPlugin, tipo);
  125.     }
  126.    
  127.    
  128.     // TIPI DI PLUGINS
  129.    
  130.     public IConnettore newConnettore(String tipo) throws CoreException {
  131.         String classNameRegistered = this.className.getConnettore(tipo);
  132.         Class<?> c = getPddDynamicClass(classNameRegistered, TipoPlugin.CONNETTORE, tipo);
  133.         return (IConnettore) newInstance(c, TipoPlugin.CONNETTORE, tipo);
  134.     }

  135.     public IAutenticazionePortaDelegata newAutenticazionePortaDelegata(String tipo) throws CoreException {
  136.         String classNameRegistered = this.className.getAutenticazionePortaDelegata(tipo);
  137.         NameValue nv = new NameValue(PluginCostanti.FILTRO_RUOLO_NOME, PluginCostanti.FILTRO_RUOLO_VALORE_FRUIZIONE);
  138.         Class<?> c = getPddDynamicClass(classNameRegistered, TipoPlugin.AUTENTICAZIONE, tipo, nv);
  139.         return (IAutenticazionePortaDelegata) newInstance(c, TipoPlugin.AUTENTICAZIONE, tipo);
  140.     }
  141.    
  142.     public IAutenticazionePortaApplicativa newAutenticazionePortaApplicativa(String tipo) throws CoreException {
  143.         String classNameRegistered = this.className.getAutenticazionePortaApplicativa(tipo);
  144.         NameValue nv = new NameValue(PluginCostanti.FILTRO_RUOLO_NOME, PluginCostanti.FILTRO_RUOLO_VALORE_EROGAZIONE);
  145.         Class<?> c = getPddDynamicClass(classNameRegistered, TipoPlugin.AUTENTICAZIONE, tipo, nv);
  146.         return (IAutenticazionePortaApplicativa) newInstance(c, TipoPlugin.AUTENTICAZIONE, tipo);
  147.     }
  148.    
  149.     public IAutorizzazionePortaDelegata newAutorizzazionePortaDelegata(String tipo) throws CoreException {
  150.         String classNameRegistered = this.className.getAutorizzazionePortaDelegata(tipo);
  151.         NameValue nv = new NameValue(PluginCostanti.FILTRO_RUOLO_NOME, PluginCostanti.FILTRO_RUOLO_VALORE_FRUIZIONE);
  152.         Class<?> c = getPddDynamicClass(classNameRegistered, TipoPlugin.AUTORIZZAZIONE, tipo, nv);
  153.         return (IAutorizzazionePortaDelegata) newInstance(c, TipoPlugin.AUTORIZZAZIONE, tipo);
  154.     }
  155.    
  156.     public IAutorizzazionePortaApplicativa newAutorizzazionePortaApplicativa(String tipo) throws CoreException {
  157.         String classNameRegistered = this.className.getAutorizzazionePortaApplicativa(tipo);
  158.         NameValue nv = new NameValue(PluginCostanti.FILTRO_RUOLO_NOME, PluginCostanti.FILTRO_RUOLO_VALORE_EROGAZIONE);
  159.         Class<?> c = getPddDynamicClass(classNameRegistered, TipoPlugin.AUTORIZZAZIONE, tipo, nv);
  160.         return (IAutorizzazionePortaApplicativa) newInstance(c, TipoPlugin.AUTORIZZAZIONE, tipo);
  161.     }
  162.    
  163.     public IAutorizzazioneContenutoPortaDelegata newAutorizzazioneContenutiPortaDelegata(String tipo) throws CoreException {
  164.         String classNameRegistered = this.className.getAutorizzazioneContenutoPortaDelegata(tipo);
  165.         NameValue nv = new NameValue(PluginCostanti.FILTRO_RUOLO_NOME, PluginCostanti.FILTRO_RUOLO_VALORE_FRUIZIONE);
  166.         Class<?> c = getPddDynamicClass(classNameRegistered, TipoPlugin.AUTORIZZAZIONE_CONTENUTI, tipo, nv);
  167.         return (IAutorizzazioneContenutoPortaDelegata) newInstance(c, TipoPlugin.AUTORIZZAZIONE_CONTENUTI, tipo);
  168.     }
  169.    
  170.     public IAutorizzazioneContenutoPortaApplicativa newAutorizzazioneContenutiPortaApplicativa(String tipo) throws CoreException {
  171.         String classNameRegistered = this.className.getAutorizzazioneContenutoPortaApplicativa(tipo);
  172.         NameValue nv = new NameValue(PluginCostanti.FILTRO_RUOLO_NOME, PluginCostanti.FILTRO_RUOLO_VALORE_EROGAZIONE);
  173.         Class<?> c = getPddDynamicClass(classNameRegistered, TipoPlugin.AUTORIZZAZIONE_CONTENUTI, tipo, nv);
  174.         return (IAutorizzazioneContenutoPortaApplicativa) newInstance(c, TipoPlugin.AUTORIZZAZIONE_CONTENUTI, tipo);
  175.     }
  176.    
  177.     public IGestoreIntegrazionePD newIntegrazionePortaDelegata(String tipo) throws CoreException {
  178.         String classNameRegistered = this.className.getIntegrazionePortaDelegata(tipo);
  179.         NameValue nv = new NameValue(PluginCostanti.FILTRO_RUOLO_NOME, PluginCostanti.FILTRO_RUOLO_VALORE_FRUIZIONE);
  180.         Class<?> c = getPddDynamicClass(classNameRegistered, TipoPlugin.INTEGRAZIONE, tipo, nv);
  181.         return (IGestoreIntegrazionePD) newInstance(c, TipoPlugin.INTEGRAZIONE, tipo);
  182.     }
  183.    
  184.     public IGestoreIntegrazionePA newIntegrazionePortaApplicativa(String tipo) throws CoreException {
  185.         String classNameRegistered = this.className.getIntegrazionePortaApplicativa(tipo);
  186.         NameValue nv = new NameValue(PluginCostanti.FILTRO_RUOLO_NOME, PluginCostanti.FILTRO_RUOLO_VALORE_EROGAZIONE);
  187.         Class<?> c = getPddDynamicClass(classNameRegistered, TipoPlugin.INTEGRAZIONE, tipo, nv);
  188.         return (IGestoreIntegrazionePA) newInstance(c, TipoPlugin.INTEGRAZIONE, tipo);
  189.     }
  190.    
  191.     public InitHandler newInitHandler(String tipo) throws CoreException {
  192.         String classNameRegistered = this.className.getInitHandler(tipo);
  193.         NameValue nv = new NameValue(PluginCostanti.FILTRO_SERVICE_HANDLER_NOME, PluginCostanti.FILTRO_SERVICE_HANDLER_VALORE_INIT);
  194.         Class<?> c = getPddDynamicClass(classNameRegistered, TipoPlugin.SERVICE_HANDLER, tipo, nv);
  195.         return (InitHandler) newInstance(c, TipoPlugin.SERVICE_HANDLER, tipo);
  196.     }
  197.    
  198.     public ExitHandler newExitHandler(String tipo) throws CoreException {
  199.         String classNameRegistered = this.className.getExitHandler(tipo);
  200.         NameValue nv = new NameValue(PluginCostanti.FILTRO_SERVICE_HANDLER_NOME, PluginCostanti.FILTRO_SERVICE_HANDLER_VALORE_EXIT);
  201.         Class<?> c = getPddDynamicClass(classNameRegistered, TipoPlugin.SERVICE_HANDLER, tipo, nv);
  202.         return (ExitHandler) newInstance(c, TipoPlugin.SERVICE_HANDLER, tipo);
  203.     }
  204.    
  205.     public IntegrationManagerRequestHandler newIntegrationManagerRequestHandler(String tipo) throws CoreException {
  206.         String classNameRegistered = this.className.getIntegrationManagerRequestHandler(tipo);
  207.         NameValue nv = new NameValue(PluginCostanti.FILTRO_SERVICE_HANDLER_NOME, PluginCostanti.FILTRO_SERVICE_HANDLER_VALORE_INTEGRATION_MANAGER_REQUEST);
  208.         Class<?> c = getPddDynamicClass(classNameRegistered, TipoPlugin.SERVICE_HANDLER, tipo, nv);
  209.         return (IntegrationManagerRequestHandler) newInstance(c, TipoPlugin.SERVICE_HANDLER, tipo);
  210.     }
  211.    
  212.     public IntegrationManagerResponseHandler newIntegrationManagerResponseHandler(String tipo) throws CoreException {
  213.         String classNameRegistered = this.className.getIntegrationManagerResponseHandler(tipo);
  214.         NameValue nv = new NameValue(PluginCostanti.FILTRO_SERVICE_HANDLER_NOME, PluginCostanti.FILTRO_SERVICE_HANDLER_VALORE_INTEGRATION_MANAGER_RESPONSE);
  215.         Class<?> c = getPddDynamicClass(classNameRegistered, TipoPlugin.SERVICE_HANDLER, tipo, nv);
  216.         return (IntegrationManagerResponseHandler) newInstance(c, TipoPlugin.SERVICE_HANDLER, tipo);
  217.     }
  218.    
  219.     public PreInRequestHandler newPreInRequestHandler(String tipo) throws CoreException {
  220.         String classNameRegistered = this.className.getPreInRequestHandler(tipo);
  221.         NameValue fase = new NameValue(PluginCostanti.FILTRO_FASE_MESSAGE_HANDLER_NOME, PluginCostanti.FILTRO_FASE_MESSAGE_HANDLER_VALORE_PRE_IN);
  222.         NameValue ruolo = new NameValue(PluginCostanti.FILTRO_RUOLO_MESSAGE_HANDLER_NOME, PluginCostanti.FILTRO_RUOLO_MESSAGE_HANDLER_VALORE_RICHIESTA);
  223.         Class<?> c = getPddDynamicClass(classNameRegistered, TipoPlugin.MESSAGE_HANDLER, tipo, fase, ruolo);
  224.         return (PreInRequestHandler) newInstance(c, TipoPlugin.MESSAGE_HANDLER, tipo);
  225.     }
  226.    
  227.     public InRequestHandler newInRequestHandler(String tipo) throws CoreException {
  228.         String classNameRegistered = this.className.getInRequestHandler(tipo);
  229.         NameValue fase = new NameValue(PluginCostanti.FILTRO_FASE_MESSAGE_HANDLER_NOME, PluginCostanti.FILTRO_FASE_MESSAGE_HANDLER_VALORE_IN);
  230.         NameValue ruolo = new NameValue(PluginCostanti.FILTRO_RUOLO_MESSAGE_HANDLER_NOME, PluginCostanti.FILTRO_RUOLO_MESSAGE_HANDLER_VALORE_RICHIESTA);
  231.         Class<?> c = getPddDynamicClass(classNameRegistered, TipoPlugin.MESSAGE_HANDLER, tipo, fase, ruolo);
  232.         return (InRequestHandler) newInstance(c, TipoPlugin.MESSAGE_HANDLER, tipo);
  233.     }
  234.    
  235.     public InRequestProtocolHandler newInRequestProtocolHandler(String tipo) throws CoreException {
  236.         String classNameRegistered = this.className.getInRequestProtocolHandler(tipo);
  237.         NameValue fase = new NameValue(PluginCostanti.FILTRO_FASE_MESSAGE_HANDLER_NOME, PluginCostanti.FILTRO_FASE_MESSAGE_HANDLER_VALORE_IN_PROTOCOL_INFO);
  238.         NameValue ruolo = new NameValue(PluginCostanti.FILTRO_RUOLO_MESSAGE_HANDLER_NOME, PluginCostanti.FILTRO_RUOLO_MESSAGE_HANDLER_VALORE_RICHIESTA);
  239.         Class<?> c = getPddDynamicClass(classNameRegistered, TipoPlugin.MESSAGE_HANDLER, tipo, fase, ruolo);
  240.         return (InRequestProtocolHandler) newInstance(c, TipoPlugin.MESSAGE_HANDLER, tipo);
  241.     }
  242.    
  243.     public OutRequestHandler newOutRequestHandler(String tipo) throws CoreException {
  244.         String classNameRegistered = this.className.getOutRequestHandler(tipo);
  245.         NameValue fase = new NameValue(PluginCostanti.FILTRO_FASE_MESSAGE_HANDLER_NOME, PluginCostanti.FILTRO_FASE_MESSAGE_HANDLER_VALORE_OUT);
  246.         NameValue ruolo = new NameValue(PluginCostanti.FILTRO_RUOLO_MESSAGE_HANDLER_NOME, PluginCostanti.FILTRO_RUOLO_MESSAGE_HANDLER_VALORE_RICHIESTA);
  247.         Class<?> c = getPddDynamicClass(classNameRegistered, TipoPlugin.MESSAGE_HANDLER, tipo, fase, ruolo);
  248.         return (OutRequestHandler) newInstance(c, TipoPlugin.MESSAGE_HANDLER, tipo);
  249.     }
  250.    
  251.     public PostOutRequestHandler newPostOutRequestHandler(String tipo) throws CoreException {
  252.         String classNameRegistered = this.className.getPostOutRequestHandler(tipo);
  253.         NameValue fase = new NameValue(PluginCostanti.FILTRO_FASE_MESSAGE_HANDLER_NOME, PluginCostanti.FILTRO_FASE_MESSAGE_HANDLER_VALORE_POST_OUT);
  254.         NameValue ruolo = new NameValue(PluginCostanti.FILTRO_RUOLO_MESSAGE_HANDLER_NOME, PluginCostanti.FILTRO_RUOLO_MESSAGE_HANDLER_VALORE_RICHIESTA);
  255.         Class<?> c = getPddDynamicClass(classNameRegistered, TipoPlugin.MESSAGE_HANDLER, tipo, fase, ruolo);
  256.         return (PostOutRequestHandler) newInstance(c, TipoPlugin.MESSAGE_HANDLER, tipo);
  257.     }
  258.    
  259.     public PreInResponseHandler newPreInResponseHandler(String tipo) throws CoreException {
  260.         String classNameRegistered = this.className.getPreInResponseHandler(tipo);
  261.         NameValue fase = new NameValue(PluginCostanti.FILTRO_FASE_MESSAGE_HANDLER_NOME, PluginCostanti.FILTRO_FASE_MESSAGE_HANDLER_VALORE_PRE_IN);
  262.         NameValue ruolo = new NameValue(PluginCostanti.FILTRO_RUOLO_MESSAGE_HANDLER_NOME, PluginCostanti.FILTRO_RUOLO_MESSAGE_HANDLER_VALORE_RISPOSTA);
  263.         Class<?> c = getPddDynamicClass(classNameRegistered, TipoPlugin.MESSAGE_HANDLER, tipo, fase, ruolo);
  264.         return (PreInResponseHandler) newInstance(c, TipoPlugin.MESSAGE_HANDLER, tipo);
  265.     }
  266.    
  267.     public InResponseHandler newInResponseHandler(String tipo) throws CoreException {
  268.         String classNameRegistered = this.className.getInResponseHandler(tipo);
  269.         NameValue fase = new NameValue(PluginCostanti.FILTRO_FASE_MESSAGE_HANDLER_NOME, PluginCostanti.FILTRO_FASE_MESSAGE_HANDLER_VALORE_IN);
  270.         NameValue ruolo = new NameValue(PluginCostanti.FILTRO_RUOLO_MESSAGE_HANDLER_NOME, PluginCostanti.FILTRO_RUOLO_MESSAGE_HANDLER_VALORE_RISPOSTA);
  271.         Class<?> c = getPddDynamicClass(classNameRegistered, TipoPlugin.MESSAGE_HANDLER, tipo, fase, ruolo);
  272.         return (InResponseHandler) newInstance(c, TipoPlugin.MESSAGE_HANDLER, tipo);
  273.     }
  274.    
  275.     public OutResponseHandler newOutResponseHandler(String tipo) throws CoreException {
  276.         String classNameRegistered = this.className.getOutResponseHandler(tipo);
  277.         NameValue fase = new NameValue(PluginCostanti.FILTRO_FASE_MESSAGE_HANDLER_NOME, PluginCostanti.FILTRO_FASE_MESSAGE_HANDLER_VALORE_OUT);
  278.         NameValue ruolo = new NameValue(PluginCostanti.FILTRO_RUOLO_MESSAGE_HANDLER_NOME, PluginCostanti.FILTRO_RUOLO_MESSAGE_HANDLER_VALORE_RISPOSTA);
  279.         Class<?> c = getPddDynamicClass(classNameRegistered, TipoPlugin.MESSAGE_HANDLER, tipo, fase, ruolo);
  280.         return (OutResponseHandler) newInstance(c, TipoPlugin.MESSAGE_HANDLER, tipo);
  281.     }
  282.    
  283.     public PostOutResponseHandler newPostOutResponseHandler(String tipo) throws CoreException {
  284.         String classNameRegistered = this.className.getPostOutResponseHandler(tipo);
  285.         NameValue fase = new NameValue(PluginCostanti.FILTRO_FASE_MESSAGE_HANDLER_NOME, PluginCostanti.FILTRO_FASE_MESSAGE_HANDLER_VALORE_POST_OUT);
  286.         NameValue ruolo = new NameValue(PluginCostanti.FILTRO_RUOLO_MESSAGE_HANDLER_NOME, PluginCostanti.FILTRO_RUOLO_MESSAGE_HANDLER_VALORE_RISPOSTA);
  287.         Class<?> c = getPddDynamicClass(classNameRegistered, TipoPlugin.MESSAGE_HANDLER, tipo, fase, ruolo);
  288.         return (PostOutResponseHandler) newInstance(c, TipoPlugin.MESSAGE_HANDLER, tipo);
  289.     }
  290.    
  291.     public IBehaviour newBehaviour(String tipo) throws CoreException {
  292.         String classNameRegistered = this.className.getBehaviour(tipo);
  293.         Class<?> c = getPddDynamicClass(classNameRegistered, TipoPlugin.BEHAVIOUR, tipo);
  294.         return (IBehaviour) newInstance(c, TipoPlugin.BEHAVIOUR, tipo);
  295.     }
  296.    
  297.     public IRateLimiting newRateLimiting(String tipo) throws CoreException {
  298.         String classNameRegistered = this.className.getRateLimiting(tipo);
  299.         Class<?> c = getPddDynamicClass(classNameRegistered, TipoPlugin.RATE_LIMITING, tipo);
  300.         return (IRateLimiting) newInstance(c, TipoPlugin.RATE_LIMITING, tipo);
  301.     }
  302.    
  303.     public IDynamicDiscoveryParser newDynamicDiscovery(String tipo) throws CoreException {
  304.         String classNameRegistered = this.className.getTokenDynamicDiscovery(tipo);
  305.         Class<?> c = getPddDynamicClass(classNameRegistered, TipoPlugin.TOKEN_DYNAMIC_DISCOVERY, tipo);
  306.         return (IDynamicDiscoveryParser) newInstance(c, TipoPlugin.TOKEN_DYNAMIC_DISCOVERY, tipo);
  307.     }
  308.    
  309.     public ITokenParser newTokenValidazione(String tipo) throws CoreException {
  310.         String classNameRegistered = this.className.getTokenValidazione(tipo);
  311.         Class<?> c = getPddDynamicClass(classNameRegistered, TipoPlugin.TOKEN_VALIDAZIONE, tipo);
  312.         return (ITokenParser) newInstance(c, TipoPlugin.TOKEN_VALIDAZIONE, tipo);
  313.     }
  314.    
  315.     public INegoziazioneTokenParser newTokenNegoziazione(String tipo) throws CoreException {
  316.         String classNameRegistered = this.className.getTokenNegoziazione(tipo);
  317.         Class<?> c = getPddDynamicClass(classNameRegistered, TipoPlugin.TOKEN_NEGOZIAZIONE, tipo);
  318.         return (INegoziazioneTokenParser) newInstance(c, TipoPlugin.TOKEN_NEGOZIAZIONE, tipo);
  319.     }
  320.    
  321.     public IRetrieveAttributeAuthorityResponseParser newAttributeAuthority(String tipo) throws CoreException {
  322.         String classNameRegistered = this.className.getAttributeAuthority(tipo);
  323.         Class<?> c = getPddDynamicClass(classNameRegistered, TipoPlugin.ATTRIBUTE_AUTHORITY, tipo);
  324.         return (IRetrieveAttributeAuthorityResponseParser) newInstance(c, TipoPlugin.ATTRIBUTE_AUTHORITY, tipo);
  325.     }
  326.    
  327. }