1 18 19 package org.apache.jmeter.protocol.tcp.config; 20 21 import java.io.Serializable ; 22 23 import org.apache.jmeter.config.ConfigTestElement; 24 import org.apache.jmeter.protocol.tcp.sampler.TCPSampler; 25 26 29 public class TCPConfig extends ConfigTestElement implements Serializable 30 { 31 32 public TCPConfig() 33 { 34 } 35 36 public void setServer(String newServer) 37 { 38 this.setProperty(TCPSampler.SERVER, newServer); 39 } 40 public String getServer() 41 { 42 return getPropertyAsString(TCPSampler.SERVER); 43 } 44 45 public void setPort(String newPort) 46 { 47 this.setProperty(TCPSampler.PORT, newPort); 48 } 49 public int getPort() 50 { 51 return getPropertyAsInt(TCPSampler.PORT); 52 } 53 54 public void setFilename(String newFilename) 55 { 56 this.setProperty(TCPSampler.FILENAME, newFilename); 57 } 58 public String getFilename() 59 { 60 return getPropertyAsString(TCPSampler.FILENAME); 61 } 62 63 64 71 public String getLabel() 72 { 73 return ("tcp://" + this.getServer() + ":" + this.getPort()); 74 } 75 } 76 | Popular Tags |