Class MessageCatcher
- java.lang.Object
-
- ejava.examples.jms10.jmsmechanics.MessageCatcher
-
-
Field Summary
Fields Modifier and Type Field Description protected int
ackMode
protected ConnectionFactory
connFactory
protected Destination
destination
private static org.slf4j.Logger
logger
protected List<Message>
messages
protected String
name
protected String
password
protected Session
sharedSession
protected boolean
started
protected boolean
stop
protected boolean
stopped
protected String
user
-
Constructor Summary
Constructors Constructor Description MessageCatcher(String name)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clearMessages()
void
execute()
protected Connection
getConnection()
int
getCount()
List<Message>
getMessages()
String
getName()
boolean
isStarted()
boolean
isStopped()
static void
main(String[] args)
void
run()
MessageCatcher
setAckMode(int ackMode)
void
setConnFactory(ConnectionFactory connFactory)
void
setDestination(Destination destination)
void
setPassword(String password)
MessageCatcher
setSession(Session session)
void
setUser(String user)
void
stop()
-
-
-
Field Detail
-
logger
private static final org.slf4j.Logger logger
-
connFactory
protected ConnectionFactory connFactory
-
user
protected String user
-
password
protected String password
-
sharedSession
protected Session sharedSession
-
destination
protected Destination destination
-
ackMode
protected int ackMode
-
stop
protected boolean stop
-
stopped
protected boolean stopped
-
started
protected boolean started
-
name
protected String name
-
-
Constructor Detail
-
MessageCatcher
public MessageCatcher(String name)
-
-
Method Detail
-
getName
public String getName()
-
setConnFactory
public void setConnFactory(ConnectionFactory connFactory)
-
setUser
public void setUser(String user)
-
setPassword
public void setPassword(String password)
-
setSession
public MessageCatcher setSession(Session session)
-
setDestination
public void setDestination(Destination destination)
-
setAckMode
public MessageCatcher setAckMode(int ackMode)
-
getCount
public int getCount()
-
clearMessages
public void clearMessages()
-
stop
public void stop()
-
isStopped
public boolean isStopped()
-
isStarted
public boolean isStarted()
-
getConnection
protected Connection getConnection() throws JMSException
- Throws:
JMSException
-
execute
public void execute() throws JMSException
- Throws:
JMSException
-
main
public static void main(String[] args)
-
-