def METHOD_NAME(self, context):
    if self.alpnSelectCallback is None or self.alpnProtocols is None:
        return
    context.set_alpn_select_callback(self.alpnSelectCallback)
    context.set_alpn_protos(self.alpnProtocols)