Java Code Examples for org.apache.axis2.description.AxisService#getParameterValue()
The following examples show how to use
org.apache.axis2.description.AxisService#getParameterValue() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: SystemStatisticsDeploymentInterceptor.java From carbon-commons with Apache License 2.0 | 5 votes |
public void serviceUpdate(AxisEvent axisEvent, AxisService axisService) { if (SystemFilter.isFilteredOutService(axisService.getAxisServiceGroup()) || axisService.isClientSide()) { return; } if (axisEvent.getEventType() == AxisEvent.SERVICE_DEPLOY) { for (Iterator iter = axisService.getOperations(); iter.hasNext(); ) { AxisOperation op = (AxisOperation) iter.next(); setCountersAndProcessors(op); } // see ESBJAVA-2327 if (JavaUtils.isTrueExplicitly(axisService.getParameterValue("disableOperationValidation"))) { AxisOperation defaultOp = (AxisOperation) axisService.getParameterValue("_default_mediate_operation_"); if (defaultOp != null) { setCountersAndProcessors(defaultOp); } } // Service response time processor Parameter responseTimeProcessor = new Parameter(); responseTimeProcessor.setName(StatisticsConstants.SERVICE_RESPONSE_TIME_PROCESSOR); responseTimeProcessor.setValue(new ResponseTimeProcessor()); try { axisService.addParameter(responseTimeProcessor); } catch (AxisFault axisFault) { // will not occur } } }
Example 2
Source File: ProxyTimerTask.java From carbon-commons with Apache License 2.0 | 4 votes |
public void run() { synchronized (axisConfig) { PrivilegedCarbonContext.startTenantFlow(); try { PrivilegedCarbonContext privilegedCarbonContext = PrivilegedCarbonContext.getThreadLocalCarbonContext(); privilegedCarbonContext.setTenantId(MultitenantConstants.SUPER_TENANT_ID); privilegedCarbonContext.setTenantDomain(MultitenantConstants.SUPER_TENANT_DOMAIN_NAME); AxisServiceGroup proxyAxisServiceGroup = axisConfig.getServiceGroup(WSDL2FormGenerator.TRYIT_SG_NAME); if (proxyAxisServiceGroup != null) { List removeServiceList = new ArrayList(); for (Iterator iterator = proxyAxisServiceGroup.getServices(); iterator.hasNext();) { AxisService axisServce = (AxisService) iterator.next(); Long longTime = (Long) axisServce .getParameterValue(WSDL2FormGenerator.LAST_TOUCH_TIME); if ((System.currentTimeMillis() - longTime.longValue()) > WSDL2FormGenerator .PERIOD) { removeServiceList.add(axisServce.getName()); } } if (removeServiceList.size() > 0) { for (Iterator iterator = removeServiceList.iterator(); iterator.hasNext();) { String axisServiceName = (String) iterator.next(); proxyAxisServiceGroup.removeService(axisServiceName); } } boolean isLast = proxyAxisServiceGroup.getServices().hasNext(); if (!isLast) { axisConfig.removeServiceGroup(WSDL2FormGenerator.TRYIT_SG_NAME); } } } catch (AxisFault axisFault) { String msg = "Fault occured when manipulating Tryit proxy service group"; log.error(msg, axisFault); } finally { PrivilegedCarbonContext.endTenantFlow(); } } }