Package com.bj58.spat.gaea.server.core.proxy

Examples of com.bj58.spat.gaea.server.core.proxy.InvokerBase


        }
        allMethodList.add(m);
      }
    }

    ProxyClassCreater pcc = new ProxyClassCreater();
    // method
    for (Method m : uniqueMethodList) {
      System.out.println("create method:" + m.getName());
      String methodStr = pcc.createMethods("TestClass", m.getName(),
          allMethodList, uniqueNameList);
      System.out.println("method(" + m.getName() + ") source code:"
          + methodStr);

      TestEntity te = new TestEntity();
View Full Code Here


 
  @SuppressWarnings("rawtypes")
  @Test
  public void testGetContractInfo() throws Exception {
    DynamicClassLoader classLoader = new DynamicClassLoader();
    classLoader.addFolder(jarPath);
    ContractInfo ci = ScanClass.getContractInfo(jarPath, classLoader);
    for(SessionBean sb : ci.getSessionBeanList()) {
     
      Assert.assertEquals("com.bj58.spat.servicedemo.contract.INewsService", sb.getInterfaceName());
     
View Full Code Here

 
 

  @Test
  public void testGetContractClassInfos() throws Exception {
    DynamicClassLoader classLoader = new DynamicClassLoader();
    classLoader.addFolder(jarPath);
    List<ClassInfo> ciList = ScanClass.getContractClassInfos(jarPath, classLoader);
   
    for(int i=0; i<ciList.size(); i++) {
      if(i == 0) {
        Assert.assertEquals("com.bj58.spat.servicedemo.contract.INewsService",
View Full Code Here

 
 

  @Test
  public void testGetBehaviorClassInfos() throws Exception {
    DynamicClassLoader classLoader = new DynamicClassLoader();
    classLoader.addFolder(jarPath);
    List<ClassInfo> ciList = ScanClass.getBehaviorClassInfos(jarPath, classLoader);
   
    for(int i=0; i<ciList.size(); i++) {
      if(i == 0) {
        Assert.assertEquals("NewsService",
View Full Code Here

  }
  /**build tree*/
  public JTree buildTree() {
    JTree tree = null;
    /**load file jar and class*/
    DynamicClassLoader classLoader = new DynamicClassLoader();
    try {
      classLoader.addFolder(AssistUtils.getPath());
    } catch (Exception e) {
      e.printStackTrace();
    }
    logger.info("-----------------build Tree Start------------------");
   
    CheckNode parnodes = new CheckNode("method");
    tree = new JTree(parnodes);
   
    List<String> jarList = classLoader.getJarList();
    if(jarList!=null && jarList.size()>0){
      loadClassTreeList(jarList,parnodes,classLoader);
    }
   
    tree.setCellRenderer(new CheckRenderer());
View Full Code Here

  }
 
  @Test
  public void hotDeploy() throws Exception {
   
    DynamicURLClassLoader classLoader = new DynamicURLClassLoader();
    classLoader.addURL("D:/serviceframe_v2_online/lib/serviceframe/serviceframe-2.0.1.beta.jar");
    classLoader.addFolder("D:/serviceframe_v2_online/service/deploy/imc/");
    Class<?> cmCls = classLoader.loadClass("com.bj58.sfft.serviceframe.deploy.bytecode.CreateManager");
   
    Method createProxy = cmCls.getDeclaredMethod("careteProxy", new Class[] { String.class });
    IProxyFactory pf = (IProxyFactory)createProxy.invoke(cmCls.newInstance(), "D:/serviceframe_v2_online/service/deploy/imc/");
    System.out.println("pf:" + pf);
  }
View Full Code Here

public class ProtocolParseFilterTest {

  @Test
  public void testFilter() {
    byte[] buf = new byte[]{1,-79,0,0,0,1,0,0,0,101,2,0,4,1,-5,107,-6,25,0,-23,3,0,0,19,0,0,0,19,0,0,0,0,-22,3,0,0,1,0,0,0,39,5,-10,-65,39,5,-10,-65,0,-21,3,0,0,18,0,0,0,0,-20,3,0,0,4,0,0,0,85,115,101,114,17,-116,74,-65,17,-116,74,-65,0,-19,3,0,0,24,0,0,0,24,0,0,0,0,-18,3,0,0,1,0,0,0,5,0,0,0,29,18,0,0,0,0,-17,3,0,0,19,0,0,0,49,107,99,54,54,52,53,56,56,64,107,117,99,104,101,46,99,111,109,11,0,0,0,116,72,-59,0,0,0,0,0,18,0,0,0,1,-20,3,0,0,18,0,0,0,0,-16,3,0,0,6,0,0,0,117,112,100,97,116,101};
    ProtocolParseFilter filter = new ProtocolParseFilter();
  }
View Full Code Here

public class CountTest {

  @Test
  public void testCreateCommand() {
    Count count = new Count();
    Command command1 = count.createCommand("count");
    Assert.assertEquals(CommandType.Count, command1.getCommandType());
    Assert.assertEquals("#all#", command1.getMethod());
    Assert.assertEquals(1, command1.getSecond());
   
   
    Command command2 = count.createCommand("count|second 2|method getInfo");
    Assert.assertEquals(CommandType.Count, command2.getCommandType());
    Assert.assertEquals("getInfo", command2.getMethod());
    Assert.assertEquals(2, command2.getSecond());
  }
View Full Code Here

public class TimeTest {

  @Test
  public void testCreateCommand() {
    Time time = new Time();
    Command command1 = time.createCommand("time|grep abc|group 10|column -kd");
    assertEquals(CommandType.Time, command1.getCommandType());
    assertEquals("abc", command1.getGrep().get(0));
    assertEquals(ShowColumn.Key, command1.getColumnList().get(0));
    assertEquals(ShowColumn.Description, command1.getColumnList().get(1));
    assertEquals(2, command1.getColumnList().size());
    assertEquals(10, command1.getGroup());
   
   
    Command command2 = time.createCommand("time|grep 123");
    assertEquals(CommandType.Time, command2.getCommandType());
    assertEquals("123", command2.getGrep().get(0));
    assertEquals(ShowColumn.All, command2.getColumnList().get(0));
    assertEquals(1, command2.getColumnList().size());
    assertEquals(0, command2.getGroup());
  }
View Full Code Here

public class ExecTest {

  @Test
  public void testCreateCommand() {
    Exec exec = new Exec();
    Command command1 = exec.createCommand("exec|netstat -na");
    assertEquals(CommandType.Exec, command1.getCommandType());
    assertEquals("netstat -na", command1.getCommand());
   
    Command command2 = exec.createCommand("exec|killall java");
    assertEquals(CommandType.Illegal, command2.getCommandType());
  }
View Full Code Here

TOP

Related Classes of com.bj58.spat.gaea.server.core.proxy.InvokerBase

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.