Package flex.messaging.messages

Examples of flex.messaging.messages.MessagePerformanceInfo


     * @param message Message to add performance headers to.
     */
    protected void addPerformanceInfo(Message message)
    {
        // If MPI is not enabled, simply return.
        MessagePerformanceInfo mpiOriginal = MessagePerformanceUtils.getMPII(message);
        if (mpiOriginal == null)
            return;

        // Otherwise, move the MPII object of the queued message to be
        // the MPIP object of the outgoing message.
        MessagePerformanceInfo mpip;
        mpip = (MessagePerformanceInfo)mpiOriginal.clone();
        try
        {
            // Set the original message info as the pushed causer info.
            MessagePerformanceUtils.setMPIP(message, mpip);
            MessagePerformanceUtils.setMPII(message, null);
        }
        catch (Exception e)
        {
            if (Log.isDebug())
                log.debug("MPI exception while streaming the message: " + e.toString());
        }

        // Overhead only used when MPI is enabled for sizing
        long serializationOverhead;
        MessagePerformanceInfo mpio;
        mpio = new MessagePerformanceInfo();
        if (mpip.recordMessageTimes)
        {
            mpio.sendTime = System.currentTimeMillis();
            mpio.infoType = "OUT";
        }
View Full Code Here


            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())
View Full Code Here

        // Set JMS properties as Flex headers.

        // While iterating through JMS message properties, build a message
        // performance object to send back to the client with the message
        // properties starting with with MPI_HEADER_IN (if any).
        MessagePerformanceInfo mpi = null;

        try
        {
            for (Enumeration propEnum = jmsMessage.getPropertyNames(); propEnum.hasMoreElements();)
            {
                String propName = (String)propEnum.nextElement();
                try
                {
                    Object propValue = jmsMessage.getObjectProperty(propName);
                    if (propName.startsWith(MessagePerformanceUtils.MPI_HEADER_IN))
                    {
                        if (mpi == null)
                            mpi = new MessagePerformanceInfo();
                        propName = propName.substring(MessagePerformanceUtils.MPI_HEADER_IN.length());
                        java.lang.reflect.Field field;
                        try
                        {
                            field = mpi.getClass().getField(propName);
                            field.set(mpi, propValue);
                        }
                        catch (Exception ignore)
                        {
                            // Simply don't set the property if the value cannot be retrieved.
View Full Code Here

                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())
View Full Code Here

            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())
View Full Code Here

        // Set JMS properties as Flex headers.
       
        // While iterating through JMS message properties, build a message
        // performance object to send back to the client with the message
        // properties starting with with MPI_HEADER_IN (if any).
        MessagePerformanceInfo mpi = null;

        try
        {
            for (Enumeration propEnum = jmsMessage.getPropertyNames(); propEnum.hasMoreElements();)
            {
                String propName = (String)propEnum.nextElement();
                try
                {
                    Object propValue = jmsMessage.getObjectProperty(propName);               
                    if (propName.startsWith(MessagePerformanceUtils.MPI_HEADER_IN))
                    {
                        if (mpi == null)
                            mpi = new MessagePerformanceInfo();                   
                        propName = propName.substring(MessagePerformanceUtils.MPI_HEADER_IN.length());                   
                        java.lang.reflect.Field field;
                        try
                        {
                            field = mpi.getClass().getField(propName);
                            field.set(mpi, propValue);                       
                        }
                        catch (Exception ignore)
                        {
                            // Simply don't set the property if the value cannot be retrieved.
View Full Code Here

     * @param message Message to add performance headers to.
     */
    protected void addPerformanceInfo(Message message)
    {
        // If MPI is not enabled, simply return.      
        MessagePerformanceInfo mpiOriginal = MessagePerformanceUtils.getMPII(message);
        if (mpiOriginal == null)
            return;

        // Otherwise, move the MPII object of the queued message to be
        // the MPIP object of the outgoing message.       
        MessagePerformanceInfo mpip = null;
        mpip = (MessagePerformanceInfo)mpiOriginal.clone();
        try
        {  
            // Set the original message info as the pushed causer info.
            MessagePerformanceUtils.setMPIP(message, mpip);
            MessagePerformanceUtils.setMPII(message, null);
        }
        catch (Exception e)
        {
            if (Log.isDebug())
                log.debug("MPI exception while streaming the message: " + e.toString());        
        }
       
        // Overhead only used when MPI is enabled for sizing
        long serializationOverhead = 0;
        MessagePerformanceInfo mpio = null;
        mpio = new MessagePerformanceInfo();           
        if (mpip.recordMessageTimes)
        {              
            mpio.sendTime = System.currentTimeMillis()
            mpio.infoType = "OUT";           
        }
View Full Code Here

TOP

Related Classes of flex.messaging.messages.MessagePerformanceInfo

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.