本文整理汇总了Java中org.apache.axis2.engine.AxisConfiguration.getServiceGroups方法的典型用法代码示例。如果您正苦于以下问题:Java AxisConfiguration.getServiceGroups方法的具体用法?Java AxisConfiguration.getServiceGroups怎么用?Java AxisConfiguration.getServiceGroups使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.axis2.engine.AxisConfiguration
的用法示例。
在下文中一共展示了AxisConfiguration.getServiceGroups方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: execute
import org.apache.axis2.engine.AxisConfiguration; //导入方法依赖的package包/类
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()]);
}
示例2: init
import org.apache.axis2.engine.AxisConfiguration; //导入方法依赖的package包/类
public static void init(AxisConfiguration configuration) {
classLoaders.put("system", configuration.getSystemClassLoader());
classLoaders.put("axis2", ClassLoaderUtil.class.getClassLoader());
for (Iterator iter = configuration.getServiceGroups(); iter.hasNext(); ) {
AxisServiceGroup group = (AxisServiceGroup) iter.next();
ClassLoader serviceGroupClassLoader = group.getServiceGroupClassLoader();
if (serviceGroupClassLoader != null) {
classLoaders.put(getServiceGroupMapKey(group), serviceGroupClassLoader);
}
}
for (Object obj : configuration.getModules().values()) {
AxisModule module = (AxisModule) obj;
ClassLoader moduleClassLoader = module.getModuleClassLoader();
if (moduleClassLoader != null) {
classLoaders.put(getModuleMapKey(module), moduleClassLoader);
}
}
}
示例3: isModuleEngagedAtServiceLevel
import org.apache.axis2.engine.AxisConfiguration; //导入方法依赖的package包/类
private boolean isModuleEngagedAtServiceLevel(AxisModule axisModule) {
AxisServiceGroup axisServiceGroup;
AxisService axisService;
AxisOperation axisOperation;
AxisConfiguration config = getAxisConfiguration();
for (Iterator<AxisServiceGroup> serviceGroups = config.getServiceGroups(); serviceGroups.hasNext(); ) {
axisServiceGroup = serviceGroups.next();
if (axisServiceGroup.isEngaged(axisModule)) {
return true;
} else {
for (Iterator<AxisService> services = axisServiceGroup.getServices(); services.hasNext(); ) {
axisService = services.next();
if (this.getName().equals(axisService.getName())) { //ignore self
continue;
}
if (axisService.isEngaged(axisModule)) {
return true;
} else {
for (Iterator<AxisOperation> operations = axisService.getOperations(); operations.hasNext(); ) {
axisOperation = operations.next();
if (axisOperation.isEngaged(axisModule)) {
return true;
}
}
}
}
}
}
return false;
}
示例4: isModuleEngagedAtServiceLevel
import org.apache.axis2.engine.AxisConfiguration; //导入方法依赖的package包/类
private boolean isModuleEngagedAtServiceLevel(AxisModule axisModule) {
AxisServiceGroup axisServiceGroup;
AxisService axisService;
AxisOperation axisOperation;
AxisConfiguration config = getAxisConfiguration();
for (Iterator<AxisServiceGroup> serviceGroups = config.getServiceGroups(); serviceGroups.hasNext(); ) {
axisServiceGroup = serviceGroups.next();
if (axisServiceGroup.isEngaged(axisModule)) {
return true;
} else {
for (Iterator<AxisService> services = axisServiceGroup.getServices(); services.hasNext(); ) {
axisService = services.next();
if (axisService.isEngaged(axisModule)) {
return true;
} else {
for (Iterator<AxisOperation> operations = axisService.getOperations(); operations.hasNext(); ) {
axisOperation = operations.next();
if (this.getName().equals(axisOperation.getName()) &&
this.getAxisService().getName().equals(axisService.getName())) { //ignore self
continue;
}
if (axisOperation.isEngaged(axisModule)) {
return true;
}
}
}
}
}
}
return false;
}
示例5: isAvailableDSServiceGroup
import org.apache.axis2.engine.AxisConfiguration; //导入方法依赖的package包/类
/**
* This method verifies whether there's an existing data service group for the given name data service group.
*
* @param axisConfiguration Axis configuration
* @param dataServiceGroup Data service Group
* @return Boolean (Is available)
* @throws AxisFault
*/
public static boolean isAvailableDSServiceGroup(AxisConfiguration axisConfiguration, String dataServiceGroup)
throws AxisFault {
Iterator<AxisServiceGroup> map = axisConfiguration.getServiceGroups();
while (map.hasNext()) {
AxisServiceGroup serviceGroup = map.next();
if (serviceGroup.getServiceGroupName().equals(dataServiceGroup)) {
return true;
}
}
return false;
}
示例6: getActiveAxisServiceAccordingToDataServiceGroup
import org.apache.axis2.engine.AxisConfiguration; //导入方法依赖的package包/类
/**
* This method returns an active existing Axis Service for the given name data service group.
*
* @param axisConfiguration Axis configuration
* @param serviceName Data service Name
* @return Boolean (Is available)
* @throws AxisFault
*/
public static AxisService getActiveAxisServiceAccordingToDataServiceGroup(AxisConfiguration axisConfiguration,
String serviceName) throws AxisFault {
Iterator<AxisServiceGroup> map = axisConfiguration.getServiceGroups();
AxisServiceGroup serviceGroup = null;
while (map.hasNext()) {
serviceGroup = map.next();
if ( serviceGroup.getServiceGroupName().equals(serviceName)) {
break;
} else {
serviceGroup = null;
}
}
if (serviceName.contains("/")) {
String[] splitArray = serviceName.split("\\/");
if (splitArray.length >= 1) {
serviceName = splitArray[splitArray.length - 1];
}
}
if (serviceGroup != null) {
AxisService service = serviceGroup.getService(serviceName);
if (service != null && service.isActive()) {
return service;
}
}
return null;
}
示例7: findServiceGroup
import org.apache.axis2.engine.AxisConfiguration; //导入方法依赖的package包/类
/**
* Find the AxisServiceGroup object that matches the criteria
* <p/>
* <B>Note<B> the saved service group meta information may not
* match up with any of the serviceGroups that
* are in the current AxisConfiguration object.
*
* @param axisConfig The AxisConfiguration object
* @param serviceGrpClassName the class name string for the target object
* (could be a derived class)
* @param serviceGrpName the name associated with the service group
* @return the AxisServiceGroup object that matches the criteria
*/
public static AxisServiceGroup findServiceGroup(AxisConfiguration axisConfig,
String serviceGrpClassName,
String serviceGrpName) {
Iterator its = axisConfig.getServiceGroups();
while (its.hasNext()) {
AxisServiceGroup checkServiceGroup = (AxisServiceGroup) its.next();
String tmpSGClassName = checkServiceGroup.getClass().getName();
String tmpSGName = checkServiceGroup.getServiceGroupName();
if (tmpSGClassName.equals(serviceGrpClassName)) {
boolean found = false;
// the serviceGroupName can be null, so either both the
// service group names are null or they match
if ((tmpSGName == null) && (serviceGrpName == null)) {
found = true;
} else if ((tmpSGName != null) && (tmpSGName.equals(serviceGrpName))) {
found = true;
} else if (containsExternalizedAxisServiceName(checkServiceGroup, serviceGrpName)) {
found = true;
}
if (found) {
// trace point
if (log.isTraceEnabled()) {
log.trace("ObjectStateUtils:findServiceGroup(): returning ["
+ serviceGrpClassName + "] [" + serviceGrpName + "]");
}
return checkServiceGroup;
}
}
}
// trace point
if (log.isTraceEnabled()) {
log.trace("ObjectStateUtils:findServiceGroup(): [" + serviceGrpClassName + "] ["
+ serviceGrpName + "] returning [null]");
}
return null;
}
示例8: findServiceGroupForArtifact
import org.apache.axis2.engine.AxisConfiguration; //导入方法依赖的package包/类
/**
* Finds the AxisServiceGroup which corresponds to the given cApp Artifact. Artifact file
* name is used to identify the AxisServiceGroup. Then the service type is also checked with
* the type of the given artifact.
*
* @param artifact - cApp artifact
* @return - corresponding AxisServiceGroup
*/
private AxisServiceGroup findServiceGroupForArtifact(Artifact artifact) {
// Number of files in a service artifact should be 1
if (artifact.getFiles().size() != 1) {
return null;
}
String fileName = artifact.getFiles().get(0).getName();
AxisConfiguration axisConfiguration = getAxisConfig();
Iterator<AxisServiceGroup> serviceGroups = axisConfiguration.getServiceGroups();
while (serviceGroups.hasNext()) {
AxisServiceGroup sg = serviceGroups.next();
// Filtering the admin services
if (SystemFilter.isFilteredOutService(sg)) {
continue; // No advancement of currentIndex
}
AxisService axisService = null;
Iterator<AxisService> services = sg.getServices();
// Find a service with the file name in this service group
while (services.hasNext()) {
AxisService temp = services.next();
if (temp.getFileName() != null) {
axisService = temp;
break;
}
}
if (axisService != null) {
String filePath = axisService.getFileName().getPath().trim();
if (filePath.endsWith(fileName)) {
String serviceType = getArtifactTypeFromService(axisService, fileName);
if (serviceType.equals(artifact.getType())) {
return sg;
}
}
}
}
return null;
}