py4j

## Class DefaultGatewayServerListener

- java.lang.Object
- - py4j.DefaultGatewayServerListener

- All Implemented Interfaces:
    GatewayServerListener
  Direct Known Subclasses:
    GatewayServer

      public class DefaultGatewayServerListener
      extends Object
      implements GatewayServerListener

  This class implements a default `GatewayServerListener`. All operations do nothing by default. Clients can extend this class to only override the methods they need.

  Author:
    Barthelemy Dagenais

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `DefaultGatewayServerListener()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `connectionError(Exception e)`
    `void` | `connectionStarted(GatewayConnection gatewayConnection)`
    `void` | `connectionStopped(GatewayConnection gatewayConnection)`
    `void` | `serverError(Exception e)` This method may be called concurrently with serverPostShutdown().
    `void` | `serverPostShutdown()` This method may be called concurrently with serverStopped() and serverError().
    `void` | `serverPreShutdown()`
    `void` | `serverStarted()`
    `void` | `serverStopped()` This method may be called concurrently with serverPostShutdown().

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### DefaultGatewayServerListener

          public DefaultGatewayServerListener()

  - ### Method Detail

    - #### connectionError

          public void connectionError(Exception e)

      Specified by:
        `connectionError` in interface `GatewayServerListener`

    - #### connectionStarted

          public void connectionStarted(GatewayConnection gatewayConnection)

      Specified by:
        `connectionStarted` in interface `GatewayServerListener`

    - #### connectionStopped

          public void connectionStopped(GatewayConnection gatewayConnection)

      Specified by:
        `connectionStopped` in interface `GatewayServerListener`

    - #### serverError

          public void serverError(Exception e)

      Description copied from interface: `GatewayServerListener`

      This method may be called concurrently with serverPostShutdown().

      Typically a one thread calls shutdown() and then, the thread running the GatewayServer breaks from the connection accept loop.

      Specified by:
        `serverError` in interface `GatewayServerListener`

    - #### serverPostShutdown

          public void serverPostShutdown()

      Description copied from interface: `GatewayServerListener`

      This method may be called concurrently with serverStopped() and serverError().

      Typically a one thread calls shutdown() and then, the thread running the GatewayServer breaks from the connection accept loop.

      Specified by:
        `serverPostShutdown` in interface `GatewayServerListener`

    - #### serverPreShutdown

          public void serverPreShutdown()

      Specified by:
        `serverPreShutdown` in interface `GatewayServerListener`

    - #### serverStarted

          public void serverStarted()

      Specified by:
        `serverStarted` in interface `GatewayServerListener`

    - #### serverStopped

          public void serverStopped()

      Description copied from interface: `GatewayServerListener`

      This method may be called concurrently with serverPostShutdown().

      Typically a one thread calls shutdown() and then, the thread running the GatewayServer breaks from the connection accept loop.

      Specified by:
        `serverStopped` in interface `GatewayServerListener`