Class DynamicSharedService

    • Constructor Detail

      • DynamicSharedService

        public DynamicSharedService()
      • DynamicSharedService

        public DynamicSharedService​(java.lang.String lookupName)
    • Method Detail

      • init

        public void init()
                  throws CoreException
        Description copied from interface: ComponentLifecycle
        Initialises the component.

        Component initialisation includes config verification, creation of connections etc.

        Throws:
        CoreException - wrapping any underlying Exceptions
      • close

        public void close()
        Description copied from interface: ComponentLifecycle
        Closes the component.

        A closed component should release any connections it uses, etc. and clean up completely. Throwing a RuntimeException may cause unintended consequences

      • doService

        public void doService​(AdaptrisMessage msg)
                       throws ServiceException
        Description copied from interface: Service

        Apply the service to the message.

        Parameters:
        msg - the AdaptrisMessage to process
        Throws:
        ServiceException - wrapping any underlying Exceptions
      • isBranching

        public boolean isBranching()
        Description copied from interface: Service

        Returns true if the implementation supports branching.

        Returns:
        true if the implementation supports branching
        See Also:
        BranchingServiceCollection
      • getCache

        protected java.util.Map<java.lang.String,​Service> getCache()
      • maxEntries

        protected int maxEntries()
      • withMaxEntries

        public <T extends DynamicSharedService> T withMaxEntries​(java.lang.Integer i)
      • expirationMillis

        protected long expirationMillis()
      • getMaxEntries

        public java.lang.Integer getMaxEntries()
        Max entries to store in the internal cache.
      • setMaxEntries

        public void setMaxEntries​(java.lang.Integer maxEntries)
        Max entries to store in the internal cache.
      • getExpiration

        public TimeInterval getExpiration()
        Time (LRU) before expiration.
      • setExpiration

        public void setExpiration​(TimeInterval expiration)
        Time (LRU) before expiration.
      • getLookupName

        public java.lang.String getLookupName()
        Set the name of the service that will be looked up from SharedComponentList.getServices(),

        allows you to resolve the lookup name using InterlokMessage.resolve(String). This reference will then be looked up and used for processing. A cache is used to avoid excessive lifecycle overhead for looked up services.

      • setLookupName

        public void setLookupName​(java.lang.String lookupName)
        Set the name of the service that will be looked up from SharedComponentList.getServices(),

        allows you to resolve the lookup name using InterlokMessage.resolve(String). This reference will then be looked up and used for processing. A cache is used to avoid excessive lifecycle overhead for looked up services.