… still trying to write another protocol. Can someone point me to where I can/should access the ProtocolConfiguration. How?



Yep: the ProtocolConfigurationRegistry is passed in

Can you fill me in on how I get from the ProtocolConfigurationRegistry to the protocol-specific ProtocolConfiguration?

protocolConfigurationRegistry.get[MyProtocolConfiguration] or protocolConfigurationRegistry.get(default: MyProtocolConfiguration)

Or course, MyProtocolConfiguration instance must have been registered first. You usually do so by passing it to protocolConfig on simulation setUp.


Got it working now, but might you mean

protocolConfigurationRegistry.getProtocolConfiguration[MyProtocolConfiguration] or protocolConfigurationRegistry.getProtocolConfiguration(default: MyProtocolConfiguration)




Still don’t understand how in the HTTP case

class HttpRequestActionBuilder(requestName: Expression[String], requestFactory: RequestFactory, checks: List[HttpCheck], responseProcessor: Option[ResponseProcessor]) extends ActionBuilder {

private[gatling] def build(next: ActorRef, protocolConfigurationRegistry: ProtocolConfigurationRegistry): ActorRef = system.actorOf(Props(HttpRequestAction(requestName, next, requestFactory, checks, responseProcessor, protocolConfigurationRegistry)))


can work, considering that

class HttpRequestAction(

requestName: Expression[String],

val next: ActorRef,

requestFactory: RequestFactory,

checks: List[HttpCheck],

responseProcessor: Option[ResponseProcessor],

protocolConfiguration: HttpProtocolConfiguration) extends Bypassable {

Sure, it can’t :wink:

You’re comparing HttpRequestActionBuilder before this commit and HttpRequestAction after this commit. Our discussion made me realize that the code wasn’t at the right place.