Exemplo n.º 1
0
 /** Hydra_ statics. */
 @Test
 public void hydra_Statics() {
   Assert.assertEquals("Hydra Name.", "Hydra", Hydra.getName());
   Assert.assertEquals(
       "Hydra Description.", "Multi-Headed Version Control System", Hydra.getDescription());
   Assert.assertEquals("Hydra Version.", "0.2", Hydra.getVersion());
   Assert.assertEquals("Hydra Name.", "201107-01", Hydra.getBuildNumber());
 }
Exemplo n.º 2
0
 public synchronized void shutdown() {
   if (hydra == null) {
     return;
   }
   hydra.shutdown();
   hydra = null;
 }
Exemplo n.º 3
0
  public synchronized void startup() {
    if (hydra != null) {
      return;
    }

    if (registry.isEmpty()) {
      LOGGER.error("Not found NS handler was be registered");
      return;
    }

    HydraBuilder builder = new HydraBuilder();
    builder.bind(host).port(port).messageReceivedListener(this).threads(option.getThreads());
    hydra = builder.build();
    hydra.startup();
  }