org.strutsme.client
Class RemoteExecutor

java.lang.Object
  extended by org.strutsme.client.RemoteExecutor

public final class RemoteExecutor
extends java.lang.Object

RemoteExecutor provides a method to execute an action at the server. The serverbase-url has to be set before.

Author:
lbusmann

Method Summary
static SafeHashtable executeAtServer(java.lang.String actionName, java.util.Hashtable actionParameter, java.lang.String session, SafeHashtable parameters)
          Calls an action at the server and returns the result (values of the formbean).
static SafeHashtable executeAtServer(java.lang.String actionName, SafeHashtable parameters)
          Wrapper around executeAtServer(String, Hashtable, String, SafeHashtable).
static java.lang.String getServerBaseUrl()
           
static void setServerBaseUrl(java.lang.String serverBaseUrl)
          The base url, which is extended by the action part to yield the complete url.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

executeAtServer

public static SafeHashtable executeAtServer(java.lang.String actionName,
                                            SafeHashtable parameters)
                                     throws java.io.IOException,
                                            SerializationException
Wrapper around executeAtServer(String, Hashtable, String, SafeHashtable). Equal to executeAtServer(actionName, null, null, parameters).

Parameters:
actionName - the name of the action
parameters - the parameters for the formbean
Returns:
the result
Throws:
java.io.IOException - if the network connection to the server fails
SerializationException - if the parameters contain unsupported objects
See Also:
ServerResultWrapper

executeAtServer

public static SafeHashtable executeAtServer(java.lang.String actionName,
                                            java.util.Hashtable actionParameter,
                                            java.lang.String session,
                                            SafeHashtable parameters)
                                     throws java.io.IOException,
                                            SerializationException
Calls an action at the server and returns the result (values of the formbean).

Parameters:
actionName - the name of the action
actionParameter - addional HTTP-GET parameter (may be null)
session - the sessionid (may be null)
parameters - the parameters for the formbean
Returns:
the response of the server
Throws:
java.io.IOException - if the network connection to the server fails
SerializationException - if the parameters or the serverresponse contains unsupported objects
See Also:
ServerResultWrapper

getServerBaseUrl

public static java.lang.String getServerBaseUrl()
Returns:
the current base url for the server

setServerBaseUrl

public static void setServerBaseUrl(java.lang.String serverBaseUrl)
The base url, which is extended by the action part to yield the complete url.

Parameters:
serverBaseUrl - the new base url.