Package org.jamesii.core.services.management

Examples of org.jamesii.core.services.management.IServiceManagement


   *          the service type the list of services shall be retrieved for
   *
   * @return the service list
   */
  public synchronized List<IService> getServiceList(Class<?> serviceType) {
    IServiceManagement sm = serviceTypes.get(serviceType);
    return new ArrayList<>(sm.getList());
  }
View Full Code Here


   *
   * @return the un booked service list
   */
  @SuppressWarnings("unchecked")
  public synchronized <T> List<T> getUnBookedServiceList(Class<?> serviceType) {
    IServiceManagement sm = serviceTypes.get(serviceType);
    List<IService> services = new ArrayList<>(sm.getList());
    Iterator<IService> itService = services.iterator();
    while (itService.hasNext()) {
      IService service = itService.next();
      // get rid of all services of the type looked for which do not have any
      // free resources
View Full Code Here

   * @return the booked service, if successful, null if not
   */
  @SuppressWarnings("unchecked")
  public synchronized <T extends IService> T getAndBookService(
      Class<?> serviceType, Object purpose) {
    IServiceManagement sm = serviceTypes.get(serviceType);
    if (sm != null) {
      List<IService> services = sm.getList();
      for (int i = 0; i < services.size(); i++) {
        IService service = services.get(i);
        if (bookService(service, purpose)) {
          return (T) service;
        }
View Full Code Here

TOP

Related Classes of org.jamesii.core.services.management.IServiceManagement

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.