|
@@ -46,8 +46,8 @@ public class OutputQueue {
|
46
|
46
|
private final Object queueHandlerLock = new Object();
|
47
|
47
|
/** Thread for the sending queue. */
|
48
|
48
|
private QueueHandler queueHandler;
|
49
|
|
- /** The QueueFactory for this OutputQueue. */
|
50
|
|
- private QueueFactory queueFactory = PriorityQueueHandler.getFactory();
|
|
49
|
+ /** The QueueHandlerFactory for this OutputQueue. */
|
|
50
|
+ private QueueHandlerFactory queueHandlerFactory = PriorityQueueHandler.getFactory();
|
51
|
51
|
|
52
|
52
|
/**
|
53
|
53
|
* Set the output stream for this queue.
|
|
@@ -68,25 +68,25 @@ public class OutputQueue {
|
68
|
68
|
}
|
69
|
69
|
|
70
|
70
|
/**
|
71
|
|
- * Set the QueueFactory.
|
|
71
|
+ * Set the QueueHandlerFactory.
|
72
|
72
|
* Changing this will not change an existing QueueHandler unless queueing is
|
73
|
73
|
* disabled and reenabled.
|
74
|
74
|
* If this is called before the first lien of output is queued then there is
|
75
|
75
|
* no need to disable and reenable the queue.
|
76
|
76
|
*
|
77
|
|
- * @param factory New QueueFactory to use.
|
|
77
|
+ * @param factory New QueueHandlerFactory to use.
|
78
|
78
|
*/
|
79
|
|
- public void setQueueFactory(final QueueFactory factory) {
|
80
|
|
- queueFactory = factory;
|
|
79
|
+ public void setQueueHandlerFactory(final QueueHandlerFactory factory) {
|
|
80
|
+ queueHandlerFactory = factory;
|
81
|
81
|
}
|
82
|
82
|
|
83
|
83
|
/**
|
84
|
|
- * Get the QueueFactory.
|
|
84
|
+ * Get the QueueHandlerFactory.
|
85
|
85
|
*
|
86
|
|
- * @return The current QueueFactory.
|
|
86
|
+ * @return The current QueueHandlerFactory.
|
87
|
87
|
*/
|
88
|
|
- public QueueFactory getQueueManager() {
|
89
|
|
- return queueFactory;
|
|
88
|
+ public QueueHandlerFactory getQueueHandlerFactory() {
|
|
89
|
+ return queueHandlerFactory;
|
90
|
90
|
}
|
91
|
91
|
|
92
|
92
|
/**
|
|
@@ -204,7 +204,7 @@ public class OutputQueue {
|
204
|
204
|
if (queueEnabled && priority != QueuePriority.IMMEDIATE) {
|
205
|
205
|
synchronized (queueHandlerLock) {
|
206
|
206
|
if (queueHandler == null || !queueHandler.isAlive()) {
|
207
|
|
- queueHandler = queueFactory.getQueueHandler(this, queue, out);
|
|
207
|
+ queueHandler = queueHandlerFactory.getQueueHandler(this, queue, out);
|
208
|
208
|
queueHandler.start();
|
209
|
209
|
}
|
210
|
210
|
|