| 1 | |
|
| 2 | |
|
| 3 | |
|
| 4 | |
|
| 5 | |
|
| 6 | |
|
| 7 | |
|
| 8 | |
|
| 9 | |
|
| 10 | |
|
| 11 | |
|
| 12 | |
|
| 13 | |
|
| 14 | |
|
| 15 | |
|
| 16 | |
package org.kuali.rice.ksb.api; |
| 17 | |
|
| 18 | |
import org.kuali.rice.core.api.resourceloader.GlobalResourceLoader; |
| 19 | |
import org.kuali.rice.ksb.api.bus.ServiceBus; |
| 20 | |
import org.kuali.rice.ksb.api.messaging.MessageHelper; |
| 21 | |
import org.kuali.rice.ksb.api.registry.ServiceRegistry; |
| 22 | |
|
| 23 | |
|
| 24 | |
|
| 25 | |
|
| 26 | |
|
| 27 | 0 | public class KsbApiServiceLocator { |
| 28 | |
|
| 29 | |
public static final String SERVICE_BUS = "rice.ksb.serviceBus"; |
| 30 | |
public static final String SERVICE_REGISTRY = "rice.ksb.serviceRegistry"; |
| 31 | |
public static final String MESSAGE_HELPER = "rice.ksb.messageHelper"; |
| 32 | |
|
| 33 | |
static <T> T getService(String serviceName) { |
| 34 | 0 | return GlobalResourceLoader.<T>getService(serviceName); |
| 35 | |
} |
| 36 | |
|
| 37 | |
public static ServiceBus getServiceBus() { |
| 38 | 0 | return getService(SERVICE_BUS); |
| 39 | |
} |
| 40 | |
|
| 41 | |
public static ServiceRegistry getServiceRegistry() { |
| 42 | 0 | return getService(SERVICE_REGISTRY); |
| 43 | |
} |
| 44 | |
|
| 45 | |
public static MessageHelper getMessageHelper() { |
| 46 | 0 | return getService(MESSAGE_HELPER); |
| 47 | |
} |
| 48 | |
} |