public void onDisengage(AxisModule module) throws AxisFault { for (Iterator<AxisService> serviceIter = getServices(); serviceIter.hasNext();) { AxisService axisService = (AxisService) serviceIter.next(); axisService.disengageModule(module); } }
/** * When a module gets engaged on a ServiceGroup, we have to engage it for each Service. * * @param module the newly-engaged AxisModule * @param engager * @throws AxisFault if there is a problem */ protected void onEngage(AxisModule module, AxisDescription engager) throws AxisFault { for (Iterator<AxisService> serviceIter = getServices(); serviceIter.hasNext();) { AxisService axisService = (AxisService) serviceIter.next(); axisService.engageModule(module, engager); } }
public void onDisengage(AxisModule module) throws AxisFault { for (Iterator<AxisService> serviceIter = getServices(); serviceIter.hasNext();) { AxisService axisService = (AxisService) serviceIter.next(); axisService.disengageModule(module); } }
/** * When a module gets engaged on a ServiceGroup, we have to engage it for each Service. * * @param module the newly-engaged AxisModule * @param engager * @throws AxisFault if there is a problem */ protected void onEngage(AxisModule module, AxisDescription engager) throws AxisFault { for (Iterator<AxisService> serviceIter = getServices(); serviceIter.hasNext();) { AxisService axisService = (AxisService) serviceIter.next(); axisService.engageModule(module, engager); } }
/** * Answer if there are any AxisServices in the specified ServiceGroup that have an externalized * name that matches the service group name. * * @param checkServiceGroup The AxisServiceGroup containing the AxisServies to check * @param serviceGrpName The name to check as the externalized name of the AxisService * @return true if the group contains an AxisService with that name; false otherwise. */ private static boolean containsExternalizedAxisServiceName( AxisServiceGroup checkServiceGroup, String serviceGrpName) { boolean containsAxisService = false; if (serviceGrpName != null && checkServiceGroup != null) { // Get a list of AxisServices on the group // Iterate over them to see if any have the Externalized Name Parameter // If so and it mathces, then this service group name then use this service group Iterator axisServicesInGroup = checkServiceGroup.getServices(); while (axisServicesInGroup.hasNext()) { AxisService checkService = (AxisService) axisServicesInGroup.next(); String externalizedServiceName = (String) checkService.getParameterValue(EXTERNALIZED_AXIS_SERVICE_NAME); if (externalizedServiceName != null && externalizedServiceName.equals(serviceGrpName)) { containsAxisService = true; break; } } } return containsAxisService; }
/** * Answer if there are any AxisServices in the specified ServiceGroup that have an externalized * name that matches the service group name. * * @param checkServiceGroup The AxisServiceGroup containing the AxisServies to check * @param serviceGrpName The name to check as the externalized name of the AxisService * @return true if the group contains an AxisService with that name; false otherwise. */ private static boolean containsExternalizedAxisServiceName( AxisServiceGroup checkServiceGroup, String serviceGrpName) { boolean containsAxisService = false; if (serviceGrpName != null && checkServiceGroup != null) { // Get a list of AxisServices on the group // Iterate over them to see if any have the Externalized Name Parameter // If so and it mathces, then this service group name then use this service group Iterator axisServicesInGroup = checkServiceGroup.getServices(); while (axisServicesInGroup.hasNext()) { AxisService checkService = (AxisService) axisServicesInGroup.next(); String externalizedServiceName = (String) checkService.getParameterValue(EXTERNALIZED_AXIS_SERVICE_NAME); if (externalizedServiceName != null && externalizedServiceName.equals(serviceGrpName)) { containsAxisService = true; break; } } } return containsAxisService; }
/** * Walk through the list of services and use the maximum of the scopes as the scope * for the whole service group * * @param axisServiceGroup the service group * @return scope for the service group */ public static String calculateMaxScopeForServiceGroup(AxisServiceGroup axisServiceGroup) { Iterator<AxisService> servics = axisServiceGroup.getServices(); int maxScope = 1; while (servics.hasNext()) { AxisService axisService = (AxisService) servics.next(); int scopeIntValue = getScopeIntValue(axisService.getScope()); if (maxScope < scopeIntValue) { maxScope = scopeIntValue; } } return getScopeString(maxScope); }
public void execute(ConfigurationContext configCtx) throws ClusteringFault { List serviceGroupNames = new ArrayList(); AxisConfiguration axisConfig = configCtx.getAxisConfiguration(); for (Iterator iter = axisConfig.getServiceGroups(); iter.hasNext();) { AxisServiceGroup serviceGroup = (AxisServiceGroup) iter.next(); boolean excludeSG = false; for (Iterator serviceIter = serviceGroup.getServices(); serviceIter.hasNext();) { AxisService service = (AxisService) serviceIter.next(); if (service.getParameter(AxisModule.MODULE_SERVICE) != null || service.isClientSide()) { // No need to send services deployed through modules or client side services excludeSG = true; break; } } //TODO: Exclude all services loaded from modules. How to handle data services etc.? if (!excludeSG) { serviceGroupNames.add(serviceGroup.getServiceGroupName()); } } this.serviceGroupNames = (String[]) serviceGroupNames.toArray(new String[serviceGroupNames.size()]); }
public void execute(ConfigurationContext configCtx) throws ClusteringFault { List serviceGroupNames = new ArrayList(); AxisConfiguration axisConfig = configCtx.getAxisConfiguration(); for (Iterator iter = axisConfig.getServiceGroups(); iter.hasNext();) { AxisServiceGroup serviceGroup = (AxisServiceGroup) iter.next(); boolean excludeSG = false; for (Iterator serviceIter = serviceGroup.getServices(); serviceIter.hasNext();) { AxisService service = (AxisService) serviceIter.next(); if (service.getParameter(AxisModule.MODULE_SERVICE) != null || service.isClientSide()) { // No need to send services deployed through modules or client side services excludeSG = true; break; } } //TODO: Exclude all services loaded from modules. How to handle data services etc.? if (!excludeSG) { serviceGroupNames.add(serviceGroup.getServiceGroupName()); } } this.serviceGroupNames = (String[]) serviceGroupNames.toArray(new String[serviceGroupNames.size()]); }
/** * Walk through the list of services and use the maximum of the scopes as the scope * for the whole service group * * @param axisServiceGroup the service group * @return scope for the service group */ public static String calculateMaxScopeForServiceGroup(AxisServiceGroup axisServiceGroup) { Iterator<AxisService> servics = axisServiceGroup.getServices(); int maxScope = 1; while (servics.hasNext()) { AxisService axisService = (AxisService) servics.next(); int scopeIntValue = getScopeIntValue(axisService.getScope()); if (maxScope < scopeIntValue) { maxScope = scopeIntValue; } } return getScopeString(maxScope); }
if (log.isInfoEnabled()) { List<String> serviceNames = new ArrayList<String>(); for (Iterator<AxisService> iterator = axisServiceGroup.getServices(); iterator.hasNext(); ) { AxisService service = (AxisService) iterator.next();
if (serviceGrp.isEngaged(module)) { if (moduleId.equalsIgnoreCase("rahas")) { // Check if Rahas disengaging is possible for (Iterator iter = serviceGrp.getServices(); iter.hasNext();) { checkRahasDisengagingForService((AxisService) iter.next(), moduleId); for (Iterator iter = serviceGrp.getServices(); iter.hasNext();) { checkRampartDisengagingForService((AxisService) iter.next(), moduleId);
Iterator<AxisService> services = sg.getServices();
protected static OMElement createServiceGroupXMLInfoset(AxisServiceGroup axisServiceGroup) { OMFactory fac = OMAbstractFactory.getOMFactory(); OMNamespace ns = fac.createOMNamespace("", ""); OMElement serviceGroupEle = createOMElement(fac, ns, DeploymentConstants.TAG_SERVICE_GROUP); /*OMAttribute serviceGroupName = createOMAttribute(fac, ns, DeploymentConstants.ATTRIBUTE_NAME, axisServiceGroup.getServiceGroupName()); serviceGroupEle.addAttribute(serviceGroupName);*/ List parameterList = axisServiceGroup.getParameters(); serializeParameterList(parameterList, serviceGroupEle, fac, ns); Collection axisServiceGroupModuleCollection = axisServiceGroup.getEngagedModules(); serializeModules(axisServiceGroupModuleCollection, serviceGroupEle, fac, ns, axisServiceGroup); for (Iterator iterator = axisServiceGroup.getServices(); iterator.hasNext();) { AxisService axisService = (AxisService) iterator.next(); OMElement axisServiceEle = createServicesXMLInfoset(axisService); serviceGroupEle.addChild(axisServiceEle); } return serviceGroupEle; }
public AxisServiceGroup removeServiceGroup(String serviceGroupName) throws AxisFault { AxisServiceGroup axisServiceGroup = (AxisServiceGroup) getChild(serviceGroupName); if (axisServiceGroup == null) { throw new AxisFault(Messages.getMessage("invalidservicegroupname", serviceGroupName)); } Iterator<AxisService> services = axisServiceGroup.getServices(); boolean isClientSide = false; while (services.hasNext()) { AxisService axisService = services.next(); isClientSide = axisService.isClientSide()? true : false; //removes the endpoints to this service removeServiceReferences(axisService.getName()); } removeChild(serviceGroupName); if (!isClientSide) { notifyObservers(new AxisEvent(AxisEvent.SERVICE_REMOVE, axisServiceGroup), axisServiceGroup); } return axisServiceGroup; }
public AxisServiceGroup removeServiceGroup(String serviceGroupName) throws AxisFault { AxisServiceGroup axisServiceGroup = (AxisServiceGroup) getChild(serviceGroupName); if (axisServiceGroup == null) { throw new AxisFault(Messages.getMessage("invalidservicegroupname", serviceGroupName)); } Iterator<AxisService> services = axisServiceGroup.getServices(); boolean isClientSide = false; while (services.hasNext()) { AxisService axisService = services.next(); isClientSide = axisService.isClientSide()? true : false; //removes the endpoints to this service removeServiceReferences(axisService.getName()); } removeChild(serviceGroupName); if (!isClientSide) { notifyObservers(new AxisEvent(AxisEvent.SERVICE_REMOVE, axisServiceGroup), axisServiceGroup); } return axisServiceGroup; }
for (Iterator<AxisService> services = serviceGroup.getServices(); services.hasNext();) { AxisService axisService = (AxisService) services.next(); ServiceLifeCycle serviceLifeCycle = axisService.getServiceLifeCycle();
for (Iterator<AxisService> services = serviceGroup.getServices(); services.hasNext();) { AxisService axisService = (AxisService) services.next(); ServiceLifeCycle serviceLifeCycle = axisService.getServiceLifeCycle();
Iterator<AxisService> serviceItr = serviceGroup.getServices(); while (serviceItr.hasNext()) { AxisService axisService = (AxisService) serviceItr.next();
Iterator<AxisService> serviceItr = serviceGroup.getServices(); while (serviceItr.hasNext()) { AxisService axisService = (AxisService) serviceItr.next();