/** * <p>The default constructor requires values for all final member variables * of this. It expects all arguments but the {@link SourceSessionParams} to * be proper, so no checks are performed. The constructor is declared * package private since only {@link MessageBus} is supposed to instantiate * it.</p> * * @param mbus The message bus that created this instance. * @param params A parameter object that holds configuration parameters. */ SourceSession(MessageBus mbus, SourceSessionParams params) { this.mbus = mbus; sequencer = new Sequencer(mbus); if (!params.hasReplyHandler()) { throw new NullPointerException("Reply handler is null."); } replyHandler = params.getReplyHandler(); throttlePolicy = params.getThrottlePolicy(); timeout = params.getTimeout(); mbus.register(this); }