本文整理汇总了Java中org.apache.axis2.engine.AxisConfiguration.isEngaged方法的典型用法代码示例。如果您正苦于以下问题:Java AxisConfiguration.isEngaged方法的具体用法?Java AxisConfiguration.isEngaged怎么用?Java AxisConfiguration.isEngaged使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.axis2.engine.AxisConfiguration
的用法示例。
在下文中一共展示了AxisConfiguration.isEngaged方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onDisengage
import org.apache.axis2.engine.AxisConfiguration; //导入方法依赖的package包/类
protected void onDisengage(AxisModule module) {
AxisService service = getAxisService();
if (service == null) return;
AxisConfiguration axisConfiguration = service.getAxisConfiguration();
PhaseResolver phaseResolver = new PhaseResolver(axisConfiguration);
if (!service.isEngaged(module.getName()) &&
(axisConfiguration != null && !axisConfiguration.isEngaged(module.getName())) &&
!isModuleEngagedAtServiceLevel(module)) {
phaseResolver.disengageModuleFromGlobalChains(module);
}
phaseResolver.disengageModuleFromOperationChain(module, this);
//removing operations added at the time of module engagemnt
HashMap<QName, AxisOperation> moduleOperations = module.getOperations();
if (moduleOperations != null) {
Iterator<AxisOperation> moduleOperations_itr = moduleOperations.values().iterator();
while (moduleOperations_itr.hasNext()) {
AxisOperation operation = moduleOperations_itr.next();
service.removeOperation(operation.getName());
}
}
}
示例2: processdisengageModule
import org.apache.axis2.engine.AxisConfiguration; //导入方法依赖的package包/类
public void processdisengageModule(HttpServletRequest req, HttpServletResponse res)
throws IOException, ServletException {
String type = req.getParameter("type");
String serviceName = req.getParameter("serviceName");
String moduleName = req.getParameter("module");
AxisConfiguration axisConfiguration = configContext.getAxisConfiguration();
AxisService service = axisConfiguration.getService(serviceName);
AxisModule module = axisConfiguration.getModule(moduleName);
if (type.equals("operation")) {
if (service.isEngaged(module.getName()) ||
axisConfiguration.isEngaged(module.getName())) {
req.getSession().setAttribute("status", "Can not disengage module " + moduleName +
". This module is engaged at a higher level.");
} else {
String opName = req.getParameter("operation");
AxisOperation op = service.getOperation(new QName(opName));
op.disengageModule(module);
req.getSession()
.setAttribute("status", "Module " + moduleName + " was disengaged from " +
"operation " + opName + " in service " + serviceName + ".");
}
} else {
if (axisConfiguration.isEngaged(module.getName())) {
req.getSession()
.setAttribute("status", "Can not disengage module " + moduleName + ". " +
"This module is engaged at a higher level.");
} else {
service.disengageModule(axisConfiguration.getModule(moduleName));
req.getSession()
.setAttribute("status", "Module " + moduleName + " was disengaged from" +
" service " + serviceName + ".");
}
}
renderView("disengage.jsp", req, res);
}
示例3: onDisengage
import org.apache.axis2.engine.AxisConfiguration; //导入方法依赖的package包/类
public void onDisengage(AxisModule module) throws AxisFault {
removeModuleOperations(module);
for (Iterator operations = getChildren(); operations.hasNext();) {
AxisOperation axisOperation = (AxisOperation) operations.next();
axisOperation.disengageModule(module);
}
AxisConfiguration config = getAxisConfiguration();
if (!config.isEngaged(module.getName()) && !isModuleEngagedAtServiceLevel(module)) {
PhaseResolver phaseResolver = new PhaseResolver(config);
phaseResolver.disengageModuleFromGlobalChains(module);
}
}
示例4: setMonitoring
import org.apache.axis2.engine.AxisConfiguration; //导入方法依赖的package包/类
/**
* @param flag; support ON or OFF.
* @return The information about the Tracer service
* @throws AxisFault If the tracer module is not found
*/
public TracerServiceInfo setMonitoring(String flag) throws AxisFault {
if (!flag.equalsIgnoreCase("ON") && !flag.equalsIgnoreCase("OFF")) {
throw new RuntimeException("IllegalArgument for monitoring status. Only 'ON' and 'OFF' is allowed");
}
TracerServiceInfo tracerServiceInfo = new TracerServiceInfo();
ConfigurationContext configurationContext = getConfigContext();
AxisConfiguration axisConfiguration = configurationContext.getAxisConfiguration();
AxisModule axisModule = axisConfiguration.getModule(TracerConstants.WSO2_TRACER);
if (axisModule == null) {
throw new RuntimeException(TracerAdmin.class.getName() + " " +
TracerConstants.WSO2_TRACER + " is not available");
}
if (flag.equalsIgnoreCase("ON")) {
if (!axisConfiguration.isEngaged(axisModule.getName())) {
try {
axisConfiguration.engageModule(axisModule);
} catch (AxisFault axisFault) {
log.error(axisFault);
throw new RuntimeException(axisFault);
}
}
} else if (flag.equalsIgnoreCase("OFF")) {
if (axisConfiguration.isEngaged(axisModule.getName())) {
axisConfiguration.disengageModule(axisModule);
configurationContext.removeProperty(TracerConstants.MSG_SEQ_BUFFER);
}
}
TracePersister tracePersister = getTracePersister();
tracePersister.saveTraceStatus(flag);
tracerServiceInfo.setEmpty(true);
tracerServiceInfo.setFlag(flag);
tracerServiceInfo.setTracePersister(tracePersister.getClass().getName());
return tracerServiceInfo;
}
示例5: inferInTransport
import org.apache.axis2.engine.AxisConfiguration; //导入方法依赖的package包/类
public static TransportInDescription inferInTransport(AxisConfiguration ac,
Options options,
MessageContext msgCtxt)
throws AxisFault {
String listenerTransportProtocol = options.getTransportInProtocol();
if (listenerTransportProtocol == null) {
EndpointReference replyTo = msgCtxt.getReplyTo();
if (replyTo != null) {
try {
URI uri = new URI(replyTo.getAddress());
listenerTransportProtocol = uri.getScheme();
} catch (URISyntaxException e) {
//need to ignore
}
} else {
//assume listener transport as sender transport
if (msgCtxt.getTransportOut() != null) {
listenerTransportProtocol = msgCtxt.getTransportOut().getName();
}
}
}
TransportInDescription transportIn = null;
if (options.isUseSeparateListener() || msgCtxt.getOptions().isUseSeparateListener()) {
if ((listenerTransportProtocol != null) && !"".equals(listenerTransportProtocol)) {
transportIn = ac.getTransportIn(listenerTransportProtocol);
ListenerManager listenerManager =
msgCtxt.getConfigurationContext().getListenerManager();
if (transportIn == null) {
// TODO : User should not be mandated to give an IN transport. If it is not given, we should
// ask from the ListenerManager to give any available transport for this client.
log.error(Messages.getMessage("unknownTransport",
listenerTransportProtocol));
throw new AxisFault(Messages.getMessage("unknownTransport",
listenerTransportProtocol));
}
synchronized (ClientUtils.class) {
if (!listenerManager.isListenerRunning(transportIn.getName())) {
listenerManager.addListener(transportIn, false);
}
}
}
if (msgCtxt.getAxisService() != null) {
if (!msgCtxt.isEngaged(Constants.MODULE_ADDRESSING)) {
log.error(Messages.getMessage("2channelNeedAddressing"));
throw new AxisFault(Messages.getMessage("2channelNeedAddressing"));
}
} else {
if (!ac.isEngaged(Constants.MODULE_ADDRESSING)) {
log.error(Messages.getMessage("2channelNeedAddressing"));
throw new AxisFault(Messages.getMessage("2channelNeedAddressing"));
}
}
}
return transportIn;
}