本文整理了Java中org.apache.axis2.description.Parameter.setName()
方法的一些代码示例,展示了Parameter.setName()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Parameter.setName()
方法的具体详情如下:
包路径:org.apache.axis2.description.Parameter
类名称:Parameter
方法名:setName
[英]Method setName.
[中]方法setName。
代码示例来源:origin: apache/axis2-java
/**
* Generate a parametes object
*
* @param key
* @param value
*/
private Parameter getParameter(String key, Object value) {
Parameter myParameter = new Parameter();
myParameter.setName(key);
myParameter.setValue(value);
return myParameter;
}
代码示例来源:origin: apache/axis2-java
/**
* Generate a parametes object
*
* @param key
* @param value
*/
private Parameter getParameter(String key, Object value) {
Parameter myParameter = new Parameter();
myParameter.setName(key);
myParameter.setValue(value);
return myParameter;
}
代码示例来源:origin: org.wso2.carbon.identity.framework/org.wso2.carbon.security.mgt
public static Parameter getClientUsernameTokenHandler(String password) {
Parameter param = new Parameter();
param.setName(WSHandlerConstants.PW_CALLBACK_REF);
param.setValue(new ClientUserPasswordCallbackHandler(password));
return param;
}
}
代码示例来源:origin: org.wso2.carbon.identity/org.wso2.carbon.security.mgt
public static Parameter getClientUsernameTokenHandler(String password) {
Parameter param = new Parameter();
param.setName(WSHandlerConstants.PW_CALLBACK_REF);
param.setValue(new ClientUserPasswordCallbackHandler(password));
return param;
}
}
代码示例来源:origin: wso2/carbon-identity-framework
public static Parameter getClientUsernameTokenHandler(String password) {
Parameter param = new Parameter();
param.setName(WSHandlerConstants.PW_CALLBACK_REF);
param.setValue(new ClientUserPasswordCallbackHandler(password));
return param;
}
}
代码示例来源:origin: org.wso2.carbon.identity/org.wso2.carbon.security.mgt
public static Parameter getTokenCancelerConfigParameter() {
OMFactory fac = OMAbstractFactory.getOMFactory();
OMElement paramElem = fac.createOMElement(new QName("parameter"), null);
paramElem.addAttribute(fac.createOMAttribute("name",
null,
TokenCancelerConfig.TOKEN_CANCELER_CONFIG.
getLocalPart()));
paramElem.addAttribute(fac.createOMAttribute("type",
null, Integer.toString(Parameter.OM_PARAMETER).
toString()));
fac.createOMElement(TokenCancelerConfig.TOKEN_CANCELER_CONFIG,
paramElem);
Parameter param = new Parameter();
param.setName(TokenCancelerConfig.TOKEN_CANCELER_CONFIG.getLocalPart());
param.setParameterElement(paramElem);
param.setValue(paramElem);
param.setParameterType(Parameter.OM_PARAMETER);
return param;
}
}
代码示例来源:origin: org.wso2.carbon.identity.framework/org.wso2.carbon.security.mgt
public static Parameter getTokenCancelerConfigParameter() {
OMFactory fac = OMAbstractFactory.getOMFactory();
OMElement paramElem = fac.createOMElement(new QName("parameter"), null);
paramElem.addAttribute(fac.createOMAttribute("name",
null,
TokenCancelerConfig.TOKEN_CANCELER_CONFIG.
getLocalPart()));
paramElem.addAttribute(fac.createOMAttribute("type",
null, Integer.toString(Parameter.OM_PARAMETER).
toString()));
fac.createOMElement(TokenCancelerConfig.TOKEN_CANCELER_CONFIG,
paramElem);
Parameter param = new Parameter();
param.setName(TokenCancelerConfig.TOKEN_CANCELER_CONFIG.getLocalPart());
param.setParameterElement(paramElem);
param.setValue(paramElem);
param.setParameterType(Parameter.OM_PARAMETER);
return param;
}
}
代码示例来源:origin: wso2/carbon-identity-framework
public static Parameter getTokenCancelerConfigParameter() {
OMFactory fac = OMAbstractFactory.getOMFactory();
OMElement paramElem = fac.createOMElement(new QName("parameter"), null);
paramElem.addAttribute(fac.createOMAttribute("name",
null,
TokenCancelerConfig.TOKEN_CANCELER_CONFIG.
getLocalPart()));
paramElem.addAttribute(fac.createOMAttribute("type",
null, Integer.toString(Parameter.OM_PARAMETER).
toString()));
fac.createOMElement(TokenCancelerConfig.TOKEN_CANCELER_CONFIG,
paramElem);
Parameter param = new Parameter();
param.setName(TokenCancelerConfig.TOKEN_CANCELER_CONFIG.getLocalPart());
param.setParameterElement(paramElem);
param.setValue(paramElem);
param.setParameterType(Parameter.OM_PARAMETER);
return param;
}
}
代码示例来源:origin: org.wso2.carbon.identity/org.wso2.carbon.security.mgt
protected void disableRESTCalls(String serviceName, String scenrioId)
throws SecurityConfigException {
if (scenrioId.equals(SecurityConstants.USERNAME_TOKEN_SCENARIO_ID)) {
return;
}
try {
AxisService service = axisConfig.getServiceForActivation(serviceName);
if (service == null) {
throw new SecurityConfigException("nullService");
}
Parameter param = new Parameter();
param.setName(DISABLE_REST);
param.setValue(Boolean.TRUE.toString());
service.addParameter(param);
} catch (AxisFault e) {
log.error(e);
throw new SecurityConfigException("disablingREST", e);
}
}
代码示例来源:origin: org.wso2.carbon.identity.framework/org.wso2.carbon.security.mgt
protected void disableRESTCalls(String serviceName, String scenrioId)
throws SecurityConfigException {
if (scenrioId.equals(SecurityConstants.USERNAME_TOKEN_SCENARIO_ID)) {
return;
}
try {
AxisService service = axisConfig.getServiceForActivation(serviceName);
if (service == null) {
throw new SecurityConfigException("nullService");
}
Parameter param = new Parameter();
param.setName(DISABLE_REST);
param.setValue(Boolean.TRUE.toString());
service.addParameter(param);
} catch (AxisFault e) {
log.error(e);
throw new SecurityConfigException("disablingREST", e);
}
}
代码示例来源:origin: org.apache.axis2/axis2-metadata
/**
* Return a Parameter instance for ServiceRefName if that name was specified on the sparse composite when the Service was created.
* @param sparseCompositeKey identifies the instance of the service (i.e. Service Delegate)
* @return A Parameter containing the ServiceRefName or null if one was not specified.
*/
private Parameter getServiceRefNameParam(Object sparseCompositeKey) {
Parameter serviceRefNameParam = null;
// The ServiceRefName, if specified, is set on the sparse composite associated with the service.
String serviceRefName = getServiceDescriptionImpl().getDescriptionBuilderComposite().getServiceRefName(sparseCompositeKey);
if (!DescriptionUtils.isEmpty(serviceRefName)) {
if (log.isDebugEnabled()) {
log.debug("Setting service ref name: " + serviceRefName
+ " on AxisService: " + axisService + "@" + axisService.hashCode());
}
serviceRefNameParam = new Parameter();
serviceRefNameParam.setName(MDQConstants.SERVICE_REF_NAME);
serviceRefNameParam.setValue(serviceRefName);
}
return serviceRefNameParam;
}
代码示例来源:origin: wso2/carbon-identity-framework
protected void disableRESTCalls(String serviceName, String scenrioId)
throws SecurityConfigException {
if (scenrioId.equals(SecurityConstants.USERNAME_TOKEN_SCENARIO_ID)) {
return;
}
try {
AxisService service = axisConfig.getServiceForActivation(serviceName);
if (service == null) {
throw new SecurityConfigException("nullService");
}
Parameter param = new Parameter();
param.setName(DISABLE_REST);
param.setValue(Boolean.TRUE.toString());
service.addParameter(param);
} catch (AxisFault e) {
log.error(e);
throw new SecurityConfigException("disablingREST", e);
}
}
代码示例来源:origin: apache/axis2-java
/**
* Return a Parameter instance for ServiceRefName if that name was specified on the sparse composite when the Service was created.
* @param sparseCompositeKey identifies the instance of the service (i.e. Service Delegate)
* @return A Parameter containing the ServiceRefName or null if one was not specified.
*/
private Parameter getServiceRefNameParam(Object sparseCompositeKey) {
Parameter serviceRefNameParam = null;
// The ServiceRefName, if specified, is set on the sparse composite associated with the service.
String serviceRefName = getServiceDescriptionImpl().getDescriptionBuilderComposite().getServiceRefName(sparseCompositeKey);
if (!DescriptionUtils.isEmpty(serviceRefName)) {
if (log.isDebugEnabled()) {
log.debug("Setting service ref name: " + serviceRefName
+ " on AxisService: " + axisService + "@" + axisService.hashCode());
}
serviceRefNameParam = new Parameter();
serviceRefNameParam.setName(MDQConstants.SERVICE_REF_NAME);
serviceRefNameParam.setValue(serviceRefName);
}
return serviceRefNameParam;
}
代码示例来源:origin: org.apache.axis2/axis2-kernel
public void setConfigContext(ConfigurationContext configContext) {
// setting ServletContext into configctx
configContext.setProperty(HTTPConstants.MC_HTTP_SERVLETCONTEXT,
config.getServletContext());
Parameter servletConfigParam = new Parameter();
servletConfigParam.setName(HTTPConstants.HTTP_SERVLETCONFIG);
servletConfigParam.setValue(config);
try {
configContext.getAxisConfiguration().addParameter(servletConfigParam);
} catch (AxisFault axisFault) {
log.error(axisFault.getMessage(), axisFault);
}
super.setConfigContext(configContext);
}
}
代码示例来源:origin: apache/axis2-java
public void setConfigContext(ConfigurationContext configContext) {
// setting ServletContext into configctx
configContext.setProperty(HTTPConstants.MC_HTTP_SERVLETCONTEXT,
config.getServletContext());
Parameter servletConfigParam = new Parameter();
servletConfigParam.setName(HTTPConstants.HTTP_SERVLETCONFIG);
servletConfigParam.setValue(config);
try {
configContext.getAxisConfiguration().addParameter(servletConfigParam);
} catch (AxisFault axisFault) {
log.error(axisFault.getMessage(), axisFault);
}
super.setConfigContext(configContext);
}
}
代码示例来源:origin: org.apache.synapse/synapse-core
public void init(ConfigurationContext configContext, AxisModule module) throws AxisFault {
AxisConfiguration axiConfiguration = configContext.getAxisConfiguration();
Counter globalRequestCounter = new Counter();
Parameter globalRequestCounterParameter = new Parameter();
globalRequestCounterParameter.setName(MetricsConstants.GLOBAL_REQUEST_COUNTER);
globalRequestCounterParameter.setValue(globalRequestCounter);
axiConfiguration.addParameter(globalRequestCounterParameter);
}
代码示例来源:origin: wso2/wso2-synapse
public void init(ConfigurationContext configContext, AxisModule module) throws AxisFault {
AxisConfiguration axiConfiguration = configContext.getAxisConfiguration();
Counter globalRequestCounter = new Counter();
Parameter globalRequestCounterParameter = new Parameter();
globalRequestCounterParameter.setName(MetricsConstants.GLOBAL_REQUEST_COUNTER);
globalRequestCounterParameter.setValue(globalRequestCounter);
axiConfiguration.addParameter(globalRequestCounterParameter);
}
代码示例来源:origin: org.apache.axis2/axis2-metadata
private void addToAxisService() {
// Add a reference to this EndpointDescription object to the AxisService
if (axisService != null) {
Parameter parameter = new Parameter();
parameter.setName(EndpointDescription.AXIS_SERVICE_PARAMETER);
parameter.setValue(this);
try {
axisService.addParameter(parameter);
} catch (AxisFault e) {
throw ExceptionFactory.makeWebServiceException(Messages.getMessage("endpointDescriptionErr5", EndpointDescription.AXIS_SERVICE_PARAMETER), e);
}
}
}
代码示例来源:origin: apache/axis2-java
private void addToAxisService() {
// Add a reference to this EndpointDescription object to the AxisService
if (axisService != null) {
Parameter parameter = new Parameter();
parameter.setName(EndpointDescription.AXIS_SERVICE_PARAMETER);
parameter.setValue(this);
try {
axisService.addParameter(parameter);
} catch (AxisFault e) {
throw ExceptionFactory.makeWebServiceException(Messages.getMessage("endpointDescriptionErr5", EndpointDescription.AXIS_SERVICE_PARAMETER), e);
}
}
}
代码示例来源:origin: org.wso2.carbon.commons/org.wso2.carbon.statistics
private static void updateCurrentInvocationStatistic(MessageContext messageContext,
long responseTime) throws AxisFault {
messageContext.setProperty(StatisticsConstants.GLOBAL_CURRENT_INVOCATION_RESPONSE_TIME,responseTime);
if (messageContext.getAxisOperation() != null) {
Parameter operationResponseTimeParam = new Parameter();
operationResponseTimeParam.setName(StatisticsConstants.OPERATION_RESPONSE_TIME);
operationResponseTimeParam.setValue(responseTime);
messageContext.getAxisOperation().addParameter(operationResponseTimeParam);
}
if (messageContext.getAxisService() != null) {
Parameter serviceResponseTimeParam = new Parameter();
serviceResponseTimeParam.setName(StatisticsConstants.SERVICE_RESPONSE_TIME);
serviceResponseTimeParam.setValue(responseTime);
messageContext.getAxisService().addParameter(serviceResponseTimeParam);
}
}
}
内容来源于网络,如有侵权,请联系作者删除!