Class Quicknote

java.lang.Object
io.adamantic.quicknote.Quicknote

public class Quicknote extends Object
Entry point for the Quicknote library.
Author:
Domenico Barra - domenico@adamantic.io
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    Changes the default client ID used by the library.
    Returns a connector for the given name, creating and starting it if necessary.
    static Quicknote
    Lazily creates and initializes a singleton instance of the Quicknote library.
    Returns a receiver for the given name, delegating its retrieval to the specific connector hosting the receiver (specified in the configuration).
    sender(String name)
    Returns a sender for the given name, delegating its retrieval to the specific connector hosting the sender (specified in the configuration).

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • clientId

      public static void clientId(String id)
      Changes the default client ID used by the library. This is useful to get advanced delivery/redelivery semantics.
      Parameters:
      id - the new client ID to use.
    • instance

      public static Quicknote instance()
      Lazily creates and initializes a singleton instance of the Quicknote library.
      Returns:
      the instance, configured and ready for use
    • sender

      public Sender sender(String name) throws ChannelNotFound
      Returns a sender for the given name, delegating its retrieval to the specific connector hosting the sender (specified in the configuration).
      Parameters:
      name - the name of the sender to return
      Returns:
      the sender, ready for operation
      Throws:
      ChannelNotFound - if the sender is not found and cannot be created.
    • receiver

      public Receiver receiver(String name) throws ChannelNotFound
      Returns a receiver for the given name, delegating its retrieval to the specific connector hosting the receiver (specified in the configuration).
      Parameters:
      name - the name of the receiver to return
      Returns:
      the receiver, ready for operation
      Throws:
      ChannelNotFound - if the receiver is not found and cannot be created.
    • connector

      public Connector connector(String name)
      Returns a connector for the given name, creating and starting it if necessary.
      Parameters:
      name - the name of the connector to return
      Returns:
      the connector, ready for operation.
      Throws:
      ConfigException - if the connector is not found and cannot be created.