com.phoenix_int.aserver.client
Class PHXAnalysisClient

java.lang.Object
  extended by com.phoenix_int.aserver.client.PHXAnalysisClient

public class PHXAnalysisClient
extends java.lang.Object

This class automates communications with the Analysis Server. Communication can be performed asynchronously or synchronously. Synchronous communication is performed by calling any of the direct access functions, e.g start() or listProperties(). Asynchronous communication is performed by calling a sendXXXRequest() function and then calling the matching getXXXResponse() when the response is ready. Listener methods are provided for notification of responses.

Sample Usage:


 // this code connects to the Analysis Server and performs serveral
 // functions
 String host = "phoenix-int.com";
 try
 {
    PHXAnalysisClient client = new PHXAnalysisClient( host );

// list all the classes String classes[] = client.listClasses( null ); System.out.println( classes.length + " classes found:" ); for ( int i = 0; i < classes.length; i++ ) { System.out.println( " Class: " + classes[i] );

PHXComponentDescription d = client.describe( classes[i] );

System.out.println( " Author: " + d.getAuthor() ); System.out.println( " Version: " + d.getVersion() ); System.out.println( " HasIcon: " + d.getHasIcon() ); System.out.println( " Description: " + d.getDescription() ); }

// start up the block analysis String msg = client.start( "Block", "b" );

// query for it's props PHXPropertyDescriptor props[] = client.listProperties( "b" ); System.out.println( props.length + " properties found:" ); for ( int i = 0; i < props.length; i++ ) { System.out.println( " Prop: " + props[i].getName() ); System.out.println( " type: " + props[i].getType() ); System.out.println( " canGet: " + props[i].getCanGet() ); System.out.println( " canSet: " + props[i].getCanSet() ); }

// perform a bunch of operations client.set( "b.height", Double.toString( 3.141593 ) ); for ( int i = 0; i < 10; i++ ) { msg = client.set( "b.width", Integer.toString( i ) ); msg = client.execute( "b" );

System.out.println( "when width = " + client.get( "b.width" ) + ", area = " + client.get( "b.area" ) ); }

// end the analysis client.end( "b" );

client.close(); } catch ( Exception e ) { System.out.println( e ); }


Field Summary
static int ADD_PROXY_CLIENTS_REQUEST
           
static int ARBITRARY_REQUEST
           
static int DELETE_RUN_SHARE_REQUEST
           
static int DESCRIBE_REQUEST
           
static int END_REQUEST
           
static int EXECUTE_REQUEST
           
static int GET_BY_URL_REQUEST
           
static int GET_HIERARCHY_REQUEST
           
static int GET_ICON_REQUEST
           
static int GET_REQUEST
           
static int HISTORY_REQUEST
           
static int INVOKE_REQUEST
           
static int LIST_ARRAY_VALUES_REQUEST
           
static int LIST_CATEGORIES_REQUEST
           
static int LIST_CLASSES_REQUEST
           
static int LIST_METHODS_REQUEST
           
static int LIST_PROPERTIES_REQUEST
           
static int LIST_REQUEST
           
static int LIST_VALUES_REQUEST
           
static int LIST_VALUES_URL_REQUEST
           
static int SET_BY_URL_REQUEST
           
static int SET_DICTIONARY_REQUEST
           
static int SET_HIERARCHY_REQUEST
           
static int SET_REQUEST
           
static int START_REQUEST
           
 
Constructor Summary
PHXAnalysisClient()
           
PHXAnalysisClient(java.lang.String host)
          creates a client to the Analysis Server and connects it to the specified host
PHXAnalysisClient(java.lang.String host, int port)
          creates a client to the Analysis Server and connects it to the specified host
PHXAnalysisClient(java.lang.String host, int port, int timeout)
          creates a client to the Analysis Server and connects it to the specified host
PHXAnalysisClient(java.lang.String host, int timeout, java.lang.String username, java.lang.String password)
          creates a client to the Analysis Server and connects it to the specified host
 
Method Summary
 void addListener(IPHXAnalysisClientListener l)
          adds a listener
 java.lang.String addProxyClients(java.lang.String clients)
          Tells the server to add other hosts as part of the proxy chain
 void close()
          closes the connection to the server
 void connect(java.lang.String host)
          connects to the Analysis Server on the specified host
 void connect(java.lang.String host, int port)
          connects to the Analysis Server on the specified host
 void connect(java.lang.String host, int port, boolean useSSL)
          connects to the Analysis Server on the specified host
 void connect(java.lang.String host, int port, boolean useSSL, int timeout)
          connects to the Analysis Server on the specified host
 void connectExternal(java.lang.String host, int timeout, java.lang.String username, java.lang.String password)
          connects to the Analysis Server via external tool
 void connectLocal(java.lang.String userName, java.lang.String password)
          Makes a virtual connection to the Analysis Server inside of this process.
 void connectLocal(java.lang.String userName, java.lang.String password, java.util.Hashtable initialProps)
          Makes a virtual connection to the Analysis Server inside of this process.
 void connectProcess(java.lang.String userName, java.lang.String password, java.lang.String asRoot, java.lang.String asConfig)
          Makes a virtual connection to the Analysis Server by calling a new java process.
 void connectURL(java.lang.String url)
          connects to the Analysis Server using the specified URL, such as aserv://hostname.
 void connectURL(java.lang.String url, int timeout, java.lang.String user, java.lang.String password)
          connects to the Analysis Server using the specified URL, such as aserv://hostname.
 java.lang.String deleteRunShare(java.lang.Long key)
          Handle cleaning up a runShare in a local client
 PHXComponentDescription describe(java.lang.String analysis)
          describes an analysis
 java.lang.String end(java.lang.String analysis)
          ends an analysis
 java.lang.String execute(java.lang.String analysis)
          exectutes an analysis
protected  void finalize()
           
 java.lang.String get(java.lang.String property)
          get the value of a property
 PHXStringBuffer get2(java.lang.String property)
          get the value of a property
 java.lang.String getAddProxyClientsResponse(java.lang.String id, boolean wait)
          retrieves a response from the server
 PHXStringBuffer getByUrl(java.lang.String propertyName, java.lang.String url)
          get the value of a property
 PHXComponentBranch getComponentHistory(java.lang.String analysis)
          Gets the component history for a particular component.
 java.lang.String getDeleteRunShareResponse(java.lang.String id, boolean wait)
          retrieves a response from the server
 PHXComponentDescription getDescribeResponse(java.lang.String id, boolean wait)
          retrieves a response from the server
 java.lang.String getEndResponse(java.lang.String id, boolean wait)
          retrieves a response from the server
 java.lang.String getExecuteResponse(java.lang.String id, boolean wait)
          retrieves a response from the server
 PHXStringBuffer getGetByUrlResponse(java.lang.String id, boolean wait)
          retrieves a response from the server
 PHXComponentBranch getGetComponentHistoryResponse(java.lang.String id, boolean wait)
          retrieves a response from the server
 PHXStringBuffer getGetHierarchyResponse(java.lang.String id, boolean wait)
          retrieves a response from the server
 PHXIcon getGetIconResponse(java.lang.String id, boolean wait)
          retrieves a response from the server
 java.lang.String getGetResponse(java.lang.String id, boolean wait)
          retrieves a response from the server
 PHXStringBuffer getGetResponse2(java.lang.String id, boolean wait)
          retrieves a response from the server
 PHXStringBuffer getHierarchy(java.lang.String analysis)
          retrievethe hierarchy for the component
 java.lang.String getHostName()
          retrieves the host name of the server
 PHXIcon getIcon(java.lang.String analysis)
          retrieves an icon for an analysis
 java.lang.String getInvokeResponse(java.lang.String id, boolean wait)
          retrieves a response from the server
 java.lang.String[] getListArrayValuesResponse(java.lang.String id, boolean wait)
           
 java.lang.String[] getListCategoriesResponse(java.lang.String id, boolean wait)
          retrieves a response from the server
 java.lang.String[] getListClassesResponse(java.lang.String id, boolean wait)
          retrieves a response from the server
 PHXMethodDescriptor[] getListMethodsResponse(java.lang.String id, boolean wait)
          retrieves a response from the server
 PHXPropertyDescriptor[] getListPropertiesResponse(java.lang.String id, boolean wait)
          retrieves a response from the server
 java.lang.String[] getListResponse(java.lang.String id, boolean wait)
          retrieves a response from the server
 PHXPropertyValue[] getListValuesResponse(java.lang.String id, boolean wait)
           
 PHXStringBuffer getResponseAsPHXStringBuffer(java.lang.String id, int type, boolean wait)
          retrieves a low-level response from the server in String format.
 java.lang.String getResponseAsText(java.lang.String id, int type, boolean wait)
          retrieves a low-level response from the server in String format.
 PHXStringBuffer getSetByUrlResponse(java.lang.String id, boolean wait)
          retrieves a response from the server
 java.lang.String getSetDictionaryResponse(java.lang.String id, boolean wait)
          retrieves a response from the server
 java.lang.String getSetHierarchyResponse(java.lang.String id, boolean wait)
          retrieves a response from the server
 java.lang.String getSetResponse(java.lang.String id, boolean wait)
          retrieves a response from the server
 java.lang.String getStartResponse(java.lang.String id, boolean wait)
          retrieves a response from the server
static void handleLogin(java.io.InputStream in, java.io.OutputStream out, java.lang.String username, java.lang.String password)
           
 java.lang.String invoke(java.lang.String method)
          invokes a method
 boolean isConnected()
          determines if the client is currently connected to a server
 boolean isResponseReady(java.lang.String id)
          indicates whether a response is ready
 java.lang.String[] list()
          lists the running objects
 java.lang.String[] listArrayValues(java.lang.String analysis)
           
 java.lang.String[] listCategories(java.lang.String category)
          lists the categories within a category
 java.lang.String[] listClasses(java.lang.String category)
          lists the classes within a category
 PHXMethodDescriptor[] listMethods(java.lang.String analysis)
          lists the methods of an analysis
 PHXPropertyDescriptor[] listProperties(java.lang.String analysis)
          lists the properties of an analysis
 PHXPropertyValue[] listValues(java.lang.String analysis)
           
static void main(java.lang.String[] args)
           
 void removeListener(IPHXAnalysisClientListener l)
          removes a listener
 java.lang.String sendAddProxyClientsRequest(java.lang.String clients)
          Tells the server to add other hosts as part of the proxy chain
 java.lang.String sendArbitraryRequest(PHXStringBuffer request)
          sends an arbitrary request to the server
 java.lang.String sendArbitraryRequest(java.lang.String request)
          sends an arbitrary request to the server
 java.lang.String sendDeleteRunShareRequest(java.lang.Long key)
          Sends a request to set a hierarchy for a component
 java.lang.String sendDescribeRequest(java.lang.String analysis)
          sends a request to describe an analysis
 java.lang.String sendEndRequest(java.lang.String analysis)
          sends a request to end an analysis
 java.lang.String sendExecuteRequest(java.lang.String analysis)
          sends a request to execute an analysis
 java.lang.String sendGetByUrlRequest(java.lang.String propertyName, java.lang.String url)
          sends a request to get the value of a property
 java.lang.String sendGetComponentHistoryRequest(java.lang.String analysis)
          sends a request to get the version history of a component
 java.lang.String sendGetHierarchyRequest(java.lang.String analysis)
          sends a request to retrieve a hierarchy for a component
 java.lang.String sendGetIconRequest(java.lang.String analysis)
          sends a request to retrieve an icon
 java.lang.String sendGetRequest(java.lang.String property)
          sends a request to get the value of a property
 java.lang.String sendInvokeRequest(java.lang.String method)
          sends a request to invoke a method
 java.lang.String sendListArrayValuesRequest(java.lang.String analysis)
           
 java.lang.String sendListCategoriesRequest(java.lang.String category)
          sends a request to list the categories
 java.lang.String sendListClassesRequest(java.lang.String category)
          sends a request to list the classes
 java.lang.String sendListMethodsRequest(java.lang.String analysis)
          sends a request to list the methods of an analysis
 java.lang.String sendListPropertiesRequest(java.lang.String analysis)
          sends a request to list the properties of an analysis
 java.lang.String sendListRequest()
          sends a request to list the running objects
 java.lang.String sendListValuesRequest(java.lang.String analysis)
           
 java.lang.String sendListValuesURLRequest(java.lang.String analysis)
           
 java.lang.String sendSetByUrlRequest(java.lang.String varName, java.lang.String url)
          sends a request to get the value of a property
 java.lang.String sendSetDictionaryRequest(java.lang.String dictionary)
          sends a request to retrieve an icon
 java.lang.String sendSetHierarchyRequest(java.lang.String analysis, PHXStringBuffer xml)
          Sends a request to set a hierarchy for a component
 java.lang.String sendSetRequest(java.lang.String property, java.lang.Object value)
          sends a request to set the value of a property
 java.lang.String sendStartRequest(java.lang.String analysis, java.lang.String instanceName)
          sends a request to start an analysis
 java.lang.String set(java.lang.String property, java.lang.Object value)
          set the value of a property
 void setByUrl(java.lang.String varName, java.lang.String url)
          get the value of a property
 void setDeleteDFT(boolean delete)
          Set whether the analysis client should auto-delete Direct File Transfer run shares or not
 java.lang.String setDictionary(java.lang.String dictionary)
          retrieves an icon for an analysis
 java.lang.String setHierarchy(java.lang.String analysis, PHXStringBuffer xml)
          Sends a request to set a hierarchy for a component
 java.lang.String start(java.lang.String analysis, java.lang.String instanceName)
          starts an analysis
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

START_REQUEST

public static final int START_REQUEST
See Also:
Constant Field Values

END_REQUEST

public static final int END_REQUEST
See Also:
Constant Field Values

GET_REQUEST

public static final int GET_REQUEST
See Also:
Constant Field Values

SET_REQUEST

public static final int SET_REQUEST
See Also:
Constant Field Values

LIST_REQUEST

public static final int LIST_REQUEST
See Also:
Constant Field Values

LIST_CLASSES_REQUEST

public static final int LIST_CLASSES_REQUEST
See Also:
Constant Field Values

LIST_PROPERTIES_REQUEST

public static final int LIST_PROPERTIES_REQUEST
See Also:
Constant Field Values

LIST_CATEGORIES_REQUEST

public static final int LIST_CATEGORIES_REQUEST
See Also:
Constant Field Values

EXECUTE_REQUEST

public static final int EXECUTE_REQUEST
See Also:
Constant Field Values

DESCRIBE_REQUEST

public static final int DESCRIBE_REQUEST
See Also:
Constant Field Values

GET_ICON_REQUEST

public static final int GET_ICON_REQUEST
See Also:
Constant Field Values

LIST_VALUES_REQUEST

public static final int LIST_VALUES_REQUEST
See Also:
Constant Field Values

LIST_ARRAY_VALUES_REQUEST

public static final int LIST_ARRAY_VALUES_REQUEST
See Also:
Constant Field Values

LIST_METHODS_REQUEST

public static final int LIST_METHODS_REQUEST
See Also:
Constant Field Values

INVOKE_REQUEST

public static final int INVOKE_REQUEST
See Also:
Constant Field Values

ADD_PROXY_CLIENTS_REQUEST

public static final int ADD_PROXY_CLIENTS_REQUEST
See Also:
Constant Field Values

HISTORY_REQUEST

public static final int HISTORY_REQUEST
See Also:
Constant Field Values

GET_BY_URL_REQUEST

public static final int GET_BY_URL_REQUEST
See Also:
Constant Field Values

GET_HIERARCHY_REQUEST

public static final int GET_HIERARCHY_REQUEST
See Also:
Constant Field Values

SET_HIERARCHY_REQUEST

public static final int SET_HIERARCHY_REQUEST
See Also:
Constant Field Values

DELETE_RUN_SHARE_REQUEST

public static final int DELETE_RUN_SHARE_REQUEST
See Also:
Constant Field Values

SET_DICTIONARY_REQUEST

public static final int SET_DICTIONARY_REQUEST
See Also:
Constant Field Values

SET_BY_URL_REQUEST

public static final int SET_BY_URL_REQUEST
See Also:
Constant Field Values

ARBITRARY_REQUEST

public static final int ARBITRARY_REQUEST
See Also:
Constant Field Values

LIST_VALUES_URL_REQUEST

public static final int LIST_VALUES_URL_REQUEST
See Also:
Constant Field Values
Constructor Detail

PHXAnalysisClient

public PHXAnalysisClient()

PHXAnalysisClient

public PHXAnalysisClient(java.lang.String host)
                  throws java.io.IOException,
                         java.net.UnknownHostException
creates a client to the Analysis Server and connects it to the specified host

Parameters:
host - the Analysis Server host to connect to, or the full URL style host specification (aserv://hostname:port)
Throws:
java.io.IOException - thrown if a connection cannot be established
java.net.UnknownHostException - thrown if the host does not match a valid host

PHXAnalysisClient

public PHXAnalysisClient(java.lang.String host,
                         int port)
                  throws java.io.IOException,
                         java.net.UnknownHostException
creates a client to the Analysis Server and connects it to the specified host

Parameters:
host - the Analysis Server host to connect to
port - the port to use for the Analysis Server (default is 1835)
Throws:
java.io.IOException - thrown if a connection cannot be established
java.net.UnknownHostException - thrown if the host does not match a valid host

PHXAnalysisClient

public PHXAnalysisClient(java.lang.String host,
                         int port,
                         int timeout)
                  throws java.io.IOException,
                         java.net.UnknownHostException
creates a client to the Analysis Server and connects it to the specified host

Parameters:
host - the Analysis Server host to connect to
port - the port to use for the Analysis Server (default is 1835)
timeout - the number of seconds to wait during the connect
Throws:
java.io.IOException - thrown if a connection cannot be established
java.net.UnknownHostException - thrown if the host does not match a valid host

PHXAnalysisClient

public PHXAnalysisClient(java.lang.String host,
                         int timeout,
                         java.lang.String username,
                         java.lang.String password)
                  throws java.io.IOException,
                         java.net.UnknownHostException
creates a client to the Analysis Server and connects it to the specified host

Parameters:
host - the Analysis Server host to connect to
port - the port to use for the Analysis Server (default is 1835)
timeout - the number of seconds to wait during the connect
useSSL - Whether to connect using SSL
useExternal - Whether to connect using an external tool instead of sockets
Throws:
java.io.IOException - thrown if a connection cannot be established
java.net.UnknownHostException - thrown if the host does not match a valid host
Method Detail

connect

public void connect(java.lang.String host)
             throws java.io.IOException,
                    java.net.UnknownHostException
connects to the Analysis Server on the specified host

Parameters:
host - the Analysis Server host to connect to, or the full URL style host specification (aserv://hostname:port)
Throws:
java.io.IOException - thrown if a connection cannot be established
java.net.UnknownHostException - thrown if the host does not match a valid host

connectURL

public void connectURL(java.lang.String url)
                throws java.io.IOException,
                       java.net.UnknownHostException,
                       java.net.URISyntaxException
connects to the Analysis Server using the specified URL, such as aserv://hostname.

Parameters:
host - the Analysis Server URL style host specification (aserv://hostname:port). May include path part, which will be ignored.
Throws:
java.io.IOException - thrown if a connection cannot be established
java.net.UnknownHostException - thrown if the host does not match a valid host
java.net.URISyntaxException

connectURL

public void connectURL(java.lang.String url,
                       int timeout,
                       java.lang.String user,
                       java.lang.String password)
                throws java.io.IOException,
                       java.net.UnknownHostException,
                       java.net.URISyntaxException
connects to the Analysis Server using the specified URL, such as aserv://hostname. Note that if you are using aserv+local style connections, you must have previously instantiated the Analysis Server Engine as described in connectLocal().

Parameters:
host - the Analysis Server URL style host specification (aserv://hostname:port). May include path part, which will be ignored.
Throws:
java.io.IOException - thrown if a connection cannot be established
java.net.UnknownHostException - thrown if the host does not match a valid host
java.net.URISyntaxException

connectLocal

public void connectLocal(java.lang.String userName,
                         java.lang.String password)
                  throws java.io.IOException
Makes a virtual connection to the Analysis Server inside of this process. The Analysis Server must have been previously instantiated using this method:
  PHXAnalysisServer.doInitialization(
    new String[] {"-aee", "-noSManager",
                  "-base", "c:\\users\\nsharp\\vers\\MCAS\\ASERVER\\install"});
 

Throws:
java.io.IOException - thrown if a connection cannot be established

connectLocal

public void connectLocal(java.lang.String userName,
                         java.lang.String password,
                         java.util.Hashtable initialProps)
                  throws java.io.IOException
Makes a virtual connection to the Analysis Server inside of this process. The Analysis Server must have been previously instantiated using this method:
  PHXAnalysisServer.doInitialization(
    new String[] {"-aee", "-noSManager",
                  "-base", "c:\\users\\nsharp\\vers\\MCAS\\ASERVER\\install"});
 

Throws:
java.io.IOException - thrown if a connection cannot be established

connectProcess

public void connectProcess(java.lang.String userName,
                           java.lang.String password,
                           java.lang.String asRoot,
                           java.lang.String asConfig)
                    throws java.io.IOException
Makes a virtual connection to the Analysis Server by calling a new java process. The Analysis Server must have been previously instantiated using this method:
  PHXAnalysisServer.doInitialization(
    new String[] {"-aee", "-noSManager",
                  "-base", "c:\\users\\nsharp\\vers\\MCAS\\ASERVER\\install"});
 

Throws:
java.io.IOException - thrown if a connection cannot be established

connect

public void connect(java.lang.String host,
                    int port)
             throws java.io.IOException,
                    java.net.UnknownHostException
connects to the Analysis Server on the specified host

Parameters:
host - the Analysis Server host to connect to
port - the port to use for the Analysis Server (default is 1835)
Throws:
java.io.IOException - thrown if a connection cannot be established
java.net.UnknownHostException - thrown if the host does not match a valid host

connect

public void connect(java.lang.String host,
                    int port,
                    boolean useSSL)
             throws java.io.IOException,
                    java.net.UnknownHostException
connects to the Analysis Server on the specified host

Parameters:
host - the Analysis Server host to connect to
port - the port to use for the Analysis Server (default is 1835)
useSSL - Whether to connect using SSL
Throws:
java.io.IOException - thrown if a connection cannot be established
java.net.UnknownHostException - thrown if the host does not match a valid host

connectExternal

public void connectExternal(java.lang.String host,
                            int timeout,
                            java.lang.String username,
                            java.lang.String password)
                     throws java.io.IOException
connects to the Analysis Server via external tool

Parameters:
host - the Analysis Server host to connect to
timeout - the number of seconds to wait during the connect
username - the username to use in the external tool
password - the password to use in the external tool
Throws:
java.io.IOException - thrown if a connection cannot be established
java.net.UnknownHostException - thrown if the host does not match a valid host

connect

public void connect(java.lang.String host,
                    int port,
                    boolean useSSL,
                    int timeout)
             throws java.io.IOException,
                    java.net.UnknownHostException
connects to the Analysis Server on the specified host

Parameters:
host - the Analysis Server host to connect to
port - the port to use for the Analysis Server (default is 1835)
useSSL - Whether to connect using SSL
timeout - the number of seconds to wait during the connect
useExternal - Whether to connect using an external tool instead of sockets
Throws:
java.io.IOException - thrown if a connection cannot be established
java.net.UnknownHostException - thrown if the host does not match a valid host

handleLogin

public static void handleLogin(java.io.InputStream in,
                               java.io.OutputStream out,
                               java.lang.String username,
                               java.lang.String password)
                        throws java.io.IOException
Throws:
java.io.IOException

isConnected

public boolean isConnected()
determines if the client is currently connected to a server

Returns:
true if currently connected

setDeleteDFT

public void setDeleteDFT(boolean delete)
Set whether the analysis client should auto-delete Direct File Transfer run shares or not


getHostName

public java.lang.String getHostName()
retrieves the host name of the server

Returns:
the host name, or "not connected" if not currently connected to the server

close

public void close()
closes the connection to the server


finalize

protected void finalize()
Overrides:
finalize in class java.lang.Object

addListener

public void addListener(IPHXAnalysisClientListener l)
adds a listener

Parameters:
l - the listener

removeListener

public void removeListener(IPHXAnalysisClientListener l)
removes a listener

Parameters:
l - the listener

isResponseReady

public boolean isResponseReady(java.lang.String id)
indicates whether a response is ready

Parameters:
id - the id of the response
Returns:
true if the response is ready

sendStartRequest

public java.lang.String sendStartRequest(java.lang.String analysis,
                                         java.lang.String instanceName)
sends a request to start an analysis

Parameters:
analysis - the analysis to start
instanceName - the name for the analysis
Returns:
the id for the response

getStartResponse

public java.lang.String getStartResponse(java.lang.String id,
                                         boolean wait)
                                  throws PHXResponseTypeMismatchException,
                                         PHXNoSuchResponseException,
                                         PHXServerSideException
retrieves a response from the server

Parameters:
id - the id for the response
wait - if true, the function blocks until the response is ready
Returns:
the response from the server
Throws:
PHXResponseTypeMismatchException - thrown if the response type is not what was expected for this function.
PHXNoSuchResponseException - thrown if the response does not exist (may not have been returned from server yet).
PHXServerSideException - thrown if the the server returned an error

start

public java.lang.String start(java.lang.String analysis,
                              java.lang.String instanceName)
                       throws PHXServerSideException
starts an analysis

Parameters:
analysis - the snalyais to start
instanceName - the name for the analysis
Returns:
the response from the server
Throws:
PHXServerSideException - thrown if something goes wrong. The exception message will contain the response from the server

sendEndRequest

public java.lang.String sendEndRequest(java.lang.String analysis)
sends a request to end an analysis

Parameters:
analysis - the analysis to start
Returns:
the id for the response

getEndResponse

public java.lang.String getEndResponse(java.lang.String id,
                                       boolean wait)
                                throws PHXResponseTypeMismatchException,
                                       PHXNoSuchResponseException,
                                       PHXServerSideException
retrieves a response from the server

Parameters:
id - the id for the response
wait - if true, the function blocks until the response is ready
Returns:
the response from the server
Throws:
PHXResponseTypeMismatchException - thrown if the response type is not what was expected for this function.
PHXNoSuchResponseException - thrown if the response does not exist (may not have been returned from server yet).
PHXServerSideException - thrown if the the server returned an error

end

public java.lang.String end(java.lang.String analysis)
                     throws PHXServerSideException
ends an analysis

Parameters:
analysis - the snalyais to end
Returns:
the response from the server
Throws:
PHXServerSideException - thrown if something goes wrong. The exception message will contain the response from the server

sendListClassesRequest

public java.lang.String sendListClassesRequest(java.lang.String category)
sends a request to list the classes

Parameters:
category - the category to search. If null, then the root category is searched
Returns:
the id for the response

getListClassesResponse

public java.lang.String[] getListClassesResponse(java.lang.String id,
                                                 boolean wait)
                                          throws PHXResponseTypeMismatchException,
                                                 PHXNoSuchResponseException,
                                                 PHXServerSideException
retrieves a response from the server

Parameters:
id - the id for the response
wait - if true, the function blocks until the response is ready
Returns:
an array of classes
Throws:
PHXResponseTypeMismatchException - thrown if the response type is not what was expected for this function.
PHXNoSuchResponseException - thrown if the response does not exist (may not have been returned from server yet).
PHXServerSideException - thrown if the the server returned an error

listClasses

public java.lang.String[] listClasses(java.lang.String category)
                               throws PHXServerSideException
lists the classes within a category

Parameters:
category - the category to search. If null, then the root category is searched
Returns:
an array of classes
Throws:
PHXServerSideException - thrown if something goes wrong. The exception message will contain the response from the server

sendExecuteRequest

public java.lang.String sendExecuteRequest(java.lang.String analysis)
sends a request to execute an analysis

Parameters:
analysis - the analysis to execute
Returns:
the id for the response

getExecuteResponse

public java.lang.String getExecuteResponse(java.lang.String id,
                                           boolean wait)
                                    throws PHXResponseTypeMismatchException,
                                           PHXNoSuchResponseException,
                                           PHXServerSideException
retrieves a response from the server

Parameters:
id - the id for the response
wait - if true, the function blocks until the response is ready
Returns:
the response from the server
Throws:
PHXResponseTypeMismatchException - thrown if the response type is not what was expected for this function.
PHXNoSuchResponseException - thrown if the response does not exist (may not have been returned from server yet).
PHXServerSideException - thrown if the the server returned an error

execute

public java.lang.String execute(java.lang.String analysis)
                         throws PHXServerSideException
exectutes an analysis

Parameters:
analysis - the analyais to start
Returns:
the response from the server
Throws:
PHXServerSideException - thrown if something goes wrong. The exception message will contain the response from the server

sendAddProxyClientsRequest

public java.lang.String sendAddProxyClientsRequest(java.lang.String clients)
Tells the server to add other hosts as part of the proxy chain

Parameters:
clients - The comma separated list of hosts
Returns:
the id for the response

getAddProxyClientsResponse

public java.lang.String getAddProxyClientsResponse(java.lang.String id,
                                                   boolean wait)
                                            throws PHXResponseTypeMismatchException,
                                                   PHXNoSuchResponseException,
                                                   PHXServerSideException
retrieves a response from the server

Parameters:
id - the id for the response
wait - if true, the function blocks until the response is ready
Returns:
the response from the server
Throws:
PHXResponseTypeMismatchException - thrown if the response type is not what was expected for this function.
PHXNoSuchResponseException - thrown if the response does not exist (may not have been returned from server yet).
PHXServerSideException - thrown if the the server returned an error

addProxyClients

public java.lang.String addProxyClients(java.lang.String clients)
                                 throws PHXServerSideException
Tells the server to add other hosts as part of the proxy chain

Parameters:
clients - The comma separated list of hosts
Returns:
the response from the server
Throws:
PHXServerSideException - thrown if something goes wrong. The exception message will contain the response from the server

sendGetRequest

public java.lang.String sendGetRequest(java.lang.String property)
sends a request to get the value of a property

Parameters:
property - the property to retrieve a value for
Returns:
the id for the response

getGetResponse

public java.lang.String getGetResponse(java.lang.String id,
                                       boolean wait)
                                throws PHXResponseTypeMismatchException,
                                       PHXNoSuchResponseException,
                                       PHXServerSideException
retrieves a response from the server

Parameters:
id - the id for the response
wait - if true, the function blocks until the response is ready
Returns:
the value of the property
Throws:
PHXResponseTypeMismatchException - thrown if the response type is not what was expected for this function.
PHXNoSuchResponseException - thrown if the response does not exist (may not have been returned from server yet).
PHXServerSideException - thrown if the the server returned an error

getGetResponse2

public PHXStringBuffer getGetResponse2(java.lang.String id,
                                       boolean wait)
                                throws PHXResponseTypeMismatchException,
                                       PHXNoSuchResponseException,
                                       PHXServerSideException
retrieves a response from the server

Parameters:
id - the id for the response
wait - if true, the function blocks until the response is ready
Returns:
the value of the property
Throws:
PHXResponseTypeMismatchException - thrown if the response type is not what was expected for this function.
PHXNoSuchResponseException - thrown if the response does not exist (may not have been returned from server yet).
PHXServerSideException - thrown if the the server returned an error

get

public java.lang.String get(java.lang.String property)
                     throws PHXServerSideException
get the value of a property

Parameters:
property - the property to retrieve a value for
Returns:
the value of the property
Throws:
PHXServerSideException - thrown if something goes wrong. The exception message will contain the response from the server
PHXServerSideException - thrown if the the server returned an error

get2

public PHXStringBuffer get2(java.lang.String property)
                     throws PHXServerSideException
get the value of a property

Parameters:
property - the property to retrieve a value for
Returns:
the value of the property
Throws:
PHXServerSideException - thrown if something goes wrong. The exception message will contain the response from the server
PHXServerSideException - thrown if the the server returned an error

sendGetByUrlRequest

public java.lang.String sendGetByUrlRequest(java.lang.String propertyName,
                                            java.lang.String url)
sends a request to get the value of a property

Parameters:
url - The url requested
Returns:
the id for the response

getGetByUrlResponse

public PHXStringBuffer getGetByUrlResponse(java.lang.String id,
                                           boolean wait)
                                    throws PHXResponseTypeMismatchException,
                                           PHXNoSuchResponseException,
                                           PHXServerSideException
retrieves a response from the server

Parameters:
id - the id for the response
wait - if true, the function blocks until the response is ready
Returns:
the value of the property
Throws:
PHXResponseTypeMismatchException - thrown if the response type is not what was expected for this function.
PHXNoSuchResponseException - thrown if the response does not exist (may not have been returned from server yet).
PHXServerSideException - thrown if the the server returned an error

getByUrl

public PHXStringBuffer getByUrl(java.lang.String propertyName,
                                java.lang.String url)
                         throws PHXServerSideException
get the value of a property

Parameters:
url - the url to get the file contents of
Returns:
the contents of the file
Throws:
PHXServerSideException - thrown if something goes wrong. The exception message will contain the response from the server
PHXServerSideException - thrown if the the server returned an error

sendSetByUrlRequest

public java.lang.String sendSetByUrlRequest(java.lang.String varName,
                                            java.lang.String url)
sends a request to get the value of a property

Parameters:
url - The url requested
Returns:
the id for the response

getSetByUrlResponse

public PHXStringBuffer getSetByUrlResponse(java.lang.String id,
                                           boolean wait)
                                    throws PHXResponseTypeMismatchException,
                                           PHXNoSuchResponseException,
                                           PHXServerSideException
retrieves a response from the server

Parameters:
id - the id for the response
wait - if true, the function blocks until the response is ready
Returns:
the value of the property
Throws:
PHXResponseTypeMismatchException - thrown if the response type is not what was expected for this function.
PHXNoSuchResponseException - thrown if the response does not exist (may not have been returned from server yet).
PHXServerSideException - thrown if the the server returned an error

setByUrl

public void setByUrl(java.lang.String varName,
                     java.lang.String url)
              throws PHXServerSideException
get the value of a property

Parameters:
url - the url to get the file contents of
Throws:
PHXServerSideException - thrown if something goes wrong. The exception message will contain the response from the server
PHXServerSideException - thrown if the the server returned an error

sendSetRequest

public java.lang.String sendSetRequest(java.lang.String property,
                                       java.lang.Object value)
sends a request to set the value of a property

Parameters:
property - the property to retrieve a value for
Returns:
the id for the response

getSetResponse

public java.lang.String getSetResponse(java.lang.String id,
                                       boolean wait)
                                throws PHXResponseTypeMismatchException,
                                       PHXNoSuchResponseException,
                                       PHXServerSideException
retrieves a response from the server

Parameters:
id - the id for the response
wait - if true, the function blocks until the response is ready
Returns:
the response from the server
Throws:
PHXResponseTypeMismatchException - thrown if the response type is not what was expected for this function.
PHXNoSuchResponseException - thrown if the response does not exist (may not have been returned from server yet).
PHXServerSideException - thrown if the the server returned an error

set

public java.lang.String set(java.lang.String property,
                            java.lang.Object value)
                     throws PHXServerSideException
set the value of a property

Parameters:
property - the property to retrieve a value for
value - the value of the property
Returns:
the response from the server
Throws:
PHXServerSideException - thrown if something goes wrong. The exception message will contain the response from the server
PHXServerSideException - thrown if the the server returned an error

sendGetComponentHistoryRequest

public java.lang.String sendGetComponentHistoryRequest(java.lang.String analysis)
sends a request to get the version history of a component

Parameters:
analysis - the analysis to query
Returns:
the id for the response

getGetComponentHistoryResponse

public PHXComponentBranch getGetComponentHistoryResponse(java.lang.String id,
                                                         boolean wait)
                                                  throws PHXResponseTypeMismatchException,
                                                         PHXNoSuchResponseException,
                                                         PHXServerSideException
retrieves a response from the server

Parameters:
id - the id for the response
wait - if true, the function blocks until the response is ready
Returns:
a description object for the analysis
Throws:
PHXResponseTypeMismatchException - thrown if the response type is not what was expected for this function.
PHXNoSuchResponseException - thrown if the response does not exist (may not have been returned from server yet).
PHXServerSideException - thrown if the the server returned an error

getComponentHistory

public PHXComponentBranch getComponentHistory(java.lang.String analysis)
                                       throws PHXServerSideException
Gets the component history for a particular component.

Parameters:
analysis - The full path to the component
Returns:
The top level branch object which represents the main development branch.
Throws:
PHXServerSideException - thrown if the server reports any problems.

sendDescribeRequest

public java.lang.String sendDescribeRequest(java.lang.String analysis)
sends a request to describe an analysis

Parameters:
analysis - the analysis to start
Returns:
the id for the response

getDescribeResponse

public PHXComponentDescription getDescribeResponse(java.lang.String id,
                                                   boolean wait)
                                            throws PHXResponseTypeMismatchException,
                                                   PHXNoSuchResponseException,
                                                   PHXServerSideException
retrieves a response from the server

Parameters:
id - the id for the response
wait - if true, the function blocks until the response is ready
Returns:
a description object for the analysis
Throws:
PHXResponseTypeMismatchException - thrown if the response type is not what was expected for this function.
PHXNoSuchResponseException - thrown if the response does not exist (may not have been returned from server yet).
PHXServerSideException - thrown if the the server returned an error

describe

public PHXComponentDescription describe(java.lang.String analysis)
                                 throws PHXServerSideException
describes an analysis

Parameters:
analysis - the full path to the component
Returns:
a description object
Throws:
PHXServerSideException - thrown if something goes wrong. The exception message will contain the response from the server

sendListPropertiesRequest

public java.lang.String sendListPropertiesRequest(java.lang.String analysis)
sends a request to list the properties of an analysis

Parameters:
analysis - the analysis to query
Returns:
the id for the response

getListPropertiesResponse

public PHXPropertyDescriptor[] getListPropertiesResponse(java.lang.String id,
                                                         boolean wait)
                                                  throws PHXResponseTypeMismatchException,
                                                         PHXNoSuchResponseException,
                                                         PHXServerSideException
retrieves a response from the server

Parameters:
id - the id for the response
wait - if true, the function blocks until the response is ready
Returns:
a property descriptor object for the analysis
Throws:
PHXResponseTypeMismatchException - thrown if the response type is not what was expected for this function.
PHXNoSuchResponseException - thrown if the response does not exist (may not have been returned from server yet).
PHXServerSideException - thrown if the the server returned an error

listProperties

public PHXPropertyDescriptor[] listProperties(java.lang.String analysis)
                                       throws PHXServerSideException
lists the properties of an analysis

Parameters:
analysis - the analyais to list properties for
Returns:
a property descriptor for the object
Throws:
PHXServerSideException - thrown if something goes wrong. The exception message will contain the response from the server

sendListMethodsRequest

public java.lang.String sendListMethodsRequest(java.lang.String analysis)
sends a request to list the methods of an analysis

Parameters:
analysis - the analysis to query
Returns:
the id for the response

getListMethodsResponse

public PHXMethodDescriptor[] getListMethodsResponse(java.lang.String id,
                                                    boolean wait)
                                             throws PHXResponseTypeMismatchException,
                                                    PHXNoSuchResponseException,
                                                    PHXServerSideException
retrieves a response from the server

Parameters:
id - the id for the response
wait - if true, the function blocks until the response is ready
Returns:
a property descriptor object for the analysis
Throws:
PHXResponseTypeMismatchException - thrown if the response type is not what was expected for this function.
PHXNoSuchResponseException - thrown if the response does not exist (may not have been returned from server yet).
PHXServerSideException - thrown if the the server returned an error

listMethods

public PHXMethodDescriptor[] listMethods(java.lang.String analysis)
                                  throws PHXServerSideException
lists the methods of an analysis

Parameters:
analysis - the analyais to list methods for
Returns:
an array of method descriptors for the object
Throws:
PHXServerSideException - thrown if something goes wrong. The exception message will contain the response from the server

sendInvokeRequest

public java.lang.String sendInvokeRequest(java.lang.String method)
sends a request to invoke a method

Parameters:
method - the method to invoke
Returns:
the id for the response

getInvokeResponse

public java.lang.String getInvokeResponse(java.lang.String id,
                                          boolean wait)
                                   throws PHXResponseTypeMismatchException,
                                          PHXNoSuchResponseException,
                                          PHXServerSideException
retrieves a response from the server

Parameters:
id - the id for the response
wait - if true, the function blocks until the response is ready
Returns:
the value of the property
Throws:
PHXResponseTypeMismatchException - thrown if the response type is not what was expected for this function.
PHXNoSuchResponseException - thrown if the response does not exist (may not have been returned from server yet).
PHXServerSideException - thrown if the the server returned an error

invoke

public java.lang.String invoke(java.lang.String method)
                        throws PHXServerSideException
invokes a method

Parameters:
method - the method to invoke
Returns:
the results of the invocation
Throws:
PHXServerSideException - thrown if something goes wrong. The exception message will contain the response from the server
PHXServerSideException - thrown if the the server returned an error

sendListValuesRequest

public java.lang.String sendListValuesRequest(java.lang.String analysis)

sendListValuesURLRequest

public java.lang.String sendListValuesURLRequest(java.lang.String analysis)

getListValuesResponse

public PHXPropertyValue[] getListValuesResponse(java.lang.String id,
                                                boolean wait)
                                         throws PHXResponseTypeMismatchException,
                                                PHXNoSuchResponseException,
                                                PHXServerSideException,
                                                java.io.IOException,
                                                java.lang.NumberFormatException
Throws:
PHXResponseTypeMismatchException
PHXNoSuchResponseException
PHXServerSideException
java.io.IOException
java.lang.NumberFormatException

listValues

public PHXPropertyValue[] listValues(java.lang.String analysis)
                              throws PHXServerSideException,
                                     java.io.IOException
Throws:
PHXServerSideException
java.io.IOException

sendListArrayValuesRequest

public java.lang.String sendListArrayValuesRequest(java.lang.String analysis)

getListArrayValuesResponse

public java.lang.String[] getListArrayValuesResponse(java.lang.String id,
                                                     boolean wait)
                                              throws PHXResponseTypeMismatchException,
                                                     PHXNoSuchResponseException
Throws:
PHXResponseTypeMismatchException
PHXNoSuchResponseException

listArrayValues

public java.lang.String[] listArrayValues(java.lang.String analysis)
                                   throws PHXServerSideException,
                                          java.io.IOException
Throws:
PHXServerSideException
java.io.IOException

sendListCategoriesRequest

public java.lang.String sendListCategoriesRequest(java.lang.String category)
sends a request to list the categories

Parameters:
category - the category to search. If null, then the root category is searched
Returns:
the id for the response

getListCategoriesResponse

public java.lang.String[] getListCategoriesResponse(java.lang.String id,
                                                    boolean wait)
                                             throws PHXResponseTypeMismatchException,
                                                    PHXNoSuchResponseException,
                                                    PHXServerSideException
retrieves a response from the server

Parameters:
id - the id for the response
wait - if true, the function blocks until the response is ready
Returns:
an array of categories
Throws:
PHXResponseTypeMismatchException - thrown if the response type is not what was expected for this function.
PHXNoSuchResponseException - thrown if the response does not exist (may not have been returned from server yet).
PHXServerSideException - thrown if the the server returned an error

listCategories

public java.lang.String[] listCategories(java.lang.String category)
                                  throws PHXServerSideException
lists the categories within a category

Parameters:
category - the category to search. If null, then the root category is searched
Returns:
an array of categories
Throws:
PHXServerSideException - thrown if something goes wrong. The exception message will contain the response from the server

sendListRequest

public java.lang.String sendListRequest()
sends a request to list the running objects

Returns:
the id for the response

getListResponse

public java.lang.String[] getListResponse(java.lang.String id,
                                          boolean wait)
                                   throws PHXResponseTypeMismatchException,
                                          PHXNoSuchResponseException,
                                          PHXServerSideException
retrieves a response from the server

Parameters:
id - the id for the response
wait - if true, the function blocks until the response is ready
Returns:
an array of objects
Throws:
PHXResponseTypeMismatchException - thrown if the response type is not what was expected for this function.
PHXNoSuchResponseException - thrown if the response does not exist (may not have been returned from server yet).
PHXServerSideException - thrown if the the server returned an error

list

public java.lang.String[] list()
                        throws PHXServerSideException
lists the running objects

Returns:
an array of objects
Throws:
PHXServerSideException - thrown if something goes wrong. The exception message will contain the response from the server

sendGetHierarchyRequest

public java.lang.String sendGetHierarchyRequest(java.lang.String analysis)
sends a request to retrieve a hierarchy for a component

Parameters:
analysis - the analysis class to retrieve the icon for
Returns:
the id for the response

getGetHierarchyResponse

public PHXStringBuffer getGetHierarchyResponse(java.lang.String id,
                                               boolean wait)
                                        throws PHXResponseTypeMismatchException,
                                               PHXNoSuchResponseException,
                                               PHXServerSideException
retrieves a response from the server

Parameters:
id - the id for the response
wait - if true, the function blocks until the response is ready
Returns:
an icon Image
Throws:
PHXResponseTypeMismatchException - thrown if the response type is not what was expected for this function.
PHXNoSuchResponseException - thrown if the response does not exist (may not have been returned from server yet).
PHXServerSideException - thrown if the the server returned an error

getHierarchy

public PHXStringBuffer getHierarchy(java.lang.String analysis)
                             throws PHXServerSideException
retrievethe hierarchy for the component

Parameters:
analysis - the analysis class to retrieve the icon for
Returns:
the string buffer containing the hierarchy
Throws:
PHXServerSideException - thrown if something goes wrong. The exception message will contain the response from the server

sendSetHierarchyRequest

public java.lang.String sendSetHierarchyRequest(java.lang.String analysis,
                                                PHXStringBuffer xml)
Sends a request to set a hierarchy for a component

Parameters:
analysis - the analysis object or parameter name to set data into
xml - The XML data structure containing the data to be set.
Returns:
the id for the response

getSetHierarchyResponse

public java.lang.String getSetHierarchyResponse(java.lang.String id,
                                                boolean wait)
                                         throws PHXResponseTypeMismatchException,
                                                PHXNoSuchResponseException,
                                                PHXServerSideException
retrieves a response from the server

Parameters:
id - the id for the response
wait - if true, the function blocks until the response is ready
Returns:
the result from the server
Throws:
PHXResponseTypeMismatchException - thrown if the response type is not what was expected for this function.
PHXNoSuchResponseException - thrown if the response does not exist (may not have been returned from server yet).
PHXServerSideException - thrown if the the server returned an error

setHierarchy

public java.lang.String setHierarchy(java.lang.String analysis,
                                     PHXStringBuffer xml)
                              throws PHXServerSideException
Sends a request to set a hierarchy for a component

Parameters:
analysis - the analysis object or parameter name to set data into
xml - The XML data structure containing the data to be set.
Returns:
the result from the server
Throws:
PHXServerSideException - thrown if something goes wrong. The exception message will contain the response from the server

sendDeleteRunShareRequest

public java.lang.String sendDeleteRunShareRequest(java.lang.Long key)
Sends a request to set a hierarchy for a component

Parameters:
analysis - the analysis object or parameter name to set data into
xml - The XML data structure containing the data to be set.
Returns:
the id for the response

getDeleteRunShareResponse

public java.lang.String getDeleteRunShareResponse(java.lang.String id,
                                                  boolean wait)
                                           throws PHXResponseTypeMismatchException,
                                                  PHXNoSuchResponseException,
                                                  PHXServerSideException
retrieves a response from the server

Parameters:
id - the id for the response
wait - if true, the function blocks until the response is ready
Returns:
the result from the server
Throws:
PHXResponseTypeMismatchException - thrown if the response type is not what was expected for this function.
PHXNoSuchResponseException - thrown if the response does not exist (may not have been returned from server yet).
PHXServerSideException - thrown if the the server returned an error

deleteRunShare

public java.lang.String deleteRunShare(java.lang.Long key)
                                throws PHXServerSideException
Handle cleaning up a runShare in a local client

Throws:
PHXServerSideException

sendGetIconRequest

public java.lang.String sendGetIconRequest(java.lang.String analysis)
sends a request to retrieve an icon

Parameters:
analysis - the analysis class to retrieve the icon for
Returns:
the id for the response

getGetIconResponse

public PHXIcon getGetIconResponse(java.lang.String id,
                                  boolean wait)
                           throws PHXResponseTypeMismatchException,
                                  PHXNoSuchResponseException,
                                  PHXServerSideException
retrieves a response from the server

Parameters:
id - the id for the response
wait - if true, the function blocks until the response is ready
Returns:
an icon Image
Throws:
PHXResponseTypeMismatchException - thrown if the response type is not what was expected for this function.
PHXNoSuchResponseException - thrown if the response does not exist (may not have been returned from server yet).
PHXServerSideException - thrown if the the server returned an error

getIcon

public PHXIcon getIcon(java.lang.String analysis)
                throws PHXServerSideException
retrieves an icon for an analysis

Parameters:
analysis - the analysis class to retrieve the icon for
Returns:
an icon Image
Throws:
PHXServerSideException - thrown if something goes wrong. The exception message will contain the response from the server

sendSetDictionaryRequest

public java.lang.String sendSetDictionaryRequest(java.lang.String dictionary)
sends a request to retrieve an icon

Parameters:
analysis - the analysis class to retrieve the icon for
Returns:
the id for the response

getSetDictionaryResponse

public java.lang.String getSetDictionaryResponse(java.lang.String id,
                                                 boolean wait)
                                          throws PHXResponseTypeMismatchException,
                                                 PHXNoSuchResponseException,
                                                 PHXServerSideException
retrieves a response from the server

Parameters:
id - the id for the response
wait - if true, the function blocks until the response is ready
Returns:
an icon Image
Throws:
PHXResponseTypeMismatchException - thrown if the response type is not what was expected for this function.
PHXNoSuchResponseException - thrown if the response does not exist (may not have been returned from server yet).
PHXServerSideException - thrown if the the server returned an error

setDictionary

public java.lang.String setDictionary(java.lang.String dictionary)
                               throws PHXServerSideException
retrieves an icon for an analysis

Parameters:
analysis - the analysis class to retrieve the icon for
Returns:
the response from the server
Throws:
PHXServerSideException - thrown if something goes wrong. The exception message will contain the response from the server

sendArbitraryRequest

public java.lang.String sendArbitraryRequest(java.lang.String request)
sends an arbitrary request to the server

Parameters:
request - the analysis server api command to send
Returns:
the id for the response

sendArbitraryRequest

public java.lang.String sendArbitraryRequest(PHXStringBuffer request)
sends an arbitrary request to the server

Parameters:
request - the analysis server api command to send
Returns:
the id for the response

getResponseAsText

public java.lang.String getResponseAsText(java.lang.String id,
                                          int type,
                                          boolean wait)
                                   throws PHXResponseTypeMismatchException,
                                          PHXNoSuchResponseException,
                                          PHXServerSideException
retrieves a low-level response from the server in String format.

Parameters:
id - the id for the response
type - the type of response to expect.
wait - if true, the function blocks until the response is ready
Returns:
the value of the property
Throws:
PHXResponseTypeMismatchException - thrown if the response type is not what was expected for this function.
PHXNoSuchResponseException - thrown if the response does not exist (may not have been returned from server yet).
PHXServerSideException - thrown if the the server returned an error

getResponseAsPHXStringBuffer

public PHXStringBuffer getResponseAsPHXStringBuffer(java.lang.String id,
                                                    int type,
                                                    boolean wait)
                                             throws PHXResponseTypeMismatchException,
                                                    PHXNoSuchResponseException,
                                                    PHXServerSideException
retrieves a low-level response from the server in String format.

Parameters:
id - the id for the response
type - the type of response to expect.
wait - if true, the function blocks until the response is ready
Returns:
the value of the property
Throws:
PHXResponseTypeMismatchException - thrown if the response type is not what was expected for this function.
PHXNoSuchResponseException - thrown if the response does not exist (may not have been returned from server yet).
PHXServerSideException - thrown if the the server returned an error

main

public static void main(java.lang.String[] args)