JMSObject.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;

  21. import javax.jms.Connection;
  22. import javax.jms.Session;

  23. /**
  24.  * Classe utilizzata per raccogliere le risorse ottenute da un broker JMS.
  25.  *
  26.  * @author Poli Andrea (apoli@link.it)
  27.  * @author $Author$
  28.  * @version $Rev$, $Date$
  29.  */

  30. public class JMSObject implements java.io.Serializable  {
  31.    
  32.      /**
  33.      * serialVersionUID
  34.      */
  35.     private static final long serialVersionUID = 1L;
  36.    
  37.     /* ********  F I E L D S  P R I V A T I  ******** */
  38.    
  39.     private Connection connection;
  40.     private Session session;
  41.    



  42.     /* ********  C O S T R U T T O R E  ******** */
  43.    
  44.     /**
  45.      * Costruttore.
  46.      *
  47.      *
  48.      */
  49.     public JMSObject(){}
  50.    
  51.    



  52.     /* ********  S E T T E R   ******** */
  53.     /**
  54.      * Imposta la connessione JMS.
  55.      *
  56.      * @param con Connessione JMS.
  57.      *
  58.      */    
  59.     public void setConnection(Connection con) {
  60.     this.connection = con;
  61.     }
  62.     /**
  63.      * Imposta la sessione JMS.
  64.      *
  65.      * @param s Sessione JMS.
  66.      *
  67.      */    
  68.     public void setSession(Session s) {
  69.     this.session = s;
  70.     }
  71.    


  72.     /* ********  G E T T E R   ******** */
  73.     /**
  74.      * Ritorna la connessione JMS.
  75.      *
  76.      * @return Connessione JMS.
  77.      *
  78.      */    
  79.     public Connection getConnection() {
  80.     return this.connection;
  81.     }
  82.     /**
  83.      * Ritorna la sessione JMS.
  84.      *
  85.      * @return Sessione JMS.
  86.      *
  87.      */    
  88.     public Session getSession() {
  89.     return this.session;
  90.     }
  91. }