Package com.example.helloworld.db

Examples of com.example.helloworld.db.MongoHealthCheck


  public void run(HelloWorldConfiguration config, Environment environment) throws UnknownHostException
  {
    Mongo mongo = new Mongo(config.mongohost, config.mongoport);
    MongoManaged mongoManaged = new MongoManaged(mongo);
    environment.manage(mongoManaged);
    environment.addHealthCheck(new MongoHealthCheck(mongo));
    DB db = mongo.getDB(config.mongodb);
    JacksonDBCollection<World, String> worlds = JacksonDBCollection.wrap(db.getCollection("world"), World.class, String.class);
    environment.addResource(new WorldResource(worlds));
    environment.addResource(new JsonResource());
  }
View Full Code Here

TOP

Related Classes of com.example.helloworld.db.MongoHealthCheck

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.