public class WorkerFactory extends Object
Constructor and Description |
---|
WorkerFactory(ErraiService svc)
Initializes the worker factory with a new thread group, service, all the properties, messages and workers
|
Modifier and Type | Method and Description |
---|---|
void |
deliver(Message m)
Attempts to send the message
|
void |
deliverGlobal(Message m)
Attempts to deliver the specified message globally
|
protected BlockingQueue<Message> |
getMessages()
Gets the messages in the queue
|
protected long |
getWorkerTimeout()
Gets the timeout
|
void |
startPool()
Starts execution of all the threads in the pool of threads
|
void |
stopPool() |
public WorkerFactory(ErraiService svc)
svc
- - the ErraiService that is to be associated to this factory of workerspublic void deliverGlobal(Message m) throws InterruptedException
m
- - message to be deliveredInterruptedException
public void deliver(Message m) throws InterruptedException
m
- - message to be sentInterruptedException
protected BlockingQueue<Message> getMessages()
protected long getWorkerTimeout()
public void startPool()
public void stopPool()
Copyright © 2013-2015 JBoss, a division of Red Hat. All Rights Reserved.