1 19 20 package com.sslexplorer.agent.client; 21 22 import java.io.File ; 23 import java.util.Enumeration ; 24 import java.util.Vector ; 25 26 import com.sslexplorer.agent.client.util.Utils; 27 28 29 34 public class AgentConfiguration { 35 36 protected String guiClassName; 38 protected boolean displayInformationPopups = true; 39 protected boolean remoteTunnelsRequireConfirmation = false; 40 protected int shutdownPeriod = 10000; 41 protected boolean systemExitOnDisconnect = false; 42 protected int webForwardInactivity = 300000; protected int tunnelInactivity = 600000; protected String agentType = "sslexplorerAgent"; 45 protected boolean getResources = true; 46 protected boolean cleanonExit = false; 47 protected File cacheDir = new File (Utils.getHomeDirectory(), ".sslexplorer"); 48 protected Vector removeFiles = new Vector (); 49 protected int keepAlivePeriod = 30000; 50 protected int keepAliveTimeout = 30000; 51 protected String localhostAddress = "127.0.0.1"; 52 53 61 public String getLocalhostAddress() { 62 return localhostAddress; 63 } 64 65 73 public void setLocalhostAddress(String localhostAddress) { 74 this.localhostAddress = localhostAddress; 75 } 76 77 85 public String getAgentType() { 86 return agentType; 87 } 88 89 97 public void setAgentType(String agentType) { 98 this.agentType = agentType; 99 } 100 101 107 public void setGetResources(boolean getResources) { 108 this.getResources = getResources; 109 } 110 111 117 public boolean isGetResources() { 118 return getResources; 119 } 120 121 127 public void setWebForwardInactivity(int webForwardInactivity) { 128 this.webForwardInactivity = webForwardInactivity; 129 } 130 131 137 public void setTunnelInactivity(int tunnelInactivity) { 138 this.tunnelInactivity = tunnelInactivity; 139 } 140 141 147 public int getWebForwardInactivity() { 148 return webForwardInactivity; 149 } 150 151 157 public int getTunnelInactivity() { 158 return tunnelInactivity; 159 } 160 161 168 public boolean isDisplayInformationPopups() { 169 return displayInformationPopups; 170 } 171 172 179 public void setDisplayInformationPopups(boolean displayInformationPopups) { 180 this.displayInformationPopups = displayInformationPopups; 181 } 182 183 188 public String getGUIClass() { 189 return guiClassName; 190 } 191 192 197 public void setGUIClass(String guiClassName) { 198 this.guiClassName = guiClassName; 199 } 200 201 207 public boolean isRemoteTunnelsRequireConfirmation() { 208 return remoteTunnelsRequireConfirmation; 209 } 210 211 217 public void setRemoteTunnelsRequireConfirmation(boolean remoteTunnelsRequireConfirmation) { 218 this.remoteTunnelsRequireConfirmation = remoteTunnelsRequireConfirmation; 219 } 220 221 226 public int getShutdownPeriod() { 227 return shutdownPeriod; 228 } 229 230 235 public void setShutdownPeriod(int shutdownPeriod) { 236 this.shutdownPeriod = shutdownPeriod; 237 } 238 239 245 public boolean isSystemExitOnDisconnect() { 246 return systemExitOnDisconnect; 247 } 248 249 255 public void setSystemExitOnDisconnect(boolean systemExitOnDisconnect) { 256 this.systemExitOnDisconnect = systemExitOnDisconnect; 257 } 258 259 268 public boolean isCleanOnExit() { 269 return cleanonExit; 270 } 271 272 281 public void setCleanOnExit(boolean cleanonExit) { 282 this.cleanonExit = cleanonExit; 283 } 284 285 291 public void setCacheDir(File cacheDir) { 292 this.cacheDir = cacheDir; 293 } 294 295 301 public File getCacheDir() { 302 return cacheDir; 303 } 304 305 311 public int getKeepAlivePeriod() { 312 return keepAlivePeriod; 313 } 314 315 321 public void setKeepAlivePeriod(int keepAlivePeriod) { 322 this.keepAlivePeriod = keepAlivePeriod; 323 } 324 325 330 public void removeFileOnExit(File f) { 331 removeFiles.addElement(f); 332 } 333 334 public Enumeration getFilesToRemove() { 335 return removeFiles.elements(); 336 } 337 338 343 public int getKeepAliveTimeout() { 344 return keepAliveTimeout; 345 } 346 347 352 public void setKeepAliveTimeout(int keepAliveTimeout) { 353 this.keepAliveTimeout = keepAliveTimeout; 354 } 355 356 } 357 | Popular Tags |