/** * Associates a message processor with this instance. * <p> * The message processor cannot be started before. This method will start it. * </p> * <p> * This method must be invoked only once. * </p> * @param messageProcessor the message processor */ public void associateMessageProcessor( AbstractMessageProcessor<T> messageProcessor ) { if( this.messageProcessor != null ) throw new IllegalArgumentException( "The message processor was already defined." ); this.messageProcessor = messageProcessor; configureMessageProcessor( messageProcessor ); this.messageProcessor.start(); }
/** * Associates a message processor with this instance. * <p> * The message processor cannot be started before. This method will start it. * </p> * <p> * This method must be invoked only once. * </p> * @param messageProcessor the message processor */ public void associateMessageProcessor( AbstractMessageProcessor<T> messageProcessor ) { if( this.messageProcessor != null ) throw new IllegalArgumentException( "The message processor was already defined." ); this.messageProcessor = messageProcessor; configureMessageProcessor( messageProcessor ); this.messageProcessor.start(); }