Package com.salas.bb.core

Examples of com.salas.bb.core.ScoresCalculator$Calculator


     *
     * @return tab.
     */
    private Component createBlogStarzTab()
    {
        ScoresCalculator calc = GlobalModel.SINGLETON.getScoreCalculator();
        double activity = calc.calcActivity(feed);
        double inlinks = calc.calcInlinksScore(feed);
        double views = calc.calcFeedViewsScore(feed);
        double clickthroughs = calc.calcClickthroughsScore(feed);
        blogStarzScore = calc.calcBlogStarzScore(feed);
        rating = feed.getRating();

        StarzPreferences prefs = GlobalModel.SINGLETON.getStarzPreferences();
        int activityWeight = prefs.getActivityWeight();
        int inlinksWeight = prefs.getInlinksWeight();
View Full Code Here


      {IsLocalProxyFactoryInterceptor.singleton, new NotToBeInvokedInterceptor()};
      PojiProxy handler = new PojiProxy(KEY, null, interceptors);
      Class<?>[] interfaces = new Class<?>[]
      {Calculator.class};
      // create the proxy
      Calculator calculator = (Calculator) Proxy.newProxyInstance(interfaces[0].getClassLoader(), interfaces, handler);
      // register with dispatcher too, since the IsLocalProxyFactoryInterceptor
      // looks for the key in the dispatcher
      Dispatcher.singleton.registerTarget(KEY, new CalculatorImpl());

      try
      {
         int result = calculator.add(1, 2);
         logger.info("Successfully invoked method. Result = " + result);
         Assert.assertEquals("Incorrect result from calculator", result, 3);
      }
      catch (IllegalInvocationException iie)
      {
View Full Code Here

TOP

Related Classes of com.salas.bb.core.ScoresCalculator$Calculator

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.