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


Java MessageContext.getSelfManagedData方法代码示例

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


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

示例1: invoke

import org.apache.axis2.context.MessageContext; //导入方法依赖的package包/类
public InvocationResponse invoke(MessageContext _mc) throws AxisFault {

            String desc = "TempHandler01[id=" + id + "].invoke()";
            String title = "MessageContextSelfManagedDataTest::" + desc;
            log.debug(title);

            String tmp = "whaaa?";
            _mc.setSelfManagedData(this.getClass(), key02, tmp);
            String data2 = (String) _mc.getSelfManagedData(this.getClass(), key02);
            assertEquals(tmp, data2);

            _mc.setSelfManagedData(this.getClass(), key01, testData01);
            _mc.removeSelfManagedData(this.getClass(), key01);
            _mc.setSelfManagedData(this.getClass(), key01, testData01);
            String data1 = (String) _mc.getSelfManagedData(this.getClass(), key01);
            assertEquals(data1, testData01);

            _mc.setSelfManagedData(this.getClass(), key02, testData02);

            _mc.setSelfManagedData(this.getClass(), key03, testData03);
            byte [] data3 = (byte []) _mc.getSelfManagedData(this.getClass(), key03);
            boolean isOk3 = isEquals(data3, testData03);
            assertTrue(isOk3);

            _mc.removeSelfManagedData(this.getClass(), key03);
            _mc.setSelfManagedData(this.getClass(), key03, testData03);

            _mc.setSelfManagedData(this.getClass(), key04, testData04);
            long [] data4 = (long []) _mc.getSelfManagedData(this.getClass(), key04);
            boolean isOk4 = isEquals(data4, testData04);
            assertTrue(isOk4);

            invokecallcount++;

            log.debug(title + ": Completed");
            return InvocationResponse.CONTINUE;
        }
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:38,代码来源:MessageContextSelfManagedDataTest.java

示例2: serializeSelfManagedData

import org.apache.axis2.context.MessageContext; //导入方法依赖的package包/类
public ByteArrayOutputStream serializeSelfManagedData(MessageContext _mc)
        throws IOException {
    serializecallcount++;

    String desc = "TempHandler02[id=" + id + "].serializeSelfManagedData()   count [" +
            serializecallcount + "]";
    String title = "MessageContextSelfManagedDataTest::" + desc;
    log.debug(title);

    String storedTestData =
            (String) _mc.getSelfManagedData(this.getClass(), Integer.toString(id));
    if (storedTestData == null) {
        log.debug(title + ":  No self managed data to serialize");
        return null;
    }

    ByteArrayOutputStream baos = new ByteArrayOutputStream();
    ObjectOutputStream oos = new ObjectOutputStream(baos);
    oos.writeUTF(storedTestData);
    oos.close();
    int baos_size = baos.size();
    baos.close();

    log.debug(title + ": saved self managed data string length [" +
            storedTestData.length() + "]");
    log.debug(title +
            ": saved self managed data byte array output stream (UTF) length [" +
            baos_size + "]");
    return baos;
}
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:31,代码来源:MessageContextSelfManagedDataTest.java

示例3: getTestData01FromMessageContext

import org.apache.axis2.context.MessageContext; //导入方法依赖的package包/类
public String getTestData01FromMessageContext(MessageContext _mc) {
    return (String) _mc.getSelfManagedData(this.getClass(), key01);
}
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:4,代码来源:MessageContextSelfManagedDataTest.java

示例4: getTestData02FromMessageContext

import org.apache.axis2.context.MessageContext; //导入方法依赖的package包/类
public String getTestData02FromMessageContext(MessageContext _mc) {
    return (String) _mc.getSelfManagedData(this.getClass(), key02);
}
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:4,代码来源:MessageContextSelfManagedDataTest.java

示例5: getTestData03FromMessageContext

import org.apache.axis2.context.MessageContext; //导入方法依赖的package包/类
public byte [] getTestData03FromMessageContext(MessageContext _mc) {
    return (byte []) _mc.getSelfManagedData(this.getClass(), key03);
}
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:4,代码来源:MessageContextSelfManagedDataTest.java

示例6: getTestData04FromMessageContext

import org.apache.axis2.context.MessageContext; //导入方法依赖的package包/类
public long [] getTestData04FromMessageContext(MessageContext _mc) {
    return (long []) _mc.getSelfManagedData(this.getClass(), key04);
}
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:4,代码来源:MessageContextSelfManagedDataTest.java

示例7: getTestDataFromMessageContext

import org.apache.axis2.context.MessageContext; //导入方法依赖的package包/类
public String getTestDataFromMessageContext(MessageContext _mc) {
    return (String) _mc.getSelfManagedData(this.getClass(), Integer.toString(id));
}
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:4,代码来源:MessageContextSelfManagedDataTest.java


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