本文整理汇总了Java中org.apache.axis2.description.Parameter.getValue方法的典型用法代码示例。如果您正苦于以下问题:Java Parameter.getValue方法的具体用法?Java Parameter.getValue怎么用?Java Parameter.getValue使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.axis2.description.Parameter
的用法示例。
在下文中一共展示了Parameter.getValue方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getParameterValue
import org.apache.axis2.description.Parameter; //导入方法依赖的package包/类
private String getParameterValue(String key, String def) {
String value = System.getenv(key);
if (StringUtils.isEmpty(value)) {
value = System.getProperty(key);
}
if (StringUtils.isEmpty(value)) {
Parameter parameter = parameters.get(key);
if (parameter == null || StringUtils.isEmpty((String) parameter.getValue())) {
if (def == null) {
throw new IllegalArgumentException(String.format("Clustering parameter [Name] %s not found", key));
} else {
value = def;
}
} else {
value = (String) parameter.getValue();
}
}
return value;
}
示例2: 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;
}
示例3: performContextCleanup
import org.apache.axis2.description.Parameter; //导入方法依赖的package包/类
/**
* Activate any registered ThreadContextMigrators to remove information from
* the context if necessary.
*
* @param threadContextMigratorListID The name of the parameter in the
* AxisConfiguration that contains
* the list of migrators.
* @param msgContext
*/
public static void performContextCleanup(String threadContextMigratorListID,
MessageContext msgContext) {
if (msgContext == null) {
return;
}
AxisConfiguration axisConfiguration =
msgContext.getConfigurationContext().getAxisConfiguration();
Parameter param = axisConfiguration.getParameter(threadContextMigratorListID);
if (param != null) {
List migratorList = (List) param.getValue();
int size = migratorList.size();
for (int i=0; i<size;i++) {
((ThreadContextMigrator) migratorList.get(i)).cleanupContext(msgContext);
}
}
}
示例4: getHeaderParameterList
import org.apache.axis2.description.Parameter; //导入方法依赖的package包/类
private static ArrayList getHeaderParameterList(AxisDescription axisDescription, String paramName) {
Parameter headerQNamesParameter = axisDescription.getParameter(paramName);
if (headerQNamesParameter == null) {
if (log.isDebugEnabled()) {
log.debug("Parameter not on " + axisDescription + "; "
+ paramName);
}
return null;
}
ArrayList understoodHeaderQNames = (ArrayList) headerQNamesParameter.getValue();
if (understoodHeaderQNames == null || understoodHeaderQNames.isEmpty()) {
if (log.isDebugEnabled()) {
log.debug("Parameter value is empty: " + axisDescription + "; "
+ paramName);
}
return null;
}
return understoodHeaderQNames;
}
示例5: performMigrationToThread
import org.apache.axis2.description.Parameter; //导入方法依赖的package包/类
/**
* Activate any registered ThreadContextMigrators to move context info
* to the thread of execution.
*
* @param threadContextMigratorListID The name of the parameter in the
* AxisConfiguration that contains
* the list of migrators.
* @param msgContext
* @throws AxisFault
*/
public static void performMigrationToThread(String threadContextMigratorListID,
MessageContext msgContext)
throws AxisFault {
if (msgContext == null) {
return;
}
AxisConfiguration axisConfiguration =
msgContext.getConfigurationContext().getAxisConfiguration();
Parameter param = axisConfiguration.getParameter(threadContextMigratorListID);
if (param != null) {
List migratorList = (List) param.getValue();
int size = migratorList.size();
for (int i=0; i<size;i++) {
((ThreadContextMigrator) migratorList.get(i))
.migrateContextToThread(msgContext);
}
}
}
示例6: basicInit
import org.apache.axis2.description.Parameter; //导入方法依赖的package包/类
private void basicInit(ParameterInclude transportDescription, ConfigurationContext configurationContext) throws
AxisFault {
this.configurationContext = configurationContext;
Parameter p = transportDescription.getParameter(SMSTransportConstents.IMPLIMENTAION_CLASS);
if (p == null) {
currentImplimentation = new SMPPImplManager();
} else {
String implClass = (String) p.getValue();
try {
currentImplimentation = (SMSImplManager) Class.forName(implClass).newInstance();
} catch (Exception e) {
throw new AxisFault("Error while instentiating class " + implClass, e);
}
}
currentImplimentation.setSMSInManager(this);
}
示例7: computeEPRs
import org.apache.axis2.description.Parameter; //导入方法依赖的package包/类
private void computeEPRs() {
List<EndpointReference> eprs = new ArrayList<EndpointReference>();
for (Object o : getService().getParameters()) {
Parameter p = (Parameter) o;
if (JMSConstants.PARAM_PUBLISH_EPR.equals(p.getName()) && p.getValue() instanceof String) {
if ("legacy".equalsIgnoreCase((String) p.getValue())) {
// if "legacy" specified, compute and replace it
endpointReferences.add(
new EndpointReference(getEPR()));
} else {
endpointReferences.add(new EndpointReference((String) p.getValue()));
}
}
}
if (eprs.isEmpty()) {
// if nothing specified, compute and return legacy EPR
endpointReferences.add(new EndpointReference(getEPR()));
}
}
示例8: addModule
import org.apache.axis2.description.Parameter; //导入方法依赖的package包/类
/**
* Add an available Module to this configuration
*
* @param module an AxisModule
* @throws AxisFault in case of error
*/
public void addModule(AxisModule module) throws AxisFault {
module.setParent(this);
// check whether the module version paramter is there , if so set the module version as that
Parameter versionParameter = module.getParameter(org.apache.axis2.Constants.MODULE_VERSION);
if (versionParameter !=null ) {
String version = (String) versionParameter.getValue();
try {
module.setVersion(new Version(version));
} catch (ParseException ex) {
throw new AxisFault("The version number '" + version + "' specified by the "
+ org.apache.axis2.Constants.MODULE_VERSION + " parameter is invalid");
}
}
allModules.put(module.getArchiveName(), module);
notifyObservers(new AxisEvent(AxisEvent.MODULE_DEPLOY,null), module);
// Registering the policy namespaces that the module understand
registerModulePolicySupport(module);
// Registering the policy assertions that are local to the system
registerLocalPolicyAssertions(module);
}
示例9: performThreadCleanup
import org.apache.axis2.description.Parameter; //导入方法依赖的package包/类
/**
* Activate any registered ThreadContextMigrators to remove information
* from the thread of execution if necessary.
*
* @param threadContextMigratorListID The name of the parameter in the
* AxisConfiguration that contains
* the list of migrators.
* @param msgContext
*/
public static void performThreadCleanup(String threadContextMigratorListID,
MessageContext msgContext) {
if (msgContext == null) {
return;
}
AxisConfiguration axisConfiguration =
msgContext.getConfigurationContext().getAxisConfiguration();
Parameter param = axisConfiguration.getParameter(threadContextMigratorListID);
if (param != null) {
List migratorList = (List) param.getValue();
int size = migratorList.size();
for (int i=0; i<size;i++) {
((ThreadContextMigrator) migratorList.get(i)).cleanupThread(msgContext);
}
}
}
示例10: getTracePersister
import org.apache.axis2.description.Parameter; //导入方法依赖的package包/类
private TracePersister getTracePersister(Parameter tracePersisterParam) throws AxisFault {
TracePersister tracePersister = null;
if (tracePersisterParam != null) {
Object tracePersisterImplObj = tracePersisterParam.getValue();
if (tracePersisterImplObj instanceof TracePersister) {
tracePersister = (TracePersister) tracePersisterImplObj;
} else if (tracePersisterImplObj instanceof String) {
//This will need in TestSuite
try {
tracePersister =
(TracePersister) Loader
.loadClass(((String) tracePersisterImplObj).trim())
.newInstance();
} catch (Exception e) {
String message = "Cannot instatiate TracePersister ";
log.error(message, e);
throw new RuntimeException(message, e);
}
}
} else {
return new MemoryBasedTracePersister(); // The default is the MemoryBasedTRacePersister
}
return tracePersister;
}
示例11: performMigrationToContext
import org.apache.axis2.description.Parameter; //导入方法依赖的package包/类
/**
* Activate any registered ThreadContextMigrators to move info from the
* thread of execution into the context.
*
* @param threadContextMigratorListID The name of the parameter in the
* AxisConfiguration that contains
* the list of migrators.
* @param msgContext
* @throws AxisFault
*/
public static void performMigrationToContext(String threadContextMigratorListID,
MessageContext msgContext)
throws AxisFault {
if (msgContext == null) {
return;
}
AxisConfiguration axisConfiguration =
msgContext.getConfigurationContext().getAxisConfiguration();
Parameter param = axisConfiguration.getParameter(threadContextMigratorListID);
if (param != null) {
List migratorList = (List) param.getValue();
int size = migratorList.size();
for (int i=0; i<size;i++) {
((ThreadContextMigrator) migratorList.get(i))
.migrateThreadToContext(msgContext);
}
}
}
示例12: configureTcpIpParameters
import org.apache.axis2.description.Parameter; //导入方法依赖的package包/类
private void configureTcpIpParameters() {
nwConfig.getJoin().getMulticastConfig().setEnabled(false);
nwConfig.getJoin().getAwsConfig().setEnabled(false);
TcpIpConfig tcpIpConfig = nwConfig.getJoin().getTcpIpConfig();
tcpIpConfig.setEnabled(true);
Parameter connTimeoutParameter = parameters.get(CONNECTION_TIMEOUT);
if (connTimeoutParameter != null && connTimeoutParameter.getValue() != null) {
int connTimeout = Integer.parseInt(((String) (connTimeoutParameter.getValue())).trim());
tcpIpConfig.setConnectionTimeoutSeconds(connTimeout);
}
log.info(String.format("Mesos membership scheme TCP IP parameters configured [Connection-Timeout] %ds",
tcpIpConfig.getConnectionTimeoutSeconds()));
}
示例13: getStringParam
import org.apache.axis2.description.Parameter; //导入方法依赖的package包/类
private String getStringParam(String name, String def) {
Parameter param = httpConfiguration.getParameter(name);
if (param != null) {
// assert param.getParameterType() == Parameter.TEXT_PARAMETER;
String config = (String) param.getValue();
if (config != null) {
return config;
}
}
return def;
}
示例14: getNoParamDSOperations
import org.apache.axis2.description.Parameter; //导入方法依赖的package包/类
/**
* Returns the data service operations which contains no input parameters.
*
* @param dsName The data service name
* @return The no parameter operation names
* @throws AxisFault
*/
public String[] getNoParamDSOperations(String dsName) throws AxisFault {
AxisService axisService = this.getAxisConfig().getService(dsName);
if (axisService == null) {
return new String[0];
}
/* if it's a ghost service, deploy the real one now */
if (GhostDeployerUtils.isGhostService(axisService)) {
GhostDeployerUtils.deployActualService(this.getAxisConfig(), axisService);
}
Parameter tmpParam = axisService.getParameter(DBConstants.DATA_SERVICE_OBJECT);
DataService ds;
List<String> result = new ArrayList<String>();
if (tmpParam != null) {
ds = (DataService) tmpParam.getValue();
Iterator<String> opNames = ds.getOperationNames().iterator();
Operation op;
while (opNames.hasNext()) {
String opName = opNames.next();
op = ds.getOperation(opName);
if ((op.getCallQuery().getWithParams().size() == 0) && !isBoxcarringOp(opName)) {
result.add(opName);
}
}
}
return result.toArray(new String[result.size()]);
}
示例15: getMaxServiceResponseTime
import org.apache.axis2.description.Parameter; //导入方法依赖的package包/类
public long getMaxServiceResponseTime(AxisService axisService) throws AxisFault {
long max = 0;
Parameter parameter =
axisService.getParameter(StatisticsConstants.SERVICE_RESPONSE_TIME_PROCESSOR);
if (parameter != null) {
ResponseTimeProcessor proc = (ResponseTimeProcessor) parameter.getValue();
max = proc.getMaxResponseTime();
}
return max;
}