':param gateway_parameters: An instance of `GatewayParameters` used to
configure the various options of the gateway.
:param callback_server_parameters: An instance of
`CallbackServerParameters` used to configure various options of the
gateway server. Must be provided to start a gateway server.
Otherwise, callbacks won"t be available.'

def __init__(self, gateway_client=None, auto_field=False, python_proxy_port=DEFAULT_PYTHON_PROXY_PORT, start_callback_server=False, auto_convert=False, eager_load=False, gateway_parameters=None, callback_server_parameters=None):

    self.gateway_parameters = gateway_parameters
    if (not gateway_parameters):
        self.gateway_parameters = GatewayParameters(auto_field=auto_field, auto_convert=auto_convert, eager_load=eager_load)
    self.callback_server_parameters = callback_server_parameters
    if (not callback_server_parameters):
        self.callback_server_parameters = CallbackServerParameters(port=python_proxy_port, eager_load=False)
    if auto_field:
        deprecated(u'JavaGateway.auto_field', u'1.0', u'GatewayParameters')
    if auto_convert:
        deprecated(u'JavaGateway.auto_convert', u'1.0', u'GatewayParameters')
    if eager_load:
        deprecated(u'JavaGateway.eager_load', u'1.0', u'GatewayParameters')
    if start_callback_server:
        deprecated(u'JavaGateway.start_callback_server    and    python_proxy_port', u'1.0', u'CallbackServerParameters')
        self.callback_server_parameters.eager_load = True
    if gateway_client:
        deprecated(u'JavaGateway.gateway_client', u'1.0', u'GatewayParameters')
    else:
        gateway_client = GatewayClient(address=self.gateway_parameters.address, port=self.gateway_parameters.port, auto_close=self.gateway_parameters.auto_close)
    self.gateway_property = GatewayProperty(self.gateway_parameters.auto_field, PythonProxyPool())
    self._python_proxy_port = python_proxy_port
    self.set_gateway_client(gateway_client)
    self._callback_server = None
    if self.gateway_parameters.eager_load:
        self._eager_load()
    if self.callback_server_parameters.eager_load:
        self.start_callback_server(self.callback_server_parameters)
