Test webapp

adriani.webapp.util
Class ClientThread

java.lang.Object
  extended by adriani.webapp.util.ClientThread
All Implemented Interfaces:
java.lang.Runnable

public class ClientThread
extends java.lang.Object
implements java.lang.Runnable

Class implementing the Runnable interface and used by the test_concurrent.jsp page to verify the behaviour or web services under concurrent invocations.


Field Summary
 SimpleHTTPClient client
          The SOAP client calling the service using HTTP transport
 int index
          The integer index of this Thread, as created by the JSP page.
protected  java.lang.String leadingName
          The leading name of each message logged on the STDOUT.
 java.lang.String param
          The string value to be used for the soap input request.
 java.lang.StringBuffer response
          The string value to be used for the soap output response.
 java.lang.String server
          The URL of the target server hosting the web service (EPR).
 java.lang.Thread theThread
          Thread of this runnable object
 
Constructor Summary
ClientThread(int index)
          Standart constructor for this class.
 
Method Summary
 java.lang.StringBuffer getResponse()
          Return the response obtained by this thread.
 void init(java.lang.String server, java.lang.String ns, java.lang.String tag_1, java.lang.String tag_2, java.lang.String param)
          Initialize this thread and set parameters in the SOAP client.
 void run()
          This method is invoked by the JSP page by calling client[i].theThread.start(): it invokes the web service using the SimpleHTTPClient class and then exit.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

theThread

public java.lang.Thread theThread
Thread of this runnable object


client

public SimpleHTTPClient client
The SOAP client calling the service using HTTP transport


server

public java.lang.String server
The URL of the target server hosting the web service (EPR).


param

public java.lang.String param
The string value to be used for the soap input request.


response

public java.lang.StringBuffer response
The string value to be used for the soap output response.


index

public int index
The integer index of this Thread, as created by the JSP page.


leadingName

protected java.lang.String leadingName
The leading name of each message logged on the STDOUT.

Constructor Detail

ClientThread

public ClientThread(int index)
Standart constructor for this class.

Parameters:
index - the int code used to identy this thread.
Method Detail

init

public void init(java.lang.String server,
                 java.lang.String ns,
                 java.lang.String tag_1,
                 java.lang.String tag_2,
                 java.lang.String param)
Initialize this thread and set parameters in the SOAP client.

Parameters:
server - the URL of the target server hosting the web service (EPR).
ns - the namespace used to define the XML elements in the service's WSDL.
tag_1 - the opening tag of the input element.
tag_2 - the closing tag of the output element.
param - the string value to be used for the main request element.

run

public void run()
This method is invoked by the JSP page by calling client[i].theThread.start(): it invokes the web service using the SimpleHTTPClient class and then exit.

Specified by:
run in interface java.lang.Runnable

getResponse

public java.lang.StringBuffer getResponse()
Return the response obtained by this thread.


Build 10/01/2013

Morpheus Quality Technologies - making the Zion software
Copyright © 2009-2013 Stefano Adriani. All Rights Reserved