'Sets the gateway client for this JavaGateway. This sets the
appropriate gateway_property and resets the main jvm view (self.jvm).
This is for advanced usage only. And should only be set before the
gateway is loaded.'

def set_gateway_client(self, gateway_client):

    if self.gateway_parameters.auto_convert:
        gateway_client.converters = proto.INPUT_CONVERTER
    else:
        gateway_client.converters = None
    gateway_client.gateway_property = self.gateway_property
    self._gateway_client = gateway_client
    self.entry_point = JavaObject(proto.ENTRY_POINT_OBJECT_ID, self._gateway_client)
    self.jvm = JVMView(self._gateway_client, jvm_name=proto.DEFAULT_JVM_NAME, id=proto.DEFAULT_JVM_ID)
