Package com.io7m.cardant.client.basic.internal

# Class CAClientUserIdSubscriber

java.lang.Object
com.io7m.cardant.client.basic.internal.CAClientUserIdSubscriber

All Implemented Interfaces:
  `AutoCloseable`, `Flow.Subscriber<com.io7m.hibiscus.api.HBStateType<?,CAIResponseType,CAIResponseError,CAClientCredentials>>`

public final class CAClientUserIdSubscriber extends Object implements Flow.Subscriber<com.io7m.hibiscus.api.HBStateType<?,CAIResponseType,CAIResponseError,CAClientCredentials>>, AutoCloseable
A subscriber that tracks user IDs.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `CAClientUserIdSubscriber()`
  A subscriber that tracks user IDs.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `close()`
  `Optional<CAUserID>`
  `getUserId()`
  `void`
  `onComplete()`
  `void`
  `onError(Throwable throwable)`
  `void`
  `onNext(com.io7m.hibiscus.api.HBStateType<?,CAIResponseType,CAIResponseError,CAClientCredentials> item)`
  `void`
  `onSubscribe(Flow.Subscription newSubscription)`
  `String`
  `toString()`

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

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

- ## Constructor Details

  - ### CAClientUserIdSubscriber

    public CAClientUserIdSubscriber()
    A subscriber that tracks user IDs.

- ## Method Details

  - ### getUserId

    public Optional<CAUserID> getUserId()
    Returns:
      The current user ID

  - ### onSubscribe

    public void onSubscribe(Flow.Subscription newSubscription)
    Specified by:
      `onSubscribe` in interface `Flow.Subscriber<com.io7m.hibiscus.api.HBStateType<?,CAIResponseType,CAIResponseError,CAClientCredentials>>`

  - ### onNext

    public void onNext(com.io7m.hibiscus.api.HBStateType<?,CAIResponseType,CAIResponseError,CAClientCredentials> item)
    Specified by:
      `onNext` in interface `Flow.Subscriber<com.io7m.hibiscus.api.HBStateType<?,CAIResponseType,CAIResponseError,CAClientCredentials>>`

  - ### onError

    public void onError(Throwable throwable)
    Specified by:
      `onError` in interface `Flow.Subscriber<com.io7m.hibiscus.api.HBStateType<?,CAIResponseType,CAIResponseError,CAClientCredentials>>`

  - ### onComplete

    public void onComplete()
    Specified by:
      `onComplete` in interface `Flow.Subscriber<com.io7m.hibiscus.api.HBStateType<?,CAIResponseType,CAIResponseError,CAClientCredentials>>`

  - ### close

    public void close()
    Specified by:
      `close` in interface `AutoCloseable`

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `Object`