Class ListenersClient

java.lang.Object
com.mxraven.admin.client.ListenersClient

public final class ListenersClient extends Object
Submission and MTA listener collection. Reads and creation return hydrated Listener entities whose operations and children act on that listener.
  • Constructor Details

    • ListenersClient

      public ListenersClient(AdminClient client, String tenantSlug)
      Create a client for the listener collection of a tenant.
      Parameters:
      client - underlying admin client
      tenantSlug - tenant slug whose listeners are accessed
  • Method Details

    • query

      public ListenerQuery query()
      Start a typed, fluent list request.
      Returns:
      a new listener query
    • list

      public Paged<Listener> list() throws IOException
      List all listeners (first page fetched eagerly, remaining pages lazy).
      Returns:
      a lazily paginating collection of listeners
      Throws:
      IOException - if the first page request fails or is interrupted
    • get

      public Listener get(String listenerId) throws IOException
      Get a listener by its identifier.
      Parameters:
      listenerId - listener identifier
      Returns:
      the hydrated listener
      Throws:
      IOException - if the request fails or is interrupted
    • create

      public Listener create(Consumer<CreateListenerRequest.Builder> configure) throws IOException
      Create a listener from a configured builder.
      Parameters:
      configure - consumer that configures the request builder
      Returns:
      the created listener
      Throws:
      IOException - if the request fails or is interrupted
    • create

      public Listener create(CreateListenerRequest request) throws IOException
      Create a listener.
      Parameters:
      request - creation request
      Returns:
      the created listener
      Throws:
      IOException - if the request fails or is interrupted
    • listMtaListeners

      public List<Listener> listMtaListeners() throws IOException
      Fetch every MTA listener, following cursor pages.
      Returns:
      all MTA listeners
      Throws:
      IOException - if a page request fails or is interrupted
    • listSubmissionListeners

      public List<Listener> listSubmissionListeners() throws IOException
      Fetch every submission listener, following cursor pages.
      Returns:
      all submission listeners
      Throws:
      IOException - if a page request fails or is interrupted