Examples of ServerService


Examples of com.cisco.server.ServerService

  }

  @Test
  public void testStartConcurrentStartcancel() throws InterruptedException {
    for (int i = 1; i < NTRIALS; i++) {
      final ServerService server = new ServerService(serverConfiguration, processorTaskFactory);
      new Thread(new Runnable() {

        @Override
        public void run() {
          server.call();

        }
      }).start();
      sleep();
      server.cancel();
      assertTrue(server.isStopped());
    }

  }
View Full Code Here

Examples of com.cxy.redisclient.service.ServerService

import junit.framework.TestCase;

public class ServerTest extends TestCase {

  public void testAdd() throws IOException {
    ServerService server = new ServerService();
    server.add("test3", "localhost", "80", "");
   
    int id = server.add("test3", "localhost", "80", "");
   
    String name = server.listById(id).getName();
    String addr = server.listById(id).getHost();
    String port = server.listById(id).getPort();
   
    assertEquals(name, "test3");
    assertEquals(addr, "localhost");
    assertEquals(port, "80");
   
    server.add("test4", "127.0.0.1", "8800", "");
   
    id = Integer.parseInt(ConfigFile.readMaxId(ConfigFile.SERVER_MAXID));
    name = ConfigFile.read(ConfigFile.NAME + id);
    addr = ConfigFile.read(ConfigFile.HOST + id);
    port = ConfigFile.read(ConfigFile.PORT + id);
View Full Code Here

Examples of com.cxy.redisclient.service.ServerService

   
  }
 
  public void testDelete() throws IOException {
    int id = Integer.parseInt(ConfigFile.readMaxId(ConfigFile.SERVER_MAXID));
    ServerService server = new ServerService();
    server.delete(id);
  }
View Full Code Here

Examples of com.cxy.redisclient.service.ServerService

    ServerService server = new ServerService();
    server.delete(id);
  }

  public void testList() throws IOException {
    ServerService service = new ServerService();
    service.add("testtest", "localhost", "88888", "");
    int id = Integer.parseInt(ConfigFile.readMaxId(ConfigFile.SERVER_MAXID));
   
    Server server = service.listById(id);
    assertEquals("testtest", server.getName());
    assertEquals("88888", server.getPort());
  }
View Full Code Here

Examples of com.cxy.redisclient.service.ServerService

    assertEquals("testtest", server.getName());
    assertEquals("88888", server.getPort());
  }
 
  public void testListAll() throws IOException {
    ServerService service = new ServerService();
    List<Server> servers = service.listAll();
    servers.size();
  }
View Full Code Here

Examples of com.cxy.redisclient.service.ServerService

  }
 
  public void testUpdate() throws IOException {
    int id = Integer.parseInt(ConfigFile.readMaxId(ConfigFile.SERVER_MAXID));
   
    ServerService service = new ServerService();
    service.add("test update", "test addr", "test port", "");
   
    id++;
    service.update(id, "update server");
    service.update(id, "new", "8090", "");
   
    String name = ConfigFile.read(ConfigFile.NAME + id);
    String addr = ConfigFile.read(ConfigFile.HOST + id);
    String port = ConfigFile.read(ConfigFile.PORT + id);
   
View Full Code Here

Examples of com.cxy.redisclient.service.ServerService

    assertEquals(addr, "new");
    assertEquals(port, "8090");
  }
 
  public void testListDB() throws IOException {
    ServerService service = new ServerService();
    assertTrue(service.listDBs(1) == 16);
  }
View Full Code Here

Examples of com.cxy.redisclient.service.ServerService

    ServerService service = new ServerService();
    assertTrue(service.listDBs(1) == 16);
  }
 
  public void testInfo() {
    ServerService service = new ServerService();
    service.listInfo(5);
   
  }
View Full Code Here

Examples of com.salas.bb.service.ServerService

     */
    private static void queryService(MDDiscoveryRequest request)
    {
        if (request.isServiceDiscoveryComplete()) return;

        ServerService ss = ServerService.getInstance();
        try
        {
            Map result = ss.discover(request.getUrl().toString());

            processServiceResults(result, request);
        } catch (ServerServiceException e)
        {
            boolean log = true;
View Full Code Here

Examples of com.salas.bb.service.ServerService

        {
            LOG.fine("Sending statistical information");

            try
            {
                ServerService ss = ServerService.getInstance();
                ss.ping(installationId, version, runs, OS_NAME, JAVA_VERSION, accountEmail,
                    accountPassword);

                infoSent = true;

                LOG.finer("Statistical information successfully sent.");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.