FileDocCategorySizeDatePackage
HandlerTracker.javaAPI DocApache Axis 1.41504Sat Apr 22 18:57:28 BST 2006test.wsdl.jaxrpchandlereval

HandlerTracker

public class HandlerTracker extends Object

Fields Summary
private static List
clientHandlers
private static List
serverHandlers
Constructors Summary
Methods Summary
public static voidaddClientHandler(java.lang.String s)

		clientHandlers.add(s);
	
public static voidaddServerHandler(java.lang.String s)

		serverHandlers.add(s);
	
public static voidassertClientHandlerOrder(java.lang.String[] arr)

		assertHandlerOrder(clientHandlers, arr);
	
public static voidassertHandlerOrder(java.util.List handlers, java.lang.String[] expected)

		String[] actual = new String[handlers.size()];
		handlers.toArray(actual);

		System.out.print("excepted order:");
		for (int i = 0; i < expected.length; i++) {
			System.out.print(expected[i] + " ");
		}
		System.out.println("\n");

		System.out.print("actual order:");
		for (int i = 0; i < actual.length; i++) {
			System.out.print(actual[i] + " ");
		}
		System.out.println("\n");
		
		if (expected.length != actual.length) {
			throw new Exception("Handler length not match");
		}

		System.out.println("\n");
		for (int i = 0; i < expected.length; i++) {
			if (!expected[i].equals(actual[i])) {
				throw new Exception("Handler order not match : expected = " + expected[i] + ", actual = " + actual[i]);
			}
		}
		return;
	
public static voidassertServerHandlerOrder(java.lang.String[] arr)

		assertHandlerOrder(serverHandlers, arr);
	
public static voidinit()

		clientHandlers = new ArrayList();
		serverHandlers = new ArrayList();