* @param queueID the id of the queue this dispatcher belongs to.
* @return the Dispatcher.
* @throws NotFoundException thrown if no dispatcher was found.
*/
public DispatcherInfo getDispatcherInfo(Workgroup workgroup, long queueID) throws NotFoundException {
BasicDispatcherInfo userInfo = null;
Connection con = null;
PreparedStatement pstmt = null;
ResultSet rs = null;
try {
con = DbConnectionManager.getConnection();
pstmt = con.prepareStatement(LOAD_DISPATCHER_BY_ID);
pstmt.setLong(1, queueID);
rs = pstmt.executeQuery();
if (!rs.next()) {
throw new NotFoundException();
}
userInfo = new BasicDispatcherInfo(workgroup,
queueID,
rs.getString(1), // name
rs.getString(2), // description
rs.getInt(3), // offer timeout
rs.getInt(4)); // request timeout