HttpForwardProxyConfig.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.utils.transport.http;

  21. import java.io.Serializable;

  22. /**
  23.  * ForwardProxyConfigurazione
  24.  *
  25.  *
  26.  * @author Poli Andrea (apoli@link.it)
  27.  * @author $Author$
  28.  * @version $Rev$, $Date$
  29.  */
  30. public class HttpForwardProxyConfig implements Serializable {

  31.    
  32.     /**
  33.      *
  34.      */
  35.     private static final long serialVersionUID = 1L;
  36.    
  37.     protected String header;
  38.     protected boolean headerBase64 = true;
  39.     protected String query;
  40.     protected boolean queryBase64 = true;
  41.    
  42.     public HttpForwardProxyConfig() {
  43.         // nop
  44.     }
  45.    
  46.     @Override
  47.     public String toString(){
  48.         return this.toString("\n");
  49.     }
  50.     public String toString(String separator){
  51.         StringBuilder sb = new StringBuilder();
  52.         if(this.header!=null) {
  53.             sb.append("header: ").append(this.header);
  54.             sb.append(separator).append("header-base64: ").append(this.headerBase64);
  55.         }
  56.         if(this.query!=null) {
  57.             if(sb.length()>0) {
  58.                 sb.append(separator);
  59.             }
  60.             sb.append("query: ").append(this.query);
  61.             sb.append(separator).append("query-base64: ").append(this.queryBase64);
  62.         }
  63.         return sb.toString();
  64.     }  
  65.    
  66.     public String getHeader() {
  67.         return this.header;
  68.     }

  69.     public void setHeader(String header) {
  70.         this.header = header;
  71.     }

  72.     public boolean isHeaderBase64() {
  73.         return this.headerBase64;
  74.     }

  75.     public void setHeaderBase64(boolean headerBase64) {
  76.         this.headerBase64 = headerBase64;
  77.     }

  78.     public String getQuery() {
  79.         return this.query;
  80.     }

  81.     public void setQuery(String query) {
  82.         this.query = query;
  83.     }

  84.     public boolean isQueryBase64() {
  85.         return this.queryBase64;
  86.     }

  87.     public void setQueryBase64(boolean queryBase64) {
  88.         this.queryBase64 = queryBase64;
  89.     }
  90.    
  91. }