Examples of AddObserver()


Examples of org.ggp.base.server.GameServer.addObserver()

        match.enableScrambling();
      }

      GameServer gameServer = new GameServer(match, hosts, ports);
      if (spec.shouldDetail) {
        gameServer.addObserver(errorPanel);
        gameServer.addObserver(historyPanel);
        gameServer.addObserver(visualizationPanel);
        gameServer.addObserver(statesPanel);
      }
      gameServer.addObserver(schedulingPanel);
View Full Code Here

Examples of org.groovymud.engine.event.observer.Observable.addObserver()

    if (getInformer() == null) {
      try {
        MudObject obj = getAttendant().load(getShutDownInformer());
        if (obj instanceof Observable) {
          informer = (Observable) obj;
          informer.addObserver(attendant.getObjectRegistry());
          setInformer(informer);
        } else {
          logger.info("could not use shutdowninformer, was not observable");
        }
      } catch (Exception e) {
View Full Code Here

Examples of org.hibernate.engine.spi.SessionFactoryImplementor.addObserver()

            }

            if ( suppliedSessionFactoryObserver != null ) {
              sessionFactory.addObserver( suppliedSessionFactoryObserver );
            }
            sessionFactory.addObserver( new ServiceRegistryCloser() );

            // NOTE : passing cfg is temporary until
            return new EntityManagerFactoryImpl(
                persistenceUnit.getName(),
                sessionFactory,
View Full Code Here

Examples of org.jboss.aspects.patterns.observable.Subject.addObserver()

      LogUtil logUtil = new LogUtil();
     
      Subject subject = (Subject) temperature;
      Observer observer = (Observer) logUtil;
     
      subject.addObserver(observer);
     
      temperature.setTemperature(10);
      assertEquals("Temperature=10", logUtil.lastLog);
   }
View Full Code Here

Examples of org.jboss.weld.manager.BeanManagerImpl.addObserver()

            public void notify(NightTime event, Set<Annotation> qualifiers) {
                notify(event);
            }

        };
        childActivity.addObserver(observer);
        childActivity.setCurrent(dummyContext.getScope());
        Utils.getReference(beanManager, Dusk.class).ping();
        Assert.assertTrue(observer.isObserved());
    }
}
View Full Code Here

Examples of org.jpacman.framework.model.Game.addObserver()

   */
  @Test
  public void testObserverAfterPlayerMove() throws FactoryException {
    Observer anObserver = mock(Observer.class);
    Game g = makePlay("P #");
    g.addObserver(anObserver);
   
    g.movePlayer(Direction.RIGHT);
    verify(anObserver).update(any(Observable.class), anyObject());
  }
 
View Full Code Here

Examples of org.jquantlib.instruments.EuropeanOption.addObserver()

        // test
        final double refValue = option2.NPV();

        final Flag f = new Flag();
        option2.addObserver(f);

        option1.impliedVolatility(refValue*1.5, stochProcess, tolerance, maxEvaluations);

        if (f.isUp()) {
            fail("implied volatility calculation triggered a change in another instrument");
View Full Code Here

Examples of org.jquantlib.instruments.EuropeanOption.addObserver()

        // test
        final double refValue = option2.NPV();

        final Flag f = new Flag();
        option2.addObserver(f);

        option1.impliedVolatility(refValue*1.5, stochProcess, tolerance, maxEvaluations);

        if (f.isUp()) {
            fail("implied volatility calculation triggered a change in another instrument");
View Full Code Here

Examples of org.jquantlib.instruments.Instrument.addObserver()

        final RelinkableHandle<Quote> h = new RelinkableHandle<Quote>(new SimpleQuote(iniPrice));
        final Instrument s = new Stock(h);

        // attach an Observer to Stock
        final Flag priceChange = new Flag();
        s.addObserver(priceChange);

        // verify initial price
        if (iniPrice != s.NPV()) {
            fail("stock quote valuation failed");
        }
View Full Code Here

Examples of org.jquantlib.instruments.Stock.addObserver()

        final RelinkableHandle<Quote> h = new RelinkableHandle<Quote>(new SimpleQuote(iniPrice));
        final Instrument s = new Stock(h);

        // attach an Observer to Stock
        final Flag priceChange = new Flag();
        s.addObserver(priceChange);

        // verify initial price
        if (iniPrice != s.NPV()) {
            fail("stock quote valuation failed");
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.