⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 handlertracker.java

📁 Java有关XML编程需要用到axis 的源代码 把里面bin下的包导入相应的Java工程 进行使用
💻 JAVA
字号:
package test.wsdl.jaxrpchandlereval;import java.util.*;public class HandlerTracker {	private static List clientHandlers;	private static List serverHandlers;	public static void init() {		clientHandlers = new ArrayList();		serverHandlers = new ArrayList();	}	public static void addClientHandler(String s) {		clientHandlers.add(s);	}	public static void addServerHandler(String s) {		serverHandlers.add(s);	}	public static void assertClientHandlerOrder(String[] arr) throws Exception {		assertHandlerOrder(clientHandlers, arr);	}	public static void assertServerHandlerOrder(String[] arr) throws Exception {		assertHandlerOrder(serverHandlers, arr);	}	public static void assertHandlerOrder(List handlers, String[] expected) throws Exception {		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;	}}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -