Package org.knopflerfish.tutorial.dateservice

Examples of org.knopflerfish.tutorial.dateservice.DateService


  public void start(BundleContext bc) throws Exception {
    System.out.println(bc.getBundle().getHeaders().get
                       (Constants.BUNDLE_NAME) + " starting...");
    Activator.bc = bc;

    DateService         service       = new DateServiceImpl();
    ServiceRegistration registration =
      bc.registerService(DateService.class.getName(),
                         service,
                         new Hashtable());
    System.out.println("Service registered: DateService");
View Full Code Here


                       " starting...");
    Activator.bc = bc;
    ServiceReference reference =
      bc.getServiceReference(DateService.class.getName());

    DateService service = (DateService)bc.getService(reference);
    System.out.println("Using DateService: formatting date: " +
                       service.getFormattedDate(new Date()));
    bc.ungetService(reference);
  }
View Full Code Here

    Activator.bc = bc;
    ServiceReference reference =
      bc.getServiceReference(DateService.class.getName());

    if(reference != null) {
      DateService service = (DateService)bc.getService(reference);
      System.out.println("Using DateService: formatting date: " +
                         service.getFormattedDate(new Date()));
      bc.ungetService(reference);
    } else {
      System.out.println("No Service available!");
    }
  }
View Full Code Here

TOP

Related Classes of org.knopflerfish.tutorial.dateservice.DateService

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.