Class BaseJMSSampler

    • Constructor Detail

      • BaseJMSSampler

        public BaseJMSSampler()
    • Method Detail

      • sample

        public SampleResult sample​(Entry e)
        Obtains statistics about the given Entry, and packages the information into a SampleResult.
        Parameters:
        e - the Entry (TODO seems to be unused)
        Returns:
        information about the sample
      • setJNDIIntialContextFactory

        public void setJNDIIntialContextFactory​(String icf)
        set the initial context factory
        Parameters:
        icf - the initial context factory
      • getJNDIInitialContextFactory

        public String getJNDIInitialContextFactory()
        method returns the initial context factory for jndi initial context lookup.
        Returns:
        the initial context factory
      • setProviderUrl

        public void setProviderUrl​(String url)
        set the provider user for jndi
        Parameters:
        url - the provider URL
      • getProviderUrl

        public String getProviderUrl()
        method returns the provider url for jndi to connect to
        Returns:
        the provider URL
      • setConnectionFactory

        public void setConnectionFactory​(String factory)
        set the connection factory for
        Parameters:
        factory - the connection factory
      • getConnectionFactory

        public String getConnectionFactory()
        return the connection factory parameter used to lookup the connection factory from the JMS server
        Returns:
        the connection factory
      • setDestination

        public void setDestination​(String dest)
        set the destination (topic or queue name)
        Parameters:
        dest - the destination
      • getDestination

        public String getDestination()
        return the destination (topic or queue name)
        Returns:
        the destination
      • setUsername

        public void setUsername​(String user)
        set the username to login into the jms server if needed
        Parameters:
        user - the name of the user
      • getUsername

        public String getUsername()
        return the username used to login to the jms server
        Returns:
        the username used to login to the jms server
      • setPassword

        public void setPassword​(String pwd)
        Set the password to login to the jms server
        Parameters:
        pwd - the password to use for login on the jms server
      • getPassword

        public String getPassword()
        return the password used to login to the jms server
        Returns:
        the password used to login to the jms server
      • setIterations

        public void setIterations​(String count)
        set the number of iterations the sampler should aggregate
        Parameters:
        count - the number of iterations
      • getIterations

        public String getIterations()
        get the iterations as string
        Returns:
        the number of iterations
      • getIterationCount

        public int getIterationCount()
        return the number of iterations as int instead of string
        Returns:
        the number of iterations as int instead of string
      • setUseAuth

        public void setUseAuth​(boolean useAuth)
        Set whether authentication is required for JNDI
        Parameters:
        useAuth - flag whether to use authentication
      • isUseAuth

        public boolean isUseAuth()
        return whether jndi requires authentication
        Returns:
        whether jndi requires authentication
      • setReadResponse

        public void setReadResponse​(String read)
        set whether the sampler should read the response or not
        Parameters:
        read - whether the sampler should read the response or not
      • getReadResponse

        public String getReadResponse()
        return whether the sampler should read the response
        Returns:
        whether the sampler should read the response
      • getReadResponseAsBoolean

        public boolean getReadResponseAsBoolean()
        return whether the sampler should read the response as a boolean value
        Returns:
        whether the sampler should read the response as a boolean value
      • setUseJNDIProperties

        public void setUseJNDIProperties​(String properties)
        if the sampler should use jndi.properties file, call the method with the string "true"
        Parameters:
        properties - flag whether to use jndi.properties file
      • getUseJNDIProperties

        public String getUseJNDIProperties()
        return whether the sampler should use properties file instead of UI parameters.
        Returns:
        the string "true" when the sampler should use properties file instead of UI parameters, the string "false" otherwise.
      • getUseJNDIPropertiesAsBoolean

        public boolean getUseJNDIPropertiesAsBoolean()
        return the properties as boolean true/false.
        Returns:
        whether the sampler should use properties file instead of UI parameters.
      • setDestinationStatic

        public void setDestinationStatic​(boolean isStatic)
        if the sampler should use a static destination, call the method with true
        Parameters:
        isStatic - flag whether the destination is a static destination
      • isDestinationStatic

        public boolean isDestinationStatic()
        return whether the sampler should use a static destination.
        Returns:
        whether the sampler should use a static destination.
      • getMessageHeaders

        public static String getMessageHeaders​(Message message)
        Returns a String with the JMS Message Header values.
        Parameters:
        message - JMS Message
        Returns:
        String with message header values.