Package org.vitaliyl.monitoring.server.beans

Examples of org.vitaliyl.monitoring.server.beans.ServerDescriptor


  @GET
  @Path("/createServers")
  public String createServers() {
    List<ServerDescriptor> list = new ArrayList<ServerDescriptor>();

    ServerDescriptor descriptor;
    descriptor = new ServerDescriptor("http://iphone.releaze.dk/ngxstats", 600);
    list.add(descriptor);
    descriptor = new ServerDescriptor("http://campaigns.releaze.dk/ngxstats", 1800);
    list.add(descriptor);
    descriptor = new ServerDescriptor("http://tjek.releaze.dk/ngxstats", 600);
    list.add(descriptor);
    descriptor = new ServerDescriptor("http://nginx.releaze.dk/ngxstats", 600);
    list.add(descriptor);
    descriptor = new ServerDescriptor("http://src.releaze.dk/ngxstats", 1200);
    list.add(descriptor);
    descriptor = new ServerDescriptor("http://tjekscores.dk/ngxstats", 400);
    list.add(descriptor);
    descriptor = new ServerDescriptor("http://tjekbenzin.dk/ngxstats", 100);
    list.add(descriptor);
    descriptor = new ServerDescriptor("http://demo.releaze.dk/ngxstats", 100);
    list.add(descriptor);
    descriptor = new ServerDescriptor("http://util.releaze.dk/ngxstats", 200);
    list.add(descriptor);

    for (int i = 0; i < list.size(); i++) {
      AServerDescriptorDAO.createServerDescriptor(list.get(i));
    }
View Full Code Here


    List<Entity> entities = preparedQuery.asList(Datastore.DEFAULT_FETCH_OPTIONS);
 
    List<ServerDescriptor> list = new ArrayList<ServerDescriptor>();
 
    Entity entity = null;
    ServerDescriptor sd;
    if (!entities.isEmpty()) {
      for (int i = 0; i < entities.size(); i++) {
        entity = entities.get(i);
 
        String serverUrl = (String) entity.getProperty(Datastore.SERVER_SERVER_URL);
        int maxConnections = ((Long) entity.getProperty(Datastore.SERVER_MAX_CONNECTIONS)).intValue();
 
        sd = new ServerDescriptor(serverUrl, maxConnections);
        sd.setId(KeyFactory.keyToString(entity.getKey()));
        list.add(sd);
      }
    }
 
    return list;
View Full Code Here

TOP

Related Classes of org.vitaliyl.monitoring.server.beans.ServerDescriptor

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.