|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--info.jedi.testsuite.Server
Class Server helps to test the parts.basic package by providing a set of methods that can be called remotely. A Server is started from the command line with the simple syntax
java info.jedi.testsuite.Server
Field Summary | |
static int |
SEMAPHORE_NUMBER
The number of calls necessary to the semaphore before it triggers and releases all threads inside. |
Constructor Summary | |
Server()
Creates a Server |
Method Summary | |
boolean |
booleanFunction(boolean argument)
Used to test boolean arguments and return values. |
void |
bounceFunction(Proxy next,
int bouncesLeft)
Bounces a call recursively between client and server, decrementing the number of bounces left at each call until they are 0, at which point the whole stack unwinds. |
ComplexObject |
complexObjectFunction(ComplexObject argument)
Used to test serializable complex object arguments and return values. |
int |
countFunction()
Increments the internal message count and returns the current count. |
Proxy |
getProxy()
Returns a proxy to this Server |
void |
initialize()
Initializes the server. |
int |
intFunction(int argument)
Used to test integer arguments and return values. |
static void |
main(java.lang.String[] args)
Creates a server. |
java.util.Vector |
multipleFunction(int arg1,
boolean arg2,
float arg3,
double arg4,
java.lang.String arg5,
ComplexObject arg6)
Takes 6 arguments, all of different types: some object, some basic. |
void |
semaphoreFunction()
Acts like a semaphore. |
static int |
staticFunction(int argument)
For testing static functions. |
java.lang.String |
stringFunction(java.lang.String argument)
Used to test String arguments and return values. |
int |
throwsException()
A method that throws an exception |
void |
unserializableParameter(Client client)
A method with an unserializable parameter. |
Server |
unserializableReturnValue()
A method that returns an unserializable value. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
public static final int SEMAPHORE_NUMBER
Constructor Detail |
public Server()
Method Detail |
public void initialize()
public java.lang.String stringFunction(java.lang.String argument)
public boolean booleanFunction(boolean argument)
public int intFunction(int argument)
public ComplexObject complexObjectFunction(ComplexObject argument)
public java.util.Vector multipleFunction(int arg1, boolean arg2, float arg3, double arg4, java.lang.String arg5, ComplexObject arg6)
public static int staticFunction(int argument)
public int countFunction()
public void semaphoreFunction() throws java.lang.InterruptedException
public Proxy getProxy() throws java.net.UnknownHostException
public void bounceFunction(Proxy next, int bouncesLeft) throws java.lang.Exception
public int throwsException() throws java.net.SocketException
public void unserializableParameter(Client client)
public Server unserializableReturnValue()
public static void main(java.lang.String[] args) throws java.net.SocketException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |