|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.qpid.example.publisher.Publisher
public class Publisher
Field Summary | |
---|---|
protected Connection |
_connection
|
protected InitialContextHelper |
_contextHelper
|
protected static String |
_defaultDestinationDir
|
protected Destination |
_destination
|
protected String |
_destinationDir
|
protected String |
_name
|
protected MessageProducer |
_producer
|
protected Session |
_session
|
Constructor Summary | |
---|---|
Publisher()
Creates a Publisher instance using properties from example.properties See InitialContextHelper for details of how context etc created |
Method Summary | |
---|---|
void |
cleanup()
Cleanup resources before exit |
String |
getDestinationDir()
|
String |
getName()
|
Session |
getSession()
Exposes session |
void |
sendMessage(int numMessages)
Creates and sends the number of messages specified in the param |
boolean |
sendMessage(Message message)
Publishes a non-persistent message using transacted session Note that persistent is the default mode for send - so need to specify for transient |
void |
setDestinationDir(String destinationDir)
|
void |
setName(String _name)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected InitialContextHelper _contextHelper
protected Connection _connection
protected Session _session
protected MessageProducer _producer
protected String _destinationDir
protected String _name
protected Destination _destination
protected static final String _defaultDestinationDir
Constructor Detail |
---|
public Publisher()
Method Detail |
---|
public void sendMessage(int numMessages)
public boolean sendMessage(Message message)
public void cleanup()
public Session getSession()
public String getDestinationDir()
public void setDestinationDir(String destinationDir)
public String getName()
public void setName(String _name)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |