Class FilteredSharedComponentStart

  • All Implemented Interfaces:
    SharedComponentLifecycleStrategy

    public class FilteredSharedComponentStart
    extends java.lang.Object
    implements SharedComponentLifecycleStrategy
    Filtered start strategy for SharedComponentList

    In a standard Adapter lifecycle; all shared connections are started before any channels are started. If a connection is referenced by a Channel that is not set to auto-start; then this can cause a connection to be made which would waste resources. Use this strategy to only start specific named connections. In any event, if a connection is not started when a channel or service that requires it is started, it will be started.

    All the includes are processed first to generate a subset of connections that is then used to process any exclusions. The include-connection-id and exclude-connection-id should be a String that will be treated as a regular expression format. If you do not specify any includes, then this implicitly means all elements are included. If you do not specify any excludes then nothing is excluded from the inclusion subset.

    Typically, you shouldn't need both includes and excludes because your skill with regular expressions mean that you can handle everything you need in either block. It is processed this way for completeness.

    In the adapter configuration file this class is aliased as filtered-shared-component-start which is the preferred alternative to the fully qualified classname when building your configuration.

    • Constructor Detail

      • FilteredSharedComponentStart

        public FilteredSharedComponentStart()
      • FilteredSharedComponentStart

        public FilteredSharedComponentStart​(java.lang.Boolean threaded)
    • Method Detail

      • getThreadedStart

        public java.lang.Boolean getThreadedStart()
      • setThreadedStart

        public void setThreadedStart​(java.lang.Boolean b)
        Enable use of ExecutorService to start connections.
        Parameters:
        b - true to start all connections in their own thread default is null (false).
      • getIncludes

        public java.util.List<java.lang.String> getIncludes()
      • setIncludes

        public void setIncludes​(java.util.List<java.lang.String> l)
        Set the list of connection ids to start.
        Parameters:
        l - the list of connection unique ids to include, defaults to an empty list.
      • getExcludes

        public java.util.List<java.lang.String> getExcludes()
      • setExcludes

        public void setExcludes​(java.util.List<java.lang.String> l)
        Set the list of connection ids to exclude.
        Parameters:
        l - the list of connection unique ids to exclude, defaults to an empty list.
      • addInclude

        public void addInclude​(java.lang.String pattern)
      • addExclude

        public void addExclude​(java.lang.String pattern)