ConsegnaContenutiApplicativiMessage.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.mdb;

  21. import org.openspcoop2.pdd.config.RichiestaApplicativa;
  22. import org.openspcoop2.pdd.config.RichiestaDelegata;
  23. import org.openspcoop2.pdd.core.PdDContext;
  24. import org.openspcoop2.pdd.core.behaviour.BehaviourLoadBalancer;
  25. import org.openspcoop2.pdd.core.state.OpenSPCoopStateless;
  26. import org.openspcoop2.protocol.sdk.Busta;

  27. /**
  28.  * Classe utilizzata per raccogliere informazioni incluse in un MessaggioJMS.
  29.  * Il messaggio JMS sara' poi ricevuto, attraverso una coda apposita,
  30.  * dal mdb definito nella classe {@link ConsegnaContenutiApplicativiMDB}.
  31.  *
  32.  *
  33.  * @author Poli Andrea (apoli@link.it)
  34.  * @author $Author$
  35.  * @version $Rev$, $Date$
  36.  */

  37. public class ConsegnaContenutiApplicativiMessage implements GenericMessage {


  38.     /**
  39.      * serialVersionUID
  40.      */
  41.     private static final long serialVersionUID = 1L;

  42.     /* ********  F I E L D S  P R I V A T I  ******** */

  43.     // RichiesteApplicative di invocazione servizio:
  44.     /** Identificatore Porta Applicativa  */
  45.     private RichiestaApplicativa richiestaApplicativa;

  46.     // RichiesteDelegata: Consegna contenuti applicativi e consegna risposta asincrona simmetrica:
  47.     private RichiestaDelegata richiestaDelegata;

  48.     /** Busta che ha causato l'invocazione. */
  49.     private Busta busta;

  50.     /** Indicazione se siamo in modalita oneway11 */
  51.     private boolean oneWayVersione11;

  52.     /** OpenSPCoop state */
  53.     private OpenSPCoopStateless openspcoopstate = null;

  54.     /** Indicazione se la porta delegata/applicativa richiesta una modalita stateless (oneway o sincrono)
  55.      *  Il caso oneway11 possiedera questo booleano con il valore false.
  56.      * */
  57.     private boolean stateless;

  58.     /** Tipologia di porta di domino del soggetto mittente */
  59.     private String implementazionePdDSoggettoMittente;
  60.     /** Tipologia di porta di domino del soggetto destinatario */
  61.     private String implementazionePdDSoggettoDestinatario;
  62.    
  63.     /** PdDContext */
  64.     private PdDContext pddContext;

  65.     /**
  66.      * Behaviour
  67.      */
  68.     private ConsegnaContenutiApplicativiBehaviourMessage behaviour = null;
  69.     private BehaviourLoadBalancer loadBalancer;
  70.    

  71.     /* ********  C O S T R U T T O R E  ******** */
  72.    
  73.     /**
  74.      * Costruttore.
  75.      *
  76.      *
  77.      */
  78.     public ConsegnaContenutiApplicativiMessage(){
  79.     }




  80.     /* ********  S E T T E R   ******** */

  81.     // RichiesteApplicative di invocazione servizio:
  82.     /**
  83.      * Imposta l'identificatore della Porta Applicativa di tipo {@link org.openspcoop2.pdd.config.RichiestaApplicativa}
  84.      *
  85.      * @param idpa Identificatore della Porta Applicativa
  86.      *
  87.      */
  88.     public void setRichiestaApplicativa(RichiestaApplicativa idpa){
  89.         this.richiestaApplicativa = idpa;
  90.     }

  91.     // RichiesteDelegata: Consegna contenuti applicativi:
  92.     /**
  93.      * Imposta l'identificatore della Porta Delegata di tipo {@link org.openspcoop2.pdd.config.RichiestaDelegata}
  94.      *
  95.      * @param idpd Identificatore della Porta Delegata
  96.      *
  97.      */
  98.     public void setRichiestaDelegata(RichiestaDelegata idpd){
  99.         this.richiestaDelegata = idpd;
  100.     }

  101.     /**
  102.      * Imposta la Busta che ha causato l'invocazione di servizio.
  103.      *
  104.      * @param aBusta Busta .
  105.      *
  106.      */
  107.     public void setBusta(Busta aBusta){
  108.         this.busta = aBusta;
  109.     }

  110.     /**
  111.      * @param oneWayVersione11
  112.      */
  113.     public void setOneWayVersione11(boolean oneWayVersione11) {
  114.         this.oneWayVersione11 = oneWayVersione11;
  115.     }


  116.     public void setOpenspcoopstate(OpenSPCoopStateless openspcoopstate) {
  117.         this.openspcoopstate = openspcoopstate;
  118.     }

  119.     public void setStateless(boolean stateless) {
  120.         this.stateless = stateless;
  121.     }

  122.     public void setImplementazionePdDSoggettoMittente(
  123.             String implementazionePdDSoggettoMittente) {
  124.         this.implementazionePdDSoggettoMittente = implementazionePdDSoggettoMittente;
  125.     }

  126.     public void setImplementazionePdDSoggettoDestinatario(
  127.             String implementazionePdDSoggettoDestinatario) {
  128.         this.implementazionePdDSoggettoDestinatario = implementazionePdDSoggettoDestinatario;
  129.     }

  130.     public void setPddContext(PdDContext pddContext) {
  131.         this.pddContext = pddContext;
  132.     }
  133.    
  134.     public void setBehaviour(ConsegnaContenutiApplicativiBehaviourMessage behaviour) {
  135.         this.behaviour = behaviour;
  136.     }
  137.    
  138.     public void setLoadBalancer(BehaviourLoadBalancer loadBalancer) {
  139.         this.loadBalancer = loadBalancer;
  140.     }
  141.    


  142.     /* ********  G E T T E R   ******** */

  143.     // RichiesteApplicative di invocazione servizio:
  144.     /**
  145.      * Ritorna l'identificatore della Porta Applicativa di tipo {@link org.openspcoop2.pdd.config.RichiestaApplicativa}
  146.      *
  147.      * @return Identificatore della Porta Applicativa
  148.      *
  149.      */
  150.     public RichiestaApplicativa getRichiestaApplicativa(){
  151.         return this.richiestaApplicativa;
  152.     }


  153.     // RichiesteDelegata: Consegna contenuti applicativi:
  154.     /**
  155.      * Ritorna l'identificatore della Porta Delegata
  156.      *
  157.      * @return Identificatore della Porta Delegata
  158.      *
  159.      */
  160.     public RichiestaDelegata getRichiestaDelegata(){
  161.         return this.richiestaDelegata;
  162.     }

  163.     /**
  164.      * Ritorna la Busta che ha causato l'invocazione di servizio.
  165.      *
  166.      * @return Busta .
  167.      *
  168.      */
  169.     public Busta getBusta(){
  170.         return this.busta;
  171.     }


  172.     public OpenSPCoopStateless getOpenspcoopstate() {
  173.         return this.openspcoopstate;
  174.     }

  175.     /**
  176.      * @return indicazione se stiamo gestendo oneway in modalita stateless 1.4
  177.      */
  178.     public boolean isOneWayVersione11() {
  179.         return this.oneWayVersione11;
  180.     }

  181.     public boolean isStateless() {
  182.         return this.stateless;
  183.     }

  184.     public String getImplementazionePdDSoggettoMittente() {
  185.         return this.implementazionePdDSoggettoMittente;
  186.     }

  187.     public String getImplementazionePdDSoggettoDestinatario() {
  188.         return this.implementazionePdDSoggettoDestinatario;
  189.     }
  190.    
  191.     @Override
  192.     public PdDContext getPddContext() {
  193.         return this.pddContext;
  194.     }
  195.    
  196.     public ConsegnaContenutiApplicativiBehaviourMessage getBehaviour() {
  197.         return this.behaviour;
  198.     }

  199.     public BehaviourLoadBalancer getLoadBalancer() {
  200.         return this.loadBalancer;
  201.     }

  202. }