Apache JMeter

org.apache.jmeter.protocol.jms.client
Class Publisher

java.lang.Object
  extended by org.apache.jmeter.protocol.jms.client.Publisher
All Implemented Interfaces:
Closeable

public class Publisher
extends Object
implements Closeable


Constructor Summary
Publisher(boolean useProps, String initialContextFactory, String providerUrl, String connfactory, String destinationName, boolean useAuth, String securityPrincipal, String securityCredentials)
          Create a publisher using either the jndi.properties file or the provided parameters.
Publisher(boolean useProps, String initialContextFactory, String providerUrl, String connfactory, String destinationName, boolean useAuth, String securityPrincipal, String securityCredentials, boolean useNonPersistentMessages)
          Create a publisher using either the jndi.properties file or the provided parameters.
Publisher(boolean useProps, String initialContextFactory, String providerUrl, String connfactory, String destinationName, boolean useAuth, String securityPrincipal, String securityCredentials, boolean staticDestination, boolean useNonPersistentMessages)
          Create a publisher using either the jndi.properties file or the provided parameters
 
Method Summary
 void close()
          Close will close the session
 javax.jms.Message publish(byte[] bytes, String destinationName, Map<String,Object> properties)
           
 javax.jms.Message publish(Map<String,Object> map)
           
 javax.jms.Message publish(Map<String,Object> map, String destinationName)
           
 javax.jms.MapMessage publish(Map<String,Object> map, String destinationName, Map<String,Object> properties)
           
 javax.jms.Message publish(Serializable contents)
           
 javax.jms.Message publish(Serializable contents, String destinationName)
           
 javax.jms.Message publish(Serializable contents, String destinationName, Map<String,Object> properties)
           
 javax.jms.Message publish(String text)
           
 javax.jms.Message publish(String text, String destinationName)
           
 javax.jms.Message publish(String text, String destinationName, Map<String,Object> properties)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Publisher

public Publisher(boolean useProps,
                 String initialContextFactory,
                 String providerUrl,
                 String connfactory,
                 String destinationName,
                 boolean useAuth,
                 String securityPrincipal,
                 String securityCredentials)
          throws javax.jms.JMSException,
                 NamingException
Create a publisher using either the jndi.properties file or the provided parameters. Uses a static destination and persistent messages(for backward compatibility)

Parameters:
useProps - true if a jndi.properties file is to be used
initialContextFactory - the (ignored if useProps is true)
providerUrl - (ignored if useProps is true)
connfactory -
destinationName -
useAuth - (ignored if useProps is true)
securityPrincipal - (ignored if useProps is true)
securityCredentials - (ignored if useProps is true)
Throws:
javax.jms.JMSException - if the context could not be initialised, or there was some other error
NamingException

Publisher

public Publisher(boolean useProps,
                 String initialContextFactory,
                 String providerUrl,
                 String connfactory,
                 String destinationName,
                 boolean useAuth,
                 String securityPrincipal,
                 String securityCredentials,
                 boolean useNonPersistentMessages)
          throws javax.jms.JMSException,
                 NamingException
Create a publisher using either the jndi.properties file or the provided parameters. Uses a static destination (for backward compatibility)

Parameters:
useProps - true if a jndi.properties file is to be used
initialContextFactory - the (ignored if useProps is true)
providerUrl - (ignored if useProps is true)
connfactory -
destinationName -
useAuth - (ignored if useProps is true)
securityPrincipal - (ignored if useProps is true)
securityCredentials - (ignored if useProps is true)
useNonPersistentMessages - Flag Delivery Mode as Non persistent if true
Throws:
javax.jms.JMSException - if the context could not be initialised, or there was some other error
NamingException

Publisher

public Publisher(boolean useProps,
                 String initialContextFactory,
                 String providerUrl,
                 String connfactory,
                 String destinationName,
                 boolean useAuth,
                 String securityPrincipal,
                 String securityCredentials,
                 boolean staticDestination,
                 boolean useNonPersistentMessages)
          throws javax.jms.JMSException,
                 NamingException
Create a publisher using either the jndi.properties file or the provided parameters

Parameters:
useProps - true if a jndi.properties file is to be used
initialContextFactory - the (ignored if useProps is true)
providerUrl - (ignored if useProps is true)
connfactory -
destinationName -
useAuth - (ignored if useProps is true)
securityPrincipal - (ignored if useProps is true)
securityCredentials - (ignored if useProps is true)
staticDestination - true is the destination is not to change between loops
useNonPersistentMessages - Flag Delivery Mode as Non persistent if true
Throws:
javax.jms.JMSException - if the context could not be initialised, or there was some other error
NamingException
Method Detail

publish

public javax.jms.Message publish(String text)
                          throws javax.jms.JMSException,
                                 NamingException
Throws:
javax.jms.JMSException
NamingException

publish

public javax.jms.Message publish(String text,
                                 String destinationName)
                          throws javax.jms.JMSException,
                                 NamingException
Throws:
javax.jms.JMSException
NamingException

publish

public javax.jms.Message publish(String text,
                                 String destinationName,
                                 Map<String,Object> properties)
                          throws javax.jms.JMSException,
                                 NamingException
Throws:
javax.jms.JMSException
NamingException

publish

public javax.jms.Message publish(Serializable contents)
                          throws javax.jms.JMSException,
                                 NamingException
Throws:
javax.jms.JMSException
NamingException

publish

public javax.jms.Message publish(Serializable contents,
                                 String destinationName)
                          throws javax.jms.JMSException,
                                 NamingException
Throws:
javax.jms.JMSException
NamingException

publish

public javax.jms.Message publish(Serializable contents,
                                 String destinationName,
                                 Map<String,Object> properties)
                          throws javax.jms.JMSException,
                                 NamingException
Throws:
javax.jms.JMSException
NamingException

publish

public javax.jms.Message publish(byte[] bytes,
                                 String destinationName,
                                 Map<String,Object> properties)
                          throws javax.jms.JMSException,
                                 NamingException
Throws:
javax.jms.JMSException
NamingException

publish

public javax.jms.Message publish(Map<String,Object> map)
                          throws javax.jms.JMSException,
                                 NamingException
Throws:
javax.jms.JMSException
NamingException

publish

public javax.jms.Message publish(Map<String,Object> map,
                                 String destinationName)
                          throws javax.jms.JMSException,
                                 NamingException
Throws:
javax.jms.JMSException
NamingException

publish

public javax.jms.MapMessage publish(Map<String,Object> map,
                                    String destinationName,
                                    Map<String,Object> properties)
                             throws javax.jms.JMSException,
                                    NamingException
Throws:
javax.jms.JMSException
NamingException

close

public void close()
Close will close the session

Specified by:
close in interface Closeable

Apache JMeter

Copyright © 1998-2013 Apache Software Foundation. All Rights Reserved.