Class GlobalKinesisConfiguration

    • Constructor Detail

      • GlobalKinesisConfiguration

        public GlobalKinesisConfiguration()
    • Method Detail

      • setRegion

        @DataBoundSetter
        public void setRegion​(String regionString)
        Set AWS Region when loading the global configuration page
        Parameters:
        regionString - AWS Region to connect to. This parameter is optional. If set it will override any Region set in the Region Provider Chain.
      • setShutdownTimeoutMs

        @DataBoundSetter
        public void setShutdownTimeoutMs​(Integer timeoutMs)
        Set the maximum total time (milliseconds) waiting when shutting down kinesis consumers.
        Parameters:
        timeoutMs - timeout in milliseconds
      • setApplicationName

        @DataBoundSetter
        public void setApplicationName​(String applicationNameString)
        Set application name when loading the global configuration page This name identifies the application, which must have a unique name that is scoped to the Amazon account and Region used by the application. This name is used as a name for the control table in Amazon DynamoDB and the namespace for Amazon CloudWatch metrics.
        Parameters:
        applicationNameString - the name of this application
      • setKinesisConsumerEnabled

        @DataBoundSetter
        public void setKinesisConsumerEnabled​(boolean kinesisConsumerEnabled)
        Set the enabled/disabled status of the plugin when loading the global configuration page
        Parameters:
        kinesisConsumerEnabled - enabled/disabled status
      • setKinesisStreamItems

        @DataBoundSetter
        public void setKinesisStreamItems​(List<KinesisStreamItem> kinesisStreamItems)
        Set KinesisStreamItem values when loading the global configuration page
        Parameters:
        kinesisStreamItems - KinesisStreamItem to set
      • setLocalEndpoint

        @DataBoundSetter
        public void setLocalEndpoint​(String localEndpoint)
        Set an optional endpoint to point to a local kinesis stack rather than the AWS service. Useful for development.
        Parameters:
        localEndpoint - the local endpoint URL, i.e. http://localhost:4566
      • get

        public static GlobalKinesisConfiguration get()
        Get the GlobalKinesisConfiguration
        Returns:
        the global Kinesis configuration
      • isKinesisConsumerEnabled

        public boolean isKinesisConsumerEnabled()
        Indicates if the plugin is enabled or not
        Returns:
        a boolean indicating the status of the plugin
      • getRegion

        public String getRegion()
        Get the AWS Region to connect to from the configuration page
        Returns:
        AWS Region to connect to
      • getApplicationName

        public String getApplicationName()
        Get the application name from the configuration page
        Returns:
        Application name
      • getShutdownTimeoutMs

        public Integer getShutdownTimeoutMs()
        Get the maximum total time (milliseconds) waiting when shutting down kinesis consumers.
        Returns:
        The timeout (milliseconds)
      • getLocalEndpoint

        public String getLocalEndpoint()
        Get the local endpoint to consume from rather than the AWS service
        Returns:
        The local endpoint, or null, when not defined.
      • doCheckLocalEndpoint

        public FormValidation doCheckLocalEndpoint​(@QueryParameter
                                                   String value)
        Checks local endpoint URL is valid.
        Parameters:
        value - the URL.
        Returns:
        FormValidation object that indicates ok or error.
      • doCheckRegion

        public FormValidation doCheckRegion​(@QueryParameter
                                            String value)
        Checks AWS region is valid.
        Parameters:
        value - the region.
        Returns:
        FormValidation object that indicates ok or error.
      • doCheckApplicationName

        public FormValidation doCheckApplicationName​(@QueryParameter
                                                     String value)
        Checks applicationName is valid
        Parameters:
        value - the application name
        Returns:
        FormValidation object that indicates ok or error.
      • doCheckInitialPositionInStream

        public FormValidation doCheckInitialPositionInStream​(@QueryParameter
                                                             String value)
        Checks AWS Kinesis initial stream position is valid.
        Parameters:
        value - the initial position in the stream. Valid values: LATEST, TRIM_HORIZON
        Returns:
        FormValidation object that indicates ok or error.
      • configure

        public boolean configure​(org.kohsuke.stapler.StaplerRequest req,
                                 net.sf.json.JSONObject json)
        Overrides:
        configure in class GlobalConfiguration
        Parameters:
        req - StaplerRequest submitted when saving the configuration page
        json - JSON containing the configuration parameters set
        Returns:
        true if the configuration was correctly saved, false otherwise