Class NatsConnection

    • Constructor Detail

      • NatsConnection

        public NatsConnection()
    • Method Detail

      • clientConnection

        public io.nats.client.Connection clientConnection()
                                                   throws java.lang.Exception
        Throws:
        java.lang.Exception
      • createDispatcher

        public io.nats.client.Dispatcher createDispatcher​(io.nats.client.MessageHandler handler)
                                                   throws java.lang.Exception
        Throws:
        java.lang.Exception
      • close

        public void close​(io.nats.client.Dispatcher dispatcher)
      • connect

        protected abstract io.nats.client.Connection connect()
                                                      throws java.lang.Exception
        Throws:
        java.lang.Exception
      • connectionName

        protected abstract java.lang.String connectionName()
      • exceedsMaxAttempts

        protected <T extends java.lang.Exception> void exceedsMaxAttempts​(int attemptCount,
                                                                          T e)
                                                                   throws T extends java.lang.Exception
        Throws:
        T extends java.lang.Exception