# Package py4j

- Interface Summary
  Interface | Description
  --- | ---
  GatewayServerListener | A client can implement this listener to be notified of Gateway events.
  Py4JClientConnection |
  Py4JJavaServer | Interface that describes the operations a server must support to receive requests from the Python side.
  Py4JPythonClient | Interface that describes the operations a client must support to make requests to the Python side.
  Py4JPythonClientPerThread |
  Py4JServerConnection |

- Class Summary
  Class | Description
  --- | ---
  Base64 | A very fast and memory efficient class to encode and decode to and from BASE64 in full accordance with RFC 2045. On Windows XP sp1 with 1.4.2_04 and later ;), this encoder and decoder is about 10 times faster on small arrays (10 - 1000 bytes) and 2-3 times as fast on larger arrays (10000 - 1000000 bytes) compared to `sun.misc.Encoder()/Decoder()`. On byte arrays the encoder is about 20% faster than Jakarta Commons Base64 Codec for encode and about 50% faster for decoding large arrays.
  CallbackClient | A CallbackClient is responsible for managing communication channels: channels are created as needed (e.g., one per concurrent thread) and are closed after a certain time.
  CallbackConnection | Default implementation of the CommunicationChannel interface using TCP sockets.
  ClientServer | This class creates the JavaServer and the PythonClient necessary to communicate with a Python virtual machine with the new threading model.
  ClientServer.ClientServerBuilder | Helper class to make it easier and self-documenting how a `ClientServer` is constructed.
  ClientServerConnection |
  DefaultApplication | Default application that can be used to quickly test Py4J.
  DefaultGatewayServerListener | This class implements a default `GatewayServerListener`.
  Gateway | A Gateway manages various states: entryPoint, references to objects returned to a Python program, etc.
  GatewayConnection | Manage the connection between a Python program and a Gateway.
  GatewayServer | This class enables Python programs to access a Java program.
  GatewayServer.GatewayServerBuilder | Helper class to make it easier and self-documenting how a `GatewayServer` is constructed.
  JavaServer | This class extends GatewayServer by implementing a new threading model: a thread always use the same connection to the other side so callbacks are executed in the calling thread.
  JVMView | A JVM view keeps track of imports and import searches.
  NetworkUtil | Utility class used to perform network operations.
  Protocol | This class defines the protocol used to communicate between two virtual machines (e.g., Python and Java).
  PythonClient | Subclass of CallbackClient that implements the new threading model, ensuring that each thread uses its own connection.
  ReturnObject | A ReturnObject wraps a value returned by a method.
  StringUtil | String utility class providing operations to escape and unescape new lines.

- Enum Summary
  Enum | Description
  --- | ---
  Py4JNetworkException.ErrorTime |

- Exception Summary
  Exception | Description
  --- | ---
  Py4JAuthenticationException |
  Py4JException | Exception raised when an error is encountered while using Py4J.
  Py4JJavaException | Exception raised when an exception is thrown in the client code.
  Py4JNetworkException | Exception raised when a network error is encountered while using Py4J.