// Path: webservice/src/main/java/com/griddelta/memnon/MemnonApplication.java
// public class MemnonApplication extends Application<MemnonConfiguration> {
//     public static CassandraStorage storage = null;
//     MemnonConfiguration config = null;
// 
//     public static void main(String[] args) throws Exception {    	
//         MemnonApplication app = new MemnonApplication();
//         app.run(args);
//     }
// 
//     @Override
//     public void initialize(Bootstrap<MemnonConfiguration> bootstrap) {
//         bootstrap.addBundle(new AssetsBundle("/ui", "/foo"));
//         // bootstrap.addCommand(new MemnonCommand(this));
//     }
// 
//     @Override
//     public void run(MemnonConfiguration configuration, Environment env) throws Exception {    	
//         this.setStorage(new CassandraStorage(configuration.getHost(), configuration.getPort()));
//         env.jersey().register(new DataResource(this));
//         env.healthChecks().register("Cassandra", new CassandraHealthCheck(this, configuration));
//         env.jersey().register(new KeyspaceExceptionMapper());
//     }
// 
//     public CassandraStorage getStorage() {
//         return storage;
//     }
// 
//     public void setStorage(CassandraStorage storage) {
//         MemnonApplication.storage = storage;
//     }
// 
//     public MemnonConfiguration getConfig() {
//         return config;
//     }
// 
//     public void setConfig(MemnonConfiguration config) {
//         this.config = config;
//     }
// }
// 
// Path: webservice/src/main/java/com/griddelta/memnon/MemnonConfiguration.java
// public class MemnonConfiguration extends Configuration {
//     @NotEmpty
//     @NotNull
//     private String host;
// 
//     @Min(1)
//     @Max(65535)
//     private int port = 9160;
// 
//     public String getHost() {
//         return host;
//     }
// 
//     public int getPort() {
//        return port;
//     }
// 
//     public ConsistencyLevel getConsistencyLevel(){
//         // TOOD: Make this configurable
//         return ConsistencyLevel.QUORUM;
//     }
// }


import org.json.simple.JSONArray;
import com.codahale.metrics.health.HealthCheck;
import com.griddelta.memnon.MemnonApplication;
import com.griddelta.memnon.MemnonConfiguration;
package com.griddelta.memnon.health;



public class CassandraHealthCheck extends HealthCheck {
	private MemnonApplication service;
// Path: webservice/src/main/java/com/griddelta/memnon/MemnonApplication.java
// public class MemnonApplication extends Application<MemnonConfiguration> {
//     public static CassandraStorage storage = null;
//     MemnonConfiguration config = null;
// 
//     public static void main(String[] args) throws Exception {    	
//         MemnonApplication app = new MemnonApplication();
//         app.run(args);
//     }
// 
//     @Override
//     public void initialize(Bootstrap<MemnonConfiguration> bootstrap) {
//         bootstrap.addBundle(new AssetsBundle("/ui", "/foo"));
//         // bootstrap.addCommand(new MemnonCommand(this));
//     }
// 
//     @Override
//     public void run(MemnonConfiguration configuration, Environment env) throws Exception {    	
//         this.setStorage(new CassandraStorage(configuration.getHost(), configuration.getPort()));
//         env.jersey().register(new DataResource(this));
//         env.healthChecks().register("Cassandra", new CassandraHealthCheck(this, configuration));
//         env.jersey().register(new KeyspaceExceptionMapper());
//     }
// 
//     public CassandraStorage getStorage() {
//         return storage;
//     }
// 
//     public void setStorage(CassandraStorage storage) {
//         MemnonApplication.storage = storage;
//     }
// 
//     public MemnonConfiguration getConfig() {
//         return config;
//     }
// 
//     public void setConfig(MemnonConfiguration config) {
//         this.config = config;
//     }
// }
// 
// Path: webservice/src/main/java/com/griddelta/memnon/MemnonConfiguration.java
// public class MemnonConfiguration extends Configuration {
//     @NotEmpty
//     @NotNull
//     private String host;
// 
//     @Min(1)
//     @Max(65535)
//     private int port = 9160;
// 
//     public String getHost() {
//         return host;
//     }
// 
//     public int getPort() {
//        return port;
//     }
// 
//     public ConsistencyLevel getConsistencyLevel(){
//         // TOOD: Make this configurable
//         return ConsistencyLevel.QUORUM;
//     }
// }


// Path: webservice/src/main/java/com/griddelta/memnon/health/CassandraHealthCheck.java
import org.json.simple.JSONArray;
import com.codahale.metrics.health.HealthCheck;
import com.griddelta.memnon.MemnonApplication;
import com.griddelta.memnon.MemnonConfiguration;

package com.griddelta.memnon.health;



public class CassandraHealthCheck extends HealthCheck {
	private MemnonApplication service;
    private MemnonConfiguration configuration;