redstone.xmlrpc.handlers
Class ValidationHandler

java.lang.Object
  extended by redstone.xmlrpc.handlers.ReflectiveInvocationHandler
      extended by redstone.xmlrpc.handlers.ValidationHandler
All Implemented Interfaces:
XmlRpcInvocationHandler

public class ValidationHandler
extends ReflectiveInvocationHandler

Handler for the XML-RPC validation suite. This suite is used to verify the implementation using the verification service at http://www.xmlrpc.com.

Author:
Greger Olsson

Constructor Summary
ValidationHandler()
           
 
Method Summary
 int arrayOfStructsTest(java.util.List structs)
          This handler takes a single parameter, an array of structs, each of which contains at least three elements named moe, larry and curly, all s.
 java.util.Map countTheEntities(java.lang.String str)
          This handler takes a single parameter, a string, that contains any number of predefined entities, namely <, >, &, ' and ".
 int easyStructTest(java.util.Map struct)
          This handler takes a single parameter, a struct, containing at least three elements named moe, larry and curly, all s.
 java.util.Map echoStructTest(java.util.Map struct)
          This handler takes a single parameter, a struct.
 java.util.List manyTypesTest(int number, boolean bool, java.lang.String string, double dbl, java.util.Date dateTime, byte[] bytes)
          This handler takes six parameters, and returns an array containing all the parameters.
 java.lang.String moderateSizeArrayCheck(java.util.List strings)
          This handler takes a single parameter, which is an array containing between 100 and 200 elements.
 int nestedStructTest(java.util.Map struct)
          This handler takes a single parameter, a struct, that models a daily calendar.
 java.util.Map simpleStructReturnTest(int number)
          This handler takes one parameter, and returns a struct containing three elements, times10, times100 and times1000, the result of multiplying the number by 10, 100 and 1000.
 
Methods inherited from class redstone.xmlrpc.handlers.ReflectiveInvocationHandler
invoke, setEntryPoints
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ValidationHandler

public ValidationHandler()
Method Detail

arrayOfStructsTest

public int arrayOfStructsTest(java.util.List structs)
This handler takes a single parameter, an array of structs, each of which contains at least three elements named moe, larry and curly, all s. Your handler must add all the struct elements named curly and return the result.


countTheEntities

public java.util.Map countTheEntities(java.lang.String str)
This handler takes a single parameter, a string, that contains any number of predefined entities, namely <, >, &, ' and ". Your handler must return a struct that contains five fields, all numbers: ctLeftAngleBrackets, ctRightAngleBrackets, ctAmpersands, ctApostrophes, ctQuotes. To validate, the numbers must be correct.


easyStructTest

public int easyStructTest(java.util.Map struct)
This handler takes a single parameter, a struct, containing at least three elements named moe, larry and curly, all s. Your handler must add the three numbers and return the result.


echoStructTest

public java.util.Map echoStructTest(java.util.Map struct)
This handler takes a single parameter, a struct. Your handler must return the struct.


manyTypesTest

public java.util.List manyTypesTest(int number,
                                    boolean bool,
                                    java.lang.String string,
                                    double dbl,
                                    java.util.Date dateTime,
                                    byte[] bytes)
This handler takes six parameters, and returns an array containing all the parameters.


moderateSizeArrayCheck

public java.lang.String moderateSizeArrayCheck(java.util.List strings)
This handler takes a single parameter, which is an array containing between 100 and 200 elements. Each of the items is a string, your handler must return a string containing the concatenated text of the first and last elements.


nestedStructTest

public int nestedStructTest(java.util.Map struct)
This handler takes a single parameter, a struct, that models a daily calendar. At the top level, there is one struct for each year. Each year is broken down into months, and months into days. Most of the days are empty in the struct you receive, but the entry for April 1, 2000 contains a least three elements named moe, larry and curly, all s. Your handler must add the three numbers and return the result.


simpleStructReturnTest

public java.util.Map simpleStructReturnTest(int number)
This handler takes one parameter, and returns a struct containing three elements, times10, times100 and times1000, the result of multiplying the number by 10, 100 and 1000.