| ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Provides convienient way to send commands to test server.
ITestAsset asset = ....;
ServerURL url = new ServerURL( asset ); // construct URL to communicate with test server
url.setCommand("myCommand"); // set a command to execute at server in request string
url.addParameter("myParameter" , "myValue"); // add string parameter to command in request string. (optional )
InputStream in = url.openStream(); // open stream and read response from server
| Field Summary | |
private final static Category | LOG |
private String | myCommand |
private String | myRequestString |
private URL | myServer |
private String | myStringRepresentation |
| Constructor Summary | |
ServerURL(ITestAssetRO asset, String refid)Creates a new server URL for given asset and reference id. | |
ServerURL(ITestAssetRO asset)Creates new server URL for given asset | |
| Method Summary | |
void | addParameter(String key, String value)Adds a parameter (a key-value pair) to the URL |
URL | getServer()Returns the URL of the server |
InputStream | openStream()Returns the input stream of this server URL |
void | setCommand(String command)Sets the command in this server URL. |
String | toString()Converts the string representation of this URL. |
| Field Detail |
private final static Category LOG
private String myCommand
private String myRequestString
private URL myServer
private String myStringRepresentation
| Constructor Detail |
public ServerURL(ITestAssetRO asset, String refid)
public ServerURL(ITestAssetRO asset)
| Method Detail |
public void addParameter(String key, String value)
public URL getServer()
public InputStream openStream()
throws java.io.IOException
public void setCommand(String command)
public String toString()
| Association Links |
to Class java.lang.String
to Class java.lang.String
to Class java.net.URL
| ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||