|  1 |     | 
     | 
  |  2 |     | 
     | 
  |  3 |     | 
     | 
  |  4 |     | 
     | 
  |  5 |     | 
     | 
  |  6 |     | 
     | 
  |  7 |     | 
     | 
  |  8 |     | 
     | 
  |  9 |     | 
     | 
  |  10 |     | 
     | 
  |  11 |     | 
     | 
  |  12 |     | 
     | 
  |  13 |     | 
     | 
  |  14 |     | 
     | 
  |  15 |     | 
     | 
  |  16 |     | 
   package org.kuali.rice.ksb.service;  | 
  |  17 |     | 
     | 
  |  18 |     | 
   import java.util.Map;  | 
  |  19 |     | 
     | 
  |  20 |     | 
   import org.apache.cxf.Bus;  | 
  |  21 |     | 
   import org.apache.cxf.bus.CXFBusImpl;  | 
  |  22 |     | 
   import org.apache.cxf.endpoint.ServerRegistry;  | 
  |  23 |     | 
   import org.kuali.rice.ksb.messaging.MessageHelper;  | 
  |  24 |     | 
   import org.kuali.rice.ksb.messaging.threadpool.KSBScheduledPool;  | 
  |  25 |     | 
   import org.kuali.rice.ksb.messaging.threadpool.KSBThreadPool;  | 
  |  26 |     | 
     | 
  |  27 |     | 
     | 
  |  28 |    0 |    public class KSBContextServiceLocator { | 
  |  29 |     | 
     | 
  |  30 |     | 
           private Map services;  | 
  |  31 |     | 
             | 
  |  32 |     | 
       public static final String THREAD_POOL_SERVICE = "enThreadPool";  | 
  |  33 |     | 
       public static final String SCHEDULED_THREAD_POOL_SERVICE = "enScheduledThreadPool";      | 
  |  34 |     | 
     | 
  |  35 |     | 
       public Object getService(String name) { | 
  |  36 |    0 |            return services.get(name);  | 
  |  37 |     | 
       }  | 
  |  38 |     | 
     | 
  |  39 |     | 
         | 
  |  40 |     | 
     | 
  |  41 |     | 
     | 
  |  42 |     | 
           public Map getServices() { | 
  |  43 |    0 |                    return this.services;  | 
  |  44 |     | 
           }  | 
  |  45 |     | 
     | 
  |  46 |     | 
             | 
  |  47 |     | 
     | 
  |  48 |     | 
     | 
  |  49 |     | 
           public void setServices(Map services) { | 
  |  50 |    0 |                    this.services = services;  | 
  |  51 |    0 |            }  | 
  |  52 |     | 
     | 
  |  53 |     | 
       public MessageHelper getMessageHelper() { | 
  |  54 |    0 |            return (MessageHelper) getService("enMessageHelper"); | 
  |  55 |     | 
       }  | 
  |  56 |     | 
     | 
  |  57 |     | 
       public KSBThreadPool getThreadPool() { | 
  |  58 |    0 |            return (KSBThreadPool) getService(THREAD_POOL_SERVICE);  | 
  |  59 |     | 
       }  | 
  |  60 |     | 
     | 
  |  61 |     | 
       public KSBScheduledPool getScheduledPool() { | 
  |  62 |    0 |            return (KSBScheduledPool) getService(SCHEDULED_THREAD_POOL_SERVICE);  | 
  |  63 |     | 
       }  | 
  |  64 |     | 
     | 
  |  65 |     | 
       public Bus getCXFBus(){ | 
  |  66 |    0 |                return (CXFBusImpl) getService("cxf"); | 
  |  67 |     | 
       }  | 
  |  68 |     | 
         | 
  |  69 |     | 
       public ServerRegistry getCXFServerRegistry(){ | 
  |  70 |    0 |                return (ServerRegistry)getService("org.apache.cxf.endpoint.ServerRegistry"); | 
  |  71 |     | 
       }  | 
  |  72 |     | 
     | 
  |  73 |     | 
     | 
  |  74 |     | 
   }  |