Class NATSStreamingNotificationSender

    • Constructor Detail

      • NATSStreamingNotificationSender

        public NATSStreamingNotificationSender()
    • Method Detail

      • sendNotification

        public void sendNotification​(Notification notification)
                              throws java.lang.Exception
        Publishes notification to NATS streaming server
        Overrides:
        sendNotification in class DefaultNotificationSender
        Parameters:
        notification - The notification to send
        Throws:
        java.lang.Exception - if something goes wrong with publish
      • startup

        public void startup()
                     throws java.lang.Exception
        Starts NATSStreaming connection and superclasses
        Specified by:
        startup in interface Configurable
        Overrides:
        startup in class DefaultNotificationSender
        Throws:
        java.lang.Exception - if there's an issue with superclasses, generating a client ID, or connecting to server
      • shutdown

        public void shutdown()
                      throws java.lang.Exception
        Safely closes the NATSStreaming connection and superclasses
        Specified by:
        shutdown in interface Configurable
        Overrides:
        shutdown in class DefaultNotificationSender
        Throws:
        java.lang.Exception - if superclasses throw exceptions
      • getClient

        public NATSClient getClient()
        Returns:
        NATSClient
      • setClient

        public void setClient​(NATSClient client)
        Parameters:
        client - NATSClient to set
      • getSubject

        public java.lang.String getSubject()
        Returns:
        subject
      • setSubject

        public void setSubject​(java.lang.String subject)
        Parameters:
        subject - to set