当前位置: 首页>>代码示例>>Java>>正文


Java Handler.getName方法代码示例

本文整理汇总了Java中org.apache.axis2.engine.Handler.getName方法的典型用法代码示例。如果您正苦于以下问题:Java Handler.getName方法的具体用法?Java Handler.getName怎么用?Java Handler.getName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.axis2.engine.Handler的用法示例。


在下文中一共展示了Handler.getName方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: addHandler

import org.apache.axis2.engine.Handler; //导入方法依赖的package包/类
public static void addHandler(Flow flow, Handler handler, String phaseName) {
    HandlerDescription handlerDesc = new HandlerDescription(handler.getName());
    PhaseRule rule = new PhaseRule(phaseName);

    handlerDesc.setRules(rule);
    handler.init(handlerDesc);
    handlerDesc.setHandler(handler);
    flow.addHandler(handlerDesc);
}
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:10,代码来源:Utils.java

示例2: serializeSelfManagedDataHelper

import org.apache.axis2.engine.Handler; //导入方法依赖的package包/类
/**
 * This is the helper method to do the recursion for serializeSelfManagedData()
 *
 * @param handlers
 * @return ArrayList
 */
private ArrayList<SelfManagedDataHolder> serializeSelfManagedDataHelper(ArrayList<Handler> handlers) {
    ArrayList<SelfManagedDataHolder> selfManagedDataHolderList = new ArrayList<SelfManagedDataHolder>();
    Iterator<Handler> it = handlers.iterator();

    try {
        while (it.hasNext()) {
            Handler handler = (Handler) it.next();

            //if (handler instanceof Phase)
            //{
            //    selfManagedDataHolderList = serializeSelfManagedDataHelper(((Phase)handler).getHandlers().iterator(), selfManagedDataHolderList);
            //}
            //else if (SelfManagedDataManager.class.isAssignableFrom(handler.getClass()))
            if (SelfManagedDataManager.class.isAssignableFrom(handler.getClass())) {
                // only call the handler's serializeSelfManagedData if it implements SelfManagedDataManager

                if (DEBUG_ENABLED && log.isTraceEnabled()) {
                    log.trace(
                            "MessageContext:serializeSelfManagedDataHelper(): calling handler  [" +
                                    handler.getClass().getName() + "]  name [" +
                                    handler.getName() + "]   serializeSelfManagedData method");
                }

                ByteArrayOutputStream baos_fromHandler =
                        ((SelfManagedDataManager) handler).serializeSelfManagedData(this);

                if (baos_fromHandler != null) {
                    baos_fromHandler.close();

                    try {
                        SelfManagedDataHolder selfManagedDataHolder = new SelfManagedDataHolder(
                                handler.getClass().getName(), handler.getName(),
                                baos_fromHandler.toByteArray());
                        selfManagedDataHolderList.add(selfManagedDataHolder);
                        selfManagedDataHandlerCount++;
                    }
                    catch (Exception exc) {
                        if (DEBUG_ENABLED && log.isTraceEnabled()) {
                            log.trace("MessageContext:serializeSelfManagedData(): exception [" +
                                exc.getClass().getName() + "][" + exc.getMessage() +
                                "]  in setting up SelfManagedDataHolder object for [" +
                                handler.getClass().getName() + " / " + handler.getName() + "] ",
                                  exc);
                        }
                    }
                }
            }
        }

        return selfManagedDataHolderList;
    }
    catch (Exception ex) {
        if (DEBUG_ENABLED && log.isTraceEnabled()) {
            log.trace("MessageContext:serializeSelfManagedData(): exception [" +
                ex.getClass().getName() + "][" + ex.getMessage() + "]", ex);
        }
        return null;
    }

}
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:67,代码来源:MessageContext.java

示例3: setupPhaseList

import org.apache.axis2.engine.Handler; //导入方法依赖的package包/类
/**
 * Process the list of handlers from the Phase object
 * into the appropriate meta data.
 *
 * @param phase   The Phase object containing a list of handlers
 * @param mdPhase The meta data object associated with the specified Phase object
 */
private void setupPhaseList(Phase phase, MetaDataEntry mdPhase) {
    // get the list from the phase object
    List<Handler> handlers = phase.getHandlers();

    if (handlers.isEmpty()) {
        // done, make sure there is no list in the given meta data
        mdPhase.removeList();
        return;
    }

    // get the metadata on each member of the list

    int listSize = handlers.size();

    if (listSize > 0) {

        Iterator<Handler> i = handlers.iterator();

        while (i.hasNext()) {
            Object obj = i.next();
            String objClass = obj.getClass().getName();

            // start the meta data entry for this object
            MetaDataEntry mdEntry = new MetaDataEntry();
            mdEntry.setClassName(objClass);

            // get the correct object-specific name
            String qnameAsString;

            if (obj instanceof Phase) {
                // nested condition, the phase object contains another phase!
                Phase phaseObj = (Phase) obj;
                qnameAsString = phaseObj.getName();

                // add the list of handlers to the meta data
                setupPhaseList(phaseObj, mdEntry);
            } else if (obj instanceof Handler) {
                Handler handlerObj = (Handler) obj;
                qnameAsString = handlerObj.getName();
            } else {
                // TODO: will there be any other kinds of objects
                // in the list?
                qnameAsString = "NULL";
            }

            mdEntry.setQName(qnameAsString);

            // done with setting up the meta data for the list entry
            // so add it to the parent
            mdPhase.addToList(mdEntry);

            if (DEBUG_ENABLED && log.isTraceEnabled()) {
                log.trace(getLogIDString() + ":setupPhaseList(): list entry class [" +
                        objClass + "] qname [" + qnameAsString + "]");
            }

        } // end while entries in list
    } else {
        // a list with no entries
        // done, make sure there is no list in the given meta data
        mdPhase.removeList();
    }
}
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:71,代码来源:MessageContext.java

示例4: getHandlerData

import org.apache.axis2.engine.Handler; //导入方法依赖的package包/类
private HandlerData getHandlerData(Handler handler) {
    HandlerData handlerData = new HandlerData(handler.getName());
    handlerData.setClassName(handler.getHandlerDesc().getClassName());
    handlerData.setPhaseLast(handler.getHandlerDesc().getRules().isPhaseLast());
    return handlerData;
}
 
开发者ID:wso2,项目名称:carbon-commons,代码行数:7,代码来源:AxisConfigAdminService.java


注:本文中的org.apache.axis2.engine.Handler.getName方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。