Examples of AbstractMessage


Examples of org.apache.mina.examples.sumup.message.AbstractMessage

        this.type = type;
    }

    public void encode( ProtocolSession session, Object message, ProtocolEncoderOutput out ) throws ProtocolViolationException
    {
        AbstractMessage m = ( AbstractMessage ) message ;
        ByteBuffer buf = ByteBuffer.allocate( 16 );
        buf.setAutoExpand( true ); // Enable auto-expand for easier encoding
       
        // Encode a header
        buf.putShort( ( short ) type );
        buf.putInt( m.getSequence() );
       
        // Encode a body
        encodeBody( session, m, buf );
        buf.flip();
        out.write( buf );
View Full Code Here

Examples of org.apache.mina.examples.sumup.message.AbstractMessage

            sequence = in.getInt(); // Get 'sequence'.
            readHeader = true;
        }
       
        // Try to decode body
        AbstractMessage m = decodeBody( session, in );
        // Return NEED_DATA if the body is not fully read.
        if( m == null )
        {
            return MessageDecoderResult.NEED_DATA;
        }
        else
        {
            readHeader = false; // reset readHeader for the next decode
        }
        m.setSequence( sequence );
        out.write( m );
       
        return MessageDecoderResult.OK;
    }
View Full Code Here

Examples of org.codehaus.xfire.exchange.AbstractMessage

                catch (XFireFault fault)
                {
                    /* If this happens we've most likely received some invalid
                     * WS-Addressing headers, so lets try to make the best of it.
                     */
                    AbstractMessage faultMsg = context.getExchange().getFaultMessage();
                    AddressingHeaders outHeaders = (AddressingHeaders) faultMsg.getProperty(ADRESSING_HEADERS);
                    if (outHeaders == null)
                    {
                        outHeaders = new AddressingHeaders();
                       
                        if (headers != null)
                            outHeaders.setRelatesTo(headers.getMessageID());
                       
                        outHeaders.setAction(WSAConstants.WSA_200508_FAULT_ACTION);
                        faultMsg.setProperty(ADRESSING_HEADERS, outHeaders);
                        faultMsg.setProperty(ADRESSING_FACTORY, factory);
                    }
                    throw fault;
                }
            }
        }
View Full Code Here

Examples of org.red5.compatibility.flex.messaging.messages.AbstractMessage

      }
      Object result = call.getClientResult();
      if (!call.isSuccess()) {
        if (call.isMessaging && !(result instanceof ErrorMessage)) {
          // Generate proper error result for the Flex messaging client
          AbstractMessage request = (AbstractMessage) call.getArguments()[0];
          if (result instanceof ServiceNotFoundException) {
            ServiceNotFoundException ex = (ServiceNotFoundException) result;
            result = FlexMessagingService.returnError(request, "serviceNotAvailable", "Flex messaging not activated", ex.getMessage());
          } else if (result instanceof Throwable) {
            result = FlexMessagingService.returnError(request, "Server.Invoke.Error", ((Throwable) result).getMessage(), (Throwable) result);
View Full Code Here

Examples of org.richfaces.component.AbstractMessage

            showDetail = uiMessages.isShowDetail();
            isMessages = true;
        }
        boolean escape = true;
        if (isComponentRichMessage(component)) {
            AbstractMessage richMessage = (AbstractMessage) component;
            escape = richMessage.isEscape();
        }
        if (isComponentRichMessages(component)) {
            AbstractMessages richMessages = (AbstractMessages) component;
            escape = richMessages.isEscape();
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.