Class ServiceImp

    • Field Detail

      • log

        protected transient org.slf4j.Logger log
    • Constructor Detail

      • ServiceImp

        public ServiceImp()

        Creates a new instance. Default unique ID is autogenerated using GuidGenerator.getUUID().

    • Method Detail

      • init

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

        Component initialisation includes config verification, creation of connections etc.

        Specified by:
        init in interface ComponentLifecycle
        Throws:
        CoreException - wrapping any underlying Exceptions
      • close

        public final 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

        Specified by:
        close in interface ComponentLifecycle
      • closeService

        protected abstract void closeService()
      • stop

        public void stop()
        Description copied from interface: ComponentLifecycle
        Stop the component

        A stopped component is not expected to be ready to process messages. In the case of AdaptrisMessageConsumer, calling stop will pause message delivery. Throwing a RuntimeException may cause unintended consequences

        Specified by:
        stop in interface ComponentLifecycle
      • createName

        public java.lang.String createName()
        Description copied from interface: MessageEventGenerator
        Create a name for any MleMarker that is generated.

        The default implementation is to return the classname of the component in question.

        * @return the name for any MleMarker that is generated.
        Specified by:
        createName in interface MessageEventGenerator
      • createQualifier

        public java.lang.String createQualifier()
        Description copied from interface: MessageEventGenerator
        Create a qualifier for any MleMarker that is generated.

        The default implementation is to return the unique-id of the component in question, or the empty string if not configured

        Specified by:
        createQualifier in interface MessageEventGenerator
        Returns:
        the qualifier for any MleMarker that is generated.
      • getUniqueId

        public java.lang.String getUniqueId()
        Description copied from interface: AdaptrisComponent
        Get the unique-id that is associated with this component.
        Specified by:
        getUniqueId in interface AdaptrisComponent
        Returns:
        the unique-id
      • setUniqueId

        public void setUniqueId​(java.lang.String s)
        Description copied from interface: Service

        Sets the unique identifier for this Service. These unique identifiers are optional but maybe required by some implementations of ServiceCollection.

        Specified by:
        setUniqueId in interface Service
        Parameters:
        s - this Service's unique identifier
      • isBranching

        public boolean isBranching()
        Description copied from interface: Service

        Returns true if the implementation supports branching.

        Specified by:
        isBranching in interface Service
        Returns:
        true if the implementation supports branching
        See Also:
        BranchingServiceCollection
      • continueOnFailure

        public boolean continueOnFailure()
        Description copied from interface: Service

        If true containers should continue and apply the next configured Service even if this Service throws an Exception.

        Specified by:
        continueOnFailure in interface Service
        Returns:
        continueOnFail
      • getContinueOnFail

        public java.lang.Boolean getContinueOnFail()
        Returns:
        whether or not this service is configured to continue on failure.
        See Also:
        continueOnFailure()
      • setContinueOnFail

        public void setContinueOnFail​(java.lang.Boolean b)
        whether or not this service is configured to continue on failure.
        Parameters:
        b - true/false, default if not specified is false.
      • getIsTrackingEndpoint

        public java.lang.Boolean getIsTrackingEndpoint()
      • setIsTrackingEndpoint

        public void setIsTrackingEndpoint​(java.lang.Boolean b)
        whether or not this service is is a tracking endpoint.
        Parameters:
        b - true/false, default if not specified is false.
      • isTrackingEndpoint

        public boolean isTrackingEndpoint()
        Description copied from interface: MessageEventGenerator

        Returns true if this should be considered an 'end-point' for tracking purposes, otherwise false.

        Specified by:
        isTrackingEndpoint in interface MessageEventGenerator
        Returns:
        true if this should be considered an 'end-point' for tracking purposes, otherwise false