Class DfuplusConnection

  • All Implemented Interfaces:
    AdaptrisComponent, AdaptrisConnection, ComponentLifecycle, ComponentLifecycleExtension, StateManagedComponent

    @ComponentProfile(summary="Wrapper around the dfuplus executable",
                      tag="connections,hpcc,dfuplus")
    public class DfuplusConnection
    extends NoOpConnection
    Wrapper around the key dfuplus parameters as an AdaptrisConnection implementation.

    While there is no explicit connection required for dfuplus (as it's a commandline executable); it is still desirable to have the key fields (namely server/username/password) wrapped as a connection so that it is configurable as a SharedConnection which means less boilerplate configuration in the future.

    In the adapter configuration file this class is aliased as dfuplus-connection which is the preferred alternative to the fully qualified classname when building your configuration.

    • Constructor Detail

      • DfuplusConnection

        public DfuplusConnection()
    • Method Detail

      • getDfuplusCommand

        public java.lang.String getDfuplusCommand()
      • setDfuplusCommand

        public void setDfuplusCommand​(java.lang.String s)
      • getServer

        public java.lang.String getServer()
      • setServer

        public void setServer​(java.lang.String server)
      • getUsername

        public java.lang.String getUsername()
      • setUsername

        public void setUsername​(java.lang.String username)
      • getPassword

        public java.lang.String getPassword()
      • setPassword

        public void setPassword​(java.lang.String password)
      • addArguments

        public org.apache.commons.exec.CommandLine addArguments​(org.apache.commons.exec.CommandLine cmdLine)
                                                         throws PasswordException
        Throws:
        PasswordException
      • getSourceIp

        public java.lang.String getSourceIp()
        Return the source IP address to use.
      • setSourceIp

        public void setSourceIp​(java.lang.String sourceIp)
        Set the IP address for the local machine (useful on multi-homed machines where the automatic detection guesses wrong) which is equivalent to using srcip= parameter.
        Parameters:
        sourceIp - the source IP.
      • getTransferBufferSize

        public java.lang.Integer getTransferBufferSize()
        Returns:
        the transferBufferSize
      • setTransferBufferSize

        public void setTransferBufferSize​(java.lang.Integer i)
        Maps to the transferbuffersize argument.
        Parameters:
        i - the transferBufferSize to set; if not specified, will not be passed as an argument.
      • getThrottle

        public java.lang.Integer getThrottle()
        Returns:
        the throttle
      • setThrottle

        public void setThrottle​(java.lang.Integer i)
        Maps to the throttle argument.
        Parameters:
        i - the throttle to set; if not specified, will not be passed as an argument.
      • getReplicate

        public java.lang.Boolean getReplicate()
        Returns:
        the replicate
      • setReplicate

        public void setReplicate​(java.lang.Boolean b)
        Maps to the replicate argument.
        Parameters:
        b - true/false, if not specified, will not be passed as an argument.
      • getNoRecover

        public java.lang.Boolean getNoRecover()
        Returns:
        the norecover flag.
      • setNoRecover

        public void setNoRecover​(java.lang.Boolean b)
        Maps to the norecover argument.
        Parameters:
        b - true/false, if not specified, will not be passed as an argument.