Package com.bj58.spat.gaea.server.core.communication.http

Examples of com.bj58.spat.gaea.server.core.communication.http.Action$Parameter


  }
 
  @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

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 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

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

  private static String src = "afh425yqdsf*$#^Q@#%HFGKSHFKG@#$%SFDGSFGK@$TDSF";


  @Test
  public void testDecryptByPubKey() throws Exception {
    RSAHelper helper = RSAHelper.getInstance();
    byte[] destBuf = helper.encryptByPrivateKey(src.getBytes("utf-8"));
    byte[] srcBuf = helper.decryptByPublicKey(destBuf);
    Assert.assertEquals(src, new String(srcBuf, "utf-8"));
  }
View Full Code Here

    Assert.assertEquals(src, new String(srcBuf, "utf-8"));
  }

  @Test
  public void testDecryptByPriKey() throws Exception {
    RSAHelper helper = RSAHelper.getInstance();
    byte[] destBuf = helper.encryptByPublicKey(src.getBytes("utf-8"));
    byte[] srcBuf = helper.decryptByPrivateKey(destBuf);
    Assert.assertEquals(src, new String(srcBuf, "utf-8"));
  }
View Full Code Here

TOP

Related Classes of com.bj58.spat.gaea.server.core.communication.http.Action$Parameter

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.