Interface AgentConfig


  • public interface AgentConfig
    The configuration of a replication agent.
    • Method Detail

      • checkValid

        void checkValid()
        Checks if the configuration is valid and throws an exception if not. The message of the exception can be used as hint why the config is not valid.
        Throws:
        java.lang.IllegalArgumentException - if not valid.
      • getId

        java.lang.String getId()
        Returns the id of this configuration.
        Returns:
        the id
      • getAgentId

        java.lang.String getAgentId()
        Returns the id for the agent of this configuration. note that there can be several configurations with the same agent id but in different groups (i.e. run modes).
        Returns:
        the agent id
      • getConfigPath

        java.lang.String getConfigPath()
        Returns the path to the configuration node. If the configuration is not stored in the repository, null is returned.
        Returns:
        the path to the config or null
      • getName

        java.lang.String getName()
        The descriptive name of this replication agent. This is a convenience method and returns the property AGENT_NAME
        Returns:
        agent name
      • getConfigGroup

        AgentConfigGroup getConfigGroup()
        Returns the group of this configuration
        Returns:
        the config group
      • getTransportURI

        java.lang.String getTransportURI()
        The destination URI. This uri is one of those defined in the property TRANSPORT_URI.
        Returns:
        the destination URI.
      • getAllTransportURIs

        java.lang.String[] getAllTransportURIs()
        The list of alternative destination URI. This is a convenience method and returns the uris defined in the property TRANSPORT_URI as a comma separated list.
        Returns:
        the destination URI.
      • getTransportUser

        java.lang.String getTransportUser()
        The target user name for delivering the content. This is a convenience method and returns the property TRANSPORT_USER.
        Returns:
        transport user name
      • getTransportPassword

        java.lang.String getTransportPassword()
        The target user password for delivering the content. This is a convenience method and returns the property TRANSPORT_PASSWORD.
        Returns:
        plain text transport password
      • getSerializationType

        java.lang.String getSerializationType()
        The name of the serialization type. A corresponding ContentBuilder with this name must be registered. This is a convenience method and returns the property SERIALIZATION_TYPE.
        Returns:
        name of the content builder
      • getAgentUserId

        java.lang.String getAgentUserId()
        The id of the user that is used to build the replication content. This is a convenience method and returns the property AGENT_USER_ID.
        Returns:
        the userid or null
      • getRetryDelay

        long getRetryDelay()
        The retry delay in milliseconds. This is a convenience method and returns the property QUEUE_RETRY_DELAY.
        Returns:
        retry delay.
      • isEnabled

        boolean isEnabled()
        Checks if this agent is enabled This is a convenience method and returns the property AGENT_ENABLED.
        Returns:
        true if this agent is enabled
      • getLogLevel

        java.lang.String getLogLevel()
        The current log level - DEBUG, INFO, or ERROR. This is a convenience method and returns the property AGENT_LOG_LEVEL.
        Returns:
        log lever
      • getMaxRetries

        @Deprecated
        int getMaxRetries()
        Deprecated.
        This is handled by the queue configuration
        The number of retries before the replication is cancelled. This is a convenience method and returns the property QUEUE_MAX_RETRIES.
        Returns:
        The number of retries or -1 for endless retries.
      • isBatchMode

        boolean isBatchMode()
        Returns if the replication by this agent is performed in batch mode.
        Returns:
        If the replication is performed in batch mode.
        Since:
        5.12.0
      • getBatchWaitTime

        long getBatchWaitTime()
        If batch mode is enabled for this agent, this method returns a positive number in seconds. This time specifies the maximum wait time for a batch to be sent.
        Returns:
        The batch wait time in seconds.
        Since:
        5.12.0
      • getBatchMaxSize

        long getBatchMaxSize()
        If batch mode is enabled for this agent, this method returns a positive byte size. With the first replication exceeding this size, the batch is sent.
        Returns:
        The maximum batch size in bytes.
        Since:
        5.12.0
      • isSpecific

        boolean isSpecific()
        Checks if this agent is used for specific applications. Specific agents are used by the application for special application specific replications and are not used during a general replication. This is a convenience method and returns the property TRIGGER_SPECIFIC.
        Returns:
        true if agent is specific
      • isTriggeredOnModification

        boolean isTriggeredOnModification()
        Checks if this agent is used for "replicate on modification". If this flag is true each modification to the content will trigger a replication action on this agent. This is a convenience method and returns the property TRIGGER_MODIFIED.
        Returns:
        true if this agent auto replicates on modification.
      • isTriggeredOnOffTime

        boolean isTriggeredOnOffTime()
        Checks if this agent is used for "replicate if on-/offtime reached". If this flag is true any content that reached an on-/offtime boundary will trigger a replication action on this agent. This is a convenience method and returns the property TRIGGER_ONOFFTIME.
        Returns:
        true if this agent auto replicates when on-/offtime reached
      • isTriggeredOnDistribute

        boolean isTriggeredOnDistribute()
        Checks if this agent is used when a property "cq:distribute" has been modified. This is a convenience method and returns the property TRIGGER_DISTRIBUTE.
        Returns:
        true if this agent replicates on this property change
      • usedForReverseReplication

        boolean usedForReverseReplication()
        Checks if this agent is used for reverse replication. This is a convenience method and returns the property REVERSE_REPLICATION.
        Returns:
        true if this agent is used for reverse replication.
      • noVersions

        boolean noVersions()

        Determines if a replication with this agent should suppress implicit versioning. If all participating agents of a replication specify this flag, the respective flags are set in the replication options passed to the preprocessors.

        This is a convenience method and returns the property AGENT_NO_VERSIONS.

        Returns:
        true if a replication with this agent should not trigger implicit versioning.
        Since:
        5.4
      • noStatusUpdate

        boolean noStatusUpdate()

        Determines if a replication with this agent should suppress update of the replication status. If all participating agents of a replication specify this flag, the replication status is not updated after a replication.

        This is a convenience method and returns the property AGENT_NO_STATUS_UPDATE.

        Returns:
        true if a replication with this agent should not update the replication status.
        Since:
        5.4
      • getProperties

        ValueMap getProperties()
        Returns All agent properties as value map.
        Returns:
        agent properties
      • isTriggeredOnReceive

        boolean isTriggeredOnReceive()
        Determines if a replication with this agent should be triggered once the replication request is received. This is used particularly for chain replication
        Returns:
        true if the agent should be triggered once replication is received
        Since:
        5.5.19
      • isInMaintenanceMode

        boolean isInMaintenanceMode()
        Checks if this agent is in maintenance mode This is a convenience method and returns the property AGENT_MAINTENANCE.
        Returns:
        true if this agent is in maintenance mode
      • aliasUpdate

        boolean aliasUpdate()
        Determines if a replication with this agent should also replicate aliases, vanity URLs.
        Returns:
        true if agent should handle replication for aliases, vanity URLs
      • getSSLConfig

        java.lang.String getSSLConfig()
        Returns SSL config mode. Values are default, relaxed or clientauth.
        Returns:
        SSL settings
        See Also:
        SSL_CONFIG
      • allowsExpiredCertificates

        boolean allowsExpiredCertificates()
        Checks whether the agent allows the use of expired certificates or not.
        Returns:
        true if the agent accepts expired certificates, false otherwise
      • isOAuthEnabled

        boolean isOAuthEnabled()
        Checks whether the agent is using the OAuth 2.0 Authorization Grants mechanism or not. This is a convenience method and returns the property ENABLE_OAUTH
        Returns:
        true if the authorization grants mechanism is enabled