I think you can use SelectedProtocol.protocolForName(...) ?