Package flex.messaging.io

Examples of flex.messaging.io.MessageDeserializer


      ClientStatusException, ServerStatusException
  {
    DataInputStream din = new DataInputStream( inputStream );
    ActionMessage message = new ActionMessage();
    actionContext.setRequestMessage( message );
    MessageDeserializer deserializer = new AmfMessageDeserializer();
    deserializer.initialize( serializationContext, din, null/* trace */);
    deserializer.readMessage( message, actionContext );
    din.close();
    context.setProperty( AMFResponse.AMF_RESPONSE_ACTION_MESSAGE, message );
    return processAmfPacket( message );
  }
View Full Code Here


            ServerStatusException
    {
        DataInputStream din = new DataInputStream(inputStream);
        ActionMessage message = new ActionMessage();
        actionContext.setRequestMessage(message);
        MessageDeserializer deserializer = new AmfMessageDeserializer();
        deserializer.initialize(serializationContext, din, null/*trace*/);
        deserializer.readMessage(message, actionContext);
        din.close();
        return processAmfPacket(message);
    }
View Full Code Here

        try
        {
            TypeMarshallingContext.setTypeMarshaller(typeMarshaller);
           
            // Deserialize the input stream into an ActionMessage object.
            MessageDeserializer deserializer = serializationContext.newMessageDeserializer();

            // Setup the deserialization context.          
            deserializer.initialize(serializationContext, input, debugTrace);

            // Record the length of the input stream for performance metrics.
            if (contentLength != -1)
                context.setDeserializedBytes(contentLength);

            // Set up the incoming MPI info if it is enabled.           
            if (context.isMPIenabled())
            {
                MessagePerformanceInfo mpi = new MessagePerformanceInfo();
                mpi.recordMessageSizes = context.isRecordMessageSizes();
                mpi.recordMessageTimes = context.isRecordMessageTimes();
                if (context.isRecordMessageTimes())
                    mpi.receiveTime = System.currentTimeMillis();
                if (context.isRecordMessageSizes())
                    mpi.messageSize = contentLength;
               
                context.setMPII(mpi);
            }

            ActionMessage m = new ActionMessage();
            context.setRequestMessage(m);
            deserializer.readMessage(m, context);
            success = true; // Continue inbound processing.
        }
        catch (EOFException eof)
        {
            context.setStatus(MessageIOConstants.STATUS_NOTAMF);
View Full Code Here

        SerializationContext sc = SerializationContext.getSerializationContext();

        try
        {
            // Deserialize the input stream into an "ActionMessage" object.
            MessageDeserializer deserializer = sc.newMessageDeserializer();

            // Set up the deserialization context
            InputStream in = FlexContext.getHttpRequest().getInputStream();
            deserializer.initialize(sc, in, debugTrace);

            // record the length of the input stream for performance metrics
            int reqLen = FlexContext.getHttpRequest().getContentLength();
            context.setDeserializedBytes(reqLen);

            // set up the incoming MPI info if it is enabled
            if(context.isMPIenabled())
            {
                MessagePerformanceInfo mpi = new MessagePerformanceInfo();
                mpi.recordMessageSizes = context.isRecordMessageSizes();
                mpi.recordMessageTimes = context.isRecordMessageTimes();
                if(context.isRecordMessageTimes())
                    mpi.receiveTime = System.currentTimeMillis();
                if(context.isRecordMessageSizes())
                    mpi.messageSize =reqLen;

                context.setMPII(mpi);
            }

            ActionMessage m = new ActionMessage();
            context.setRequestMessage(m);
            deserializer.readMessage(m, context);
            success = true;
        }
        catch (EOFException eof)
        {
            context.setStatus(MessageIOConstants.STATUS_NOTAMF);
View Full Code Here

    protected Object processHttpResponseBody(InputStream inputStream) throws ClassNotFoundException, IOException,
            ClientStatusException, ServerStatusException {
        DataInputStream din = new DataInputStream(inputStream);
        ActionMessage message = new ActionMessage();
        actionContext.setRequestMessage(message);
        MessageDeserializer deserializer = new AmfMessageDeserializer();
        deserializer.initialize(serializationContext, din, null/* trace */);
        deserializer.readMessage(message, actionContext);
        din.close();
        context.setProperty(AMFResponse.AMF_RESPONSE_ACTION_MESSAGE, message);
        return processAmfPacket(message);
    }
View Full Code Here

        SerializationContext sc = SerializationContext.getSerializationContext();

        try
        {
            // Deserialize the input stream into an "ActionMessage" object.
            MessageDeserializer deserializer = sc.newMessageDeserializer();

            // Set up the deserialization context
            InputStream in = FlexContext.getHttpRequest().getInputStream();
            deserializer.initialize(sc, in, debugTrace);

            // record the length of the input stream for performance metrics
            int reqLen = FlexContext.getHttpRequest().getContentLength();
            context.setDeserializedBytes(reqLen);

            // set up the incoming MPI info if it is enabled           
            if(context.isMPIenabled())
            {
              MessagePerformanceInfo mpi = new MessagePerformanceInfo();
              mpi.recordMessageSizes = context.isRecordMessageSizes();
              mpi.recordMessageTimes = context.isRecordMessageTimes();
              if(context.isRecordMessageTimes())
                mpi.receiveTime = System.currentTimeMillis();
              if(context.isRecordMessageSizes())
                mpi.messageSize =reqLen;
             
              context.setMPII(mpi);
            }

            ActionMessage m = new ActionMessage();
            context.setRequestMessage(m);
            deserializer.readMessage(m, context);
            success = true;
        }
        catch (EOFException eof)
        {
            context.setStatus(MessageIOConstants.STATUS_NOTAMF);
View Full Code Here

TOP

Related Classes of flex.messaging.io.MessageDeserializer

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.