@@ -0,0 +1,1548 @@
+package com.decker.essentiallib.util;%0D%0A%0D%0Aimport java.util.HashMap;%0D%0Aimport java.util.regex.Matcher;%0D%0Aimport java.util.regex.Pattern;%0D%0A%0D%0Aimport javax.servlet.http.HttpServletRequest;%0D%0A%0D%0Apublic class CommandSwitcher %7B%0D%0A    public CommandSwitcher(String pluginName) %7B%0D%0A%09this.CommandSet = new HashMap%3CString, Object%5B%5D%3E();%0D%0A    %7D%0D%0A%0D%0A    private HashMap%3CString, Object%5B%5D%3E CommandSet;%0D%0A%0D%0A    public void registerCommand(String url, String className,%0D%0A%09    String methodName, Object excutor) %7B%0D%0A%09this.CommandSet.put(url,%0D%0A%09%09new Object%5B%5D %7B className, methodName, excutor %7D);%0D%0A    %7D%0D%0A%0D%0A    public byte%5B%5D processCommand(HttpServletRequest request) throws Exception %7B%0D%0A%09try %7B%0D%0A%09    Matcher matcher = Pattern.compile(%22(?%3C=aa).*%22).matcher(%0D%0A%09%09    request.getRequestURI());%0D%0A%09    if (!matcher.find()) %7B%0D%0A%09%09throw new Exception(%22Can't access command from url%22);%0D%0A%09    %7D%0D%0A%09    Object%5B%5D pattern = this.CommandSet.get(matcher.group(1));%0D%0A%09    if (pattern == null) %7B%0D%0A%09%09throw new Exception(%22Command not found!%22);%0D%0A%09    %7D%0D%0A%09    %0D%0A%09    Object resObject=( Class.forName((String) pattern%5B0%5D)%0D%0A%09%09    .getMethod((String) pattern%5B1%5D, HttpServletRequest.class)%0D%0A%09%09    .invoke(pattern%5B2%5D, request));%0D%0A%09    if(resObject instanceof String)%0D%0A%09    %7B%0D%0A%09%09((String) resObject).getBytes();%0D%0A%09    %7D%0D%0A%09    else if (resObject instanceof Byte %5B%5D) %7B%0D%0A%09%09return (byte%5B%5D) resObject;%0D%0A%09    %7D%0D%0A%09    else %7B%0D%0A%09%09throw new Exception(%22Unknow return type%22);%0D%0A%09    %7D%0D%0A%09    //return .getBytes();%0D%0A%0D%0A%09%7D catch (Exception e) %7B%0D%0A%09    throw new Exception(%22Failed access url%22);%0D%0A%09%7D%0D%0A%09return null;%0D%0A    %7D%0D%0A%0D%0A%7D%0D%0A

Add util CommandSwitcher