Package flex.messaging.io.amf

Examples of flex.messaging.io.amf.Amf3Output


        writeObjectTraits(ti);
       
        if (externalizable)
        {
            ByteArrayOutputStream bout = new ByteArrayOutputStream();
            Amf3Output objOut = createAMF3Output();
            objOut.setOutputStream(bout);
            //objOut.setDebugTrace(trace);
            ((Externalizable)instance).writeExternal(objOut);
            writeByteArray(bout.toByteArray());
        }
        else if (propertyNames != null)
View Full Code Here


     *
     * @return The size of the message after message is serialized.
     */
    protected long getMessageSizeForPerformanceInfo(Message message)
    {
        Amf3Output amfOut = new Amf3Output(serializationContext);
        ByteArrayOutputStream outStream = new ByteArrayOutputStream();
        DataOutputStream dataOutStream = new DataOutputStream(outStream);
        amfOut.setOutputStream(dataOutStream);     
        try
        {
            amfOut.writeObject(message);
        }
        catch (IOException e)
        {
            if (Log.isDebug())
                log.debug("MPI exception while retrieving the size of the serialized message: " + e.toString());             
View Full Code Here

               
        // Serialize each message as a separate chunk of bytes.
        TypeMarshallingContext.setTypeMarshaller(getTypeMarshaller());
        for (Iterator iter = messages.iterator(); iter.hasNext();)
        {
            Amf3Output amfOut = new Amf3Output(serializationContext);
            ByteArrayOutputStream outStream = new ByteArrayOutputStream();
            DataOutputStream dataOutStream = new DataOutputStream(outStream);
            amfOut.setOutputStream(dataOutStream);
           
            Message message = (Message)iter.next();
           
            // Add performance information if MPI is enabled.
            if (isRecordMessageSizes() || isRecordMessageTimes())
                addPerformanceInfo(message);
           
            if (Log.isDebug())
                log.debug("Endpoint with id '" + getId() + "' is streaming message: " + message);
                       
            amfOut.writeObject(message);
            dataOutStream.flush();
            byte[] messageBytes = outStream.toByteArray();              
            streamChunk(messageBytes, os, response);
           
            // Update the push count for the StreamingEndpoint mbean.
View Full Code Here

TOP

Related Classes of flex.messaging.io.amf.Amf3Output

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.