本文整理汇总了Java中org.apache.axis2.description.Parameter.getName方法的典型用法代码示例。如果您正苦于以下问题:Java Parameter.getName方法的具体用法?Java Parameter.getName怎么用?Java Parameter.getName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.axis2.description.Parameter
的用法示例。
在下文中一共展示了Parameter.getName方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: loadTransportProperties
import org.apache.axis2.description.Parameter; //导入方法依赖的package包/类
private static Properties loadTransportProperties() throws Exception {
transportProperties = new Properties();
try {
ConfigurationContext configContext = CarbonConfigurationContextFactory.getConfigurationContext();
AxisConfiguration axisConfig = configContext.getAxisConfiguration();
TransportOutDescription mailto = axisConfig.getTransportOut("mailto");
ArrayList<Parameter> parameters = mailto.getParameters();
for (Parameter parameter : parameters) {
String prop = parameter.getName();
String value = (String)parameter.getValue();
transportProperties.setProperty(prop, value);
}
}
catch (Exception e) {
throw e;
}
return transportProperties;
}
示例2: RabbitMQConnectionFactory
import org.apache.axis2.description.Parameter; //导入方法依赖的package包/类
/**
* Digest a AMQP CF definition from an axis2.xml 'Parameter' and construct.
*
* @param parameter the axis2.xml 'Parameter' that defined the AMQP CF
*/
@Deprecated
public RabbitMQConnectionFactory(Parameter parameter) {
this.name = parameter.getName();
ParameterIncludeImpl pi = new ParameterIncludeImpl();
try {
pi.deserializeParameters((OMElement) parameter.getValue());
} catch (AxisFault axisFault) {
handleException("Error reading parameters for RabbitMQ connection factory" + name, axisFault);
}
for (Object o : pi.getParameters()) {
Parameter p = (Parameter) o;
parameters.put(p.getName(), (String) p.getValue());
}
initConnectionFactory();
log.info("RabbitMQ ConnectionFactory : " + name + " initialized");
}
示例3: JMSConnectionFactory
import org.apache.axis2.description.Parameter; //导入方法依赖的package包/类
/**
* Digest a JMS CF definition from an axis2.xml 'Parameter' and construct.
* @param parameter the axis2.xml 'Parameter' that defined the JMS CF
*/
@Deprecated
public JMSConnectionFactory(Parameter parameter) {
this.name = parameter.getName();
ParameterIncludeImpl pi = new ParameterIncludeImpl();
try {
pi.deserializeParameters((OMElement) parameter.getValue());
} catch (AxisFault axisFault) {
handleException("Error reading parameters for JMS connection factory" + name, axisFault);
}
for (Object o : pi.getParameters()) {
Parameter p = (Parameter) o;
parameters.put(p.getName(), (String) p.getValue());
}
digestCacheLevel();
try {
context = new InitialContext(parameters);
conFactory = JMSUtils.lookup(context, ConnectionFactory.class,
parameters.get(JMSConstants.PARAM_CONFAC_JNDI_NAME));
if (parameters.get(JMSConstants.PARAM_DESTINATION) != null) {
sharedDestination = JMSUtils.lookup(context, Destination.class,
parameters.get(JMSConstants.PARAM_DESTINATION));
}
log.info("JMS ConnectionFactory : " + name + " initialized");
} catch (NamingException e) {
throw new AxisJMSException("Cannot acquire JNDI context, JMS Connection factory : " +
parameters.get(JMSConstants.PARAM_CONFAC_JNDI_NAME) + " or default destination : " +
parameters.get(JMSConstants.PARAM_DESTINATION) +
" for JMS CF : " + name + " using : " + JMSUtils.maskAxis2ConfigSensitiveParameters(parameters), e);
}
setMaxSharedJMSConnectionsCount();
}
示例4: MqttConnectionFactory
import org.apache.axis2.description.Parameter; //导入方法依赖的package包/类
public MqttConnectionFactory(Parameter passedInParameter) {
this.name = passedInParameter.getName();
ParameterIncludeImpl parameterInclude = new ParameterIncludeImpl();
try {
parameterInclude.deserializeParameters((OMElement) passedInParameter.getParameterElement());
} catch (AxisFault axisFault) {
log.error("Error while reading properties for MQTT Connection Factory " + name, axisFault);
throw new AxisMqttException(axisFault);
}
for (Object object : parameterInclude.getParameters()) {
Parameter parameter = (Parameter) object;
parameters.put(parameter.getName(), (String) parameter.getValue());
}
}
示例5: initScript
import org.apache.axis2.description.Parameter; //导入方法依赖的package包/类
/**
* Initializes the script service by finding the script source code,
* compiling it in a BSFEngine, and creating an OMElementConvertor
* for the script.
*/
protected BSFEngine initScript(MessageContext mc) throws AxisFault {
log.debug("initializing script service");
AxisService axisService = mc.getAxisService();
String scriptName = null;
String scriptSrc = null;
Parameter scriptFileParam = axisService.getParameter(SCRIPT_ATTR);
if (scriptFileParam != null) {
// the script is defined in a seperate file
scriptName = ((String) scriptFileParam.getValue()).trim();
Parameter scriptSrcParam = axisService.getParameter(SCRIPT_SRC_PROP);
if (scriptSrcParam != null) {
scriptSrc = (String) scriptSrcParam.getValue();
} else {
scriptSrc = readScript(axisService.getClassLoader(), scriptName);
}
} else {
// the script is defined inline within the services.xml
ArrayList parameters = axisService.getParameters();
for (int i=0; scriptFileParam == null && i<parameters.size(); i++) {
Parameter p = (Parameter) parameters.get(i);
if (p.getName().startsWith("script.")) {
scriptFileParam = p;
scriptName = p.getName();
scriptSrc = (String) p.getValue();
}
}
}
if (scriptName == null) {
throw new AxisFault("Missing script parameter");
}
try {
String scriptLanguage = BSFManager.getLangFromFilename(scriptName);
BSFManager bsfManager = new BSFManager();
bsfManager.setClassLoader(BSFManager.class.getClassLoader());
bsfManager.declareBean("_AxisService", axisService, AxisService.class);
BSFEngine bsfEngine = bsfManager.loadScriptingEngine(scriptLanguage);
bsfEngine.exec(scriptName, 0, 0, scriptSrc);
ServiceContext serviceContext = mc.getServiceContext();
serviceContext.setProperty(BSFENGINE_PROP, bsfEngine);
OMElementConvertor convertor = ConvertorFactory.createOMElementConvertor(axisService, scriptName);
serviceContext.setProperty(CONVERTOR_PROP, convertor);
return bsfEngine;
} catch (BSFException e) {
throw AxisFault.makeFault(e);
}
}