/** * Initializes a Unit of Work (without starting it). * * @param message the message that will be processed in the context of the unit of work */ public DefaultUnitOfWork(T message) { processingContext = new MessageProcessingContext<>(message); }
/** * Resets the state of this Unit of Work, by setting its phase to {@code NOT_STARTED}, replacing the message * of this Unit of Work with given {@code message}, and clearing its collection of registered handlers. * * @param message the new Message that is about to be processed. */ public void reset(T message) { if (processingContext == null) { processingContext = new MessageProcessingContext<>(message); } else { processingContext.reset(message); } setPhase(Phase.NOT_STARTED); resources().clear(); correlationDataProviders().clear(); }
/** * Initializes a Unit of Work (without starting it). * * @param message the message that will be processed in the context of the unit of work */ public DefaultUnitOfWork(T message) { processingContext = new MessageProcessingContext<>(message); }
/** * Initializes a Unit of Work (without starting it). * * @param message the message that will be processed in the context of the unit of work */ public DefaultUnitOfWork(T message) { processingContext = new MessageProcessingContext<>(message); }
/** * Resets the state of this Unit of Work, by setting its phase to {@code NOT_STARTED}, replacing the message * of this Unit of Work with given {@code message}, and clearing its collection of registered handlers. * * @param message the new Message that is about to be processed. */ public void reset(T message) { if (processingContext == null) { processingContext = new MessageProcessingContext<>(message); } else { processingContext.reset(message); } setPhase(Phase.NOT_STARTED); resources().clear(); correlationDataProviders().clear(); }
/** * Resets the state of this Unit of Work, by setting its phase to {@code NOT_STARTED}, replacing the message * of this Unit of Work with given {@code message}, and clearing its collection of registered handlers. * * @param message the new Message that is about to be processed. */ public void reset(T message) { if (processingContext == null) { processingContext = new MessageProcessingContext<>(message); } else { processingContext.reset(message); } setPhase(Phase.NOT_STARTED); resources().clear(); correlationDataProviders().clear(); }