Package org.drools.eventmessaging

Examples of org.drools.eventmessaging.EventResponseHandler


                    }
                }
                break;
            }
            case EventTriggerResponse: {
                EventResponseHandler responseHandler = (EventResponseHandler) responseHandlers.get(cmd.getId());
                if (responseHandler != null) {
                  if (responseHandler.isRemove()) {
                    responseHandlers.remove(cmd.getId());
                  }
                    if (!cmd.getArguments().isEmpty() && cmd.getArguments().get(0) instanceof RuntimeException) {
                        responseHandler.setError((RuntimeException) cmd.getArguments().get(0));
                    } else {
                        Payload payload = (Payload) cmd.getArguments().get(0);
                        responseHandler.execute(payload);
                    }
                }
                break;
            }
        }
View Full Code Here


                    }
                }
                break;
            }
            case EventTriggerResponse: {
                EventResponseHandler responseHandler = (EventResponseHandler) responseHandlers.get(cmd.getId());
                if (responseHandler != null) {
                  if (responseHandler.isRemove()) {
                    responseHandlers.remove(cmd.getId());
                  }
                    if (!cmd.getArguments().isEmpty() && cmd.getArguments().get(0) instanceof RuntimeException) {
                        responseHandler.setError((RuntimeException) cmd.getArguments().get(0));
                    } else {
                        Payload payload = (Payload) cmd.getArguments().get(0);
                        responseHandler.execute(payload);
                    }
                }
                break;
            }
        }
View Full Code Here

                }
                break;
            }
            case EventTriggerResponse: {
                Payload payload = (Payload) cmd.getArguments().get(0);
                EventResponseHandler responseHandler = (EventResponseHandler) responseHandlers.remove(cmd.getId());
                if (responseHandler != null) {
                    if (!cmd.getArguments().isEmpty() && cmd.getArguments().get(0) instanceof RuntimeException) {
                        responseHandler.setError((RuntimeException) cmd.getArguments().get(0));
                    } else {
                        responseHandler.execute(payload);
                    }
                }
                break;
            }
        }
View Full Code Here

                }
                break;
            }
            case EventTriggerResponse : {
                Payload payload = (Payload) cmd.getArguments().get( 0 );
                EventResponseHandler responseHandler = (EventResponseHandler) responseHandlers.remove( cmd.getId() );
                if ( responseHandler != null ) {
                    if ( !cmd.getArguments().isEmpty() &&  cmd.getArguments().get( 0 ) instanceof TaskError ) {
                        responseHandler.setError( ((TaskError) cmd.getArguments().get( 0 )).getMessage() );
                    } else {
                        responseHandler.execute( payload );
                    }
                }
                break;
            }
            default : {
View Full Code Here

TOP

Related Classes of org.drools.eventmessaging.EventResponseHandler

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.