• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java Builder类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了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;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java EcoreEnvironmentFactory类代码示例发布时间:2022-05-22
下一篇:
Java DimacsReader类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap