public class Worker extends Object implements Runnable
Modifier and Type | Field and Description |
---|---|
protected ConnectionFactory |
connFactory |
protected int |
count |
protected long[] |
delay |
protected Destination |
dlq |
private static org.apache.commons.logging.Log |
log |
protected int |
maxCount |
protected String |
name |
protected boolean |
noFail |
protected String |
password |
protected Destination |
requestQueue |
protected boolean |
started |
protected boolean |
stop |
protected boolean |
stopped |
protected String |
username |
Modifier and Type | Method and Description |
---|---|
void |
clearMessages() |
protected Connection |
createConnection(ConnectionFactory connFactory) |
void |
execute() |
int |
getCount() |
boolean |
isStarted() |
boolean |
isStopped() |
static void |
main(String[] args) |
void |
run() |
void |
setConnFactory(ConnectionFactory connFactory) |
void |
setDLQ(Destination dlq) |
void |
setMaxCount(int maxCount) |
void |
setNoFail(boolean noFail) |
void |
setPassword(String password) |
void |
setRequestQueue(Destination requestQueue) |
void |
setUsername(String username) |
void |
stop() |
private static final org.apache.commons.logging.Log log
protected ConnectionFactory connFactory
protected Destination requestQueue
protected Destination dlq
protected boolean stop
protected boolean stopped
protected boolean started
protected boolean noFail
protected String name
protected int count
protected int maxCount
protected long[] delay
protected String username
protected String password
public Worker(String name)
public void setConnFactory(ConnectionFactory connFactory)
public void setRequestQueue(Destination requestQueue)
public void setDLQ(Destination dlq)
public int getCount()
public void setMaxCount(int maxCount)
public void clearMessages()
public void stop()
public boolean isStopped()
public boolean isStarted()
public void setNoFail(boolean noFail)
protected Connection createConnection(ConnectionFactory connFactory) throws Exception
Exception
public void setUsername(String username)
public void setPassword(String password)
public static void main(String[] args)
Copyright © 2015 John's Hopkins University, Engineering Programs for Professionals. All rights reserved.