本文整理汇总了Java中org.apache.axis2.builder.Builder类的典型用法代码示例。如果您正苦于以下问题:Java Builder类的具体用法?Java Builder怎么用?Java Builder使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Builder类属于org.apache.axis2.builder包,在下文中一共展示了Builder类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: AxisConfiguration
import org.apache.axis2.builder.Builder; //导入依赖的package包/类
/**
* Constructor AxisConfiguration.
*/
public AxisConfiguration() {
moduleConfigmap = new HashMap<String, ModuleConfiguration>();
globalModuleList = new ArrayList<String>();
messageReceivers = new HashMap<String, MessageReceiver>();
messageBuilders = new HashMap<String, Builder>();
messageFormatters = new HashMap<String, MessageFormatter>();
outPhases = new ArrayList<Phase>();
inFaultPhases = new ArrayList<Phase>();
outFaultPhases = new ArrayList<Phase>();
faultyServices = new Hashtable<String, String>();
faultyModules = new Hashtable<String, String>();
observerSet = new CopyOnWriteArraySet<AxisObserver>();
inPhasesUptoAndIncludingPostDispatch = new ArrayList<Phase>();
systemClassLoader = org.apache.axis2.java.security.AccessController
.doPrivileged(new PrivilegedAction<ClassLoader>() {
public ClassLoader run() {
return Thread.currentThread().getContextClassLoader();
}
});
serviceClassLoader = systemClassLoader;
moduleClassLoader = systemClassLoader;
this.phasesinfo = new PhasesInfo();
targetResolvers = new ArrayList<TargetResolver>();
}
开发者ID:wso2,项目名称:wso2-axis2,代码行数:29,代码来源:AxisConfiguration.java
示例2: getMessageBuilder
import org.apache.axis2.builder.Builder; //导入依赖的package包/类
/**
* Get a Builder for a particular content type.
*
* @param contentType the desired content type
* @return the configured message builder implementation class name against
* the given content type.
*/
public Builder getMessageBuilder(String contentType) {
Builder builder = null;
if (messageBuilders.isEmpty()) {
return null;
}
if (contentType != null) {
builder = messageBuilders.get(contentType);
if (builder == null) {
builder = messageBuilders.get(contentType.toLowerCase());
}
if (builder == null) {
Iterator<Entry<String, Builder>> iterator = messageBuilders.entrySet().iterator();
while (iterator.hasNext() && builder == null) {
Entry<String, Builder> entry = iterator.next();
String key = entry.getKey();
if (contentType.matches(key)) {
builder = entry.getValue();
}
}
}
}
return builder;
}
开发者ID:wso2,项目名称:wso2-axis2,代码行数:31,代码来源:AxisConfiguration.java
示例3: TextMessageBuilderAdapter
import org.apache.axis2.builder.Builder; //导入依赖的package包/类
public TextMessageBuilderAdapter(Builder builder) {
this.builder = builder;
}
开发者ID:wso2,项目名称:wso2-axis2-transports,代码行数:4,代码来源:TextMessageBuilderAdapter.java
示例4: getMessageBuilder
import org.apache.axis2.builder.Builder; //导入依赖的package包/类
/**
* Initial work for a builder selector which selects the builder for a given message format
* based on the the content type of the recieved message. content-type to builder mapping can be
* specified through the Axis2.xml.
*
* @param type content-type
* @param msgContext the active MessageContext
* @return the builder registered against the given content-type
* @throws org.apache.axis2.AxisFault
*/
public static Builder getMessageBuilder(String type, MessageContext msgContext)
throws AxisFault {
boolean useFallbackBuilder = false;
AxisConfiguration configuration =
msgContext.getConfigurationContext().getAxisConfiguration();
Parameter useFallbackParameter = configuration.getParameter(Constants.Configuration.USE_DEFAULT_FALLBACK_BUILDER);
if (useFallbackParameter != null) {
useFallbackBuilder = JavaUtils.isTrueExplicitly(useFallbackParameter.getValue(), useFallbackBuilder);
}
String cType = getContentTypeForBuilderSelection(type, msgContext);
Builder builder = configuration.getMessageBuilder(cType, useFallbackBuilder);
if (builder != null) {
// Check whether the request has a Accept header if so use that as the response
// message type.
// If thats not present,
// Setting the received content-type as the messageType to make
// sure that we respond using the received message serialization format.
Object contentNegotiation = configuration
.getParameterValue(Constants.Configuration.ENABLE_HTTP_CONTENT_NEGOTIATION);
if (JavaUtils.isTrueExplicitly(contentNegotiation)) {
Map transportHeaders =
(Map) msgContext.getProperty(MessageContext.TRANSPORT_HEADERS);
if (transportHeaders != null) {
String acceptHeader = (String) transportHeaders.get(HTTPConstants.HEADER_ACCEPT);
if (acceptHeader != null) {
int index = acceptHeader.indexOf(";");
if (index > 0) {
acceptHeader = acceptHeader.substring(0, index);
}
String[] strings = acceptHeader.split(",");
for (String string : strings) {
String accept = string.trim();
// We dont want dynamic content negotoatin to work on text.xml as its
// ambiguos as to whether the user requests SOAP 1.1 or POX response
if (!HTTPConstants.MEDIA_TYPE_TEXT_XML.equals(accept) &&
configuration.getMessageFormatter(accept) != null) {
type = string;
break;
}
}
}
}
}
msgContext.setProperty(Constants.Configuration.MESSAGE_TYPE, type);
}
return builder;
}
开发者ID:wso2,项目名称:wso2-axis2,代码行数:61,代码来源:MessageProcessorSelector.java
示例5: addMessageBuilder
import org.apache.axis2.builder.Builder; //导入依赖的package包/类
/**
* Register a messageBuilder implementation against a content type.
* This is used by Axis2 to support different message formats.
*
* @param contentType the relevant content-type (i.e. "text/xml")
* @param messageBuilder a Builder implementation
*/
public void addMessageBuilder(String contentType,
Builder messageBuilder) {
messageBuilders.put(contentType, messageBuilder);
}
开发者ID:wso2,项目名称:wso2-axis2,代码行数:12,代码来源:AxisConfiguration.java
注:本文中的org.apache.axis2.builder.Builder类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论