Package org.drools.grid.generic

Examples of org.drools.grid.generic.MessageResponseHandler


    public void messageReceived(GenericIoWriter writer,
                                Message msg) throws Exception {

        systemEventListener.debug( "Message receieved : " + msg );

        MessageResponseHandler responseHandler = (MessageResponseHandler) responseHandlers.remove( msg.getResponseId() );

        if ( responseHandler != null ) {
            Object payload = msg.getPayload();
            if (payload instanceof Command && ((Command)msg.getPayload()).getArguments().size() > 0 &&
              ((Command)msg.getPayload()).getArguments().get(0) instanceof RuntimeException)
              payload = ((Command)msg.getPayload()).getArguments().get(0);
            if (( payload != null && payload instanceof RuntimeException )) {
                responseHandler.setError( (RuntimeException) payload );
            } else {
                responseHandler.receive( msg );
            }
        } else if ( handler != null ) {
            this.handler.messageReceived( writer,
                                          msg );
        } else {
View Full Code Here

TOP

Related Classes of org.drools.grid.generic.MessageResponseHandler

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.