import com.fanruan.AgentStarter; import com.fanruan.utils.DBProperties; import io.socket.client.Socket; import java.io.IOException; public class Test { public static void main(String[] args){ try{ testStart(); }catch(Exception e){ e.printStackTrace(); } } static void testStart() throws IOException, ClassNotFoundException { Class.forName(DBProperties.HSQL_DRIVER_NAME); String[] DBs = new String[]{ DBProperties.HSQL, }; new AgentStarter(DBs); Socket mainSocket = AgentStarter.myDispatcherImpl.CACHE.getSocket("/"); mainSocket.connect(); Socket socket = AgentStarter.myDispatcherImpl.CACHE.getSocket(DBProperties.HSQL); socket.connect(); } }