本文整理汇总了Java中org.ofbiz.service.config.model.JmsService类的典型用法代码示例。如果您正苦于以下问题:Java JmsService类的具体用法?Java JmsService怎么用?Java JmsService使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
JmsService类属于org.ofbiz.service.config.model包,在下文中一共展示了JmsService类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: run
import org.ofbiz.service.config.model.JmsService; //导入依赖的package包/类
protected Map<String, Object> run(ModelService modelService, Map<String, Object> context) throws GenericServiceException {
JmsService serviceElement = getServiceElement(modelService);
List<Server> serverList = serviceElement.getServers();
Map<String, Object> result = new HashMap<String, Object>();
for (Server server: serverList) {
String serverType = server.getType();
if (serverType.equals("topic"))
result.putAll(runTopic(modelService, context, server));
else if (serverType.equals("queue"))
result.putAll(runQueue(modelService, context, server));
else
throw new GenericServiceException("Illegal server messaging type.");
}
return result;
}
示例2: run
import org.ofbiz.service.config.model.JmsService; //导入依赖的package包/类
protected Map<String, Object> run(ModelService modelService, Map<String, Object> context) throws GenericServiceException {
JmsService serviceElement = getServiceElement(modelService);
List<Server> serverList = serviceElement.getServers();
Map<String, Object> result = FastMap.newInstance();
for (Server server: serverList) {
String serverType = server.getType();
if (serverType.equals("topic"))
result.putAll(runTopic(modelService, context, server));
else if (serverType.equals("queue"))
result.putAll(runQueue(modelService, context, server));
else
throw new GenericServiceException("Illegal server messaging type.");
}
return result;
}
示例3: getServiceElement
import org.ofbiz.service.config.model.JmsService; //导入依赖的package包/类
protected JmsService getServiceElement(ModelService modelService) throws GenericServiceException {
String location = this.getLocation(modelService);
try {
return ServiceConfigUtil.getServiceEngine().getJmsServiceByName(location);
} catch (GenericConfigException e) {
throw new GenericServiceException(e);
}
}