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


Java ArrayCollection类代码示例

本文整理汇总了Java中flex.messaging.io.ArrayCollection的典型用法代码示例。如果您正苦于以下问题:Java ArrayCollection类的具体用法?Java ArrayCollection怎么用?Java ArrayCollection使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: send

import flex.messaging.io.ArrayCollection; //导入依赖的package包/类
public void send(MessageSkeleton packet) {

        Object response = null;

        amfConnection.addHttpRequestHeader("Blazer", packet.getPacketString());

        RemotingMessage message = new RemotingMessage();
        message.setMessageId(flex.messaging.util.UUIDUtils.createUUID());

        /*
         * IMPORTANT!
         * If your application uses customized invocation objects, modify the code below
         */
        message.setDestination(packet.getDestination());
        message.setOperation(packet.getOperation());

        ArrayCollection arguments = new ArrayCollection();
        Iterator parsIt = packet.getPars().iterator();
        while (parsIt.hasNext()) {
            arguments.add(parsIt.next());
        }

        message.setBody(arguments);

        stdOut.println("[*] Sending AMF message with signature --> " + packet.getPacketString());

        try {
            response = amfConnection.call(packet.getDestination() + "." + packet.getOperation(), message);

        } catch (ClientStatusException eClient) {
            // Older versions of Adobe Flex libraries may return this client-side exception
            stdErr.println("[!] ClientStatusException: " + eClient.toString().trim());
        } catch (ServerStatusException eServer) {
            stdErr.println("[!] ServerStatusException: " + eServer.toString().trim());
        } catch (Exception eGeneric) {
            stdErr.println("[!] Generic Exception: " + eGeneric.toString().trim());
        } finally {
            //In any case, dump the response
            if (response != null) {
                stdOut.println("\n[*] ---------------------------------------------------------");
                stdOut.println(xstream.toXML(response));
                stdOut.println("[*] ---------------------------------------------------------\n");
            }
        }
    }
 
开发者ID:ikkisoft,项目名称:blazer,代码行数:46,代码来源:MessageGenerator.java

示例2: writeAMF3Collection

import flex.messaging.io.ArrayCollection; //导入依赖的package包/类
protected void writeAMF3Collection(Collection<?> c) throws IOException {
	if (debugMore) debug("writeAMF3Collection(c=", c, ")");

    ArrayCollection ac = (c instanceof ArrayCollection ? (ArrayCollection)c : new ArrayCollection(c));
    writeAMF3Object(ac);
}
 
开发者ID:zerksud,项目名称:amf-serializer,代码行数:7,代码来源:AMF3Serializer.java


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