Package org.jboss.bpm.console.client.model

Examples of org.jboss.bpm.console.client.model.ServerStatus


  }

  public void handleSuccessfulResponse(final Controller controller, final Object event, Response response)
  {
    JSONValue json = JSONParser.parse(response.getText());
    ServerStatus status = BootstrapAction.parseStatus(json);

    // global var
    ServerPlugins.setStatus(status);
  }
View Full Code Here


  public static ServerStatus parseStatus(JSONValue json)
  {
    ConsoleLog.debug("parse " + json);

    ServerStatus status = new ServerStatus();

    JSONArray jsonArray = JSONWalk.on(json).next("plugins").asArray();
    for (int i = 0; i < jsonArray.size(); i++)
    {
      JSONValue item = jsonArray.get(i);
      String type = JSONWalk.on(item).next("type").asString();
      boolean avail = JSONWalk.on(item).next("available").asBool();
      status.getPlugins().add( new PluginInfo(type, avail) );
    }

    return status;
  }
View Full Code Here

  @GET
  @Path("status")
  @Produces("application/json")
  public Response getServerInfo()
  {
    ServerStatus status = getServerStatus();
    return createJsonResponse(status);
  }
View Full Code Here

  private ServerStatus getServerStatus()
  {
    if(null==this.status) // expensive to create
    {
      this.status = new ServerStatus();
      for(Class type : pluginInterfaces)
      {
        Object impl = PluginMgr.load(type);
        boolean isAvailable = (impl!=null);
View Full Code Here

TOP

Related Classes of org.jboss.bpm.console.client.model.ServerStatus

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.