public class AsyncDispatcher extends Object implements RequestDispatcher
DefaultBlockingServlet
as this pertains to incoming--as opposed to outgoing--message handling. Note: some appservers or servlet environments
may restrict thread creation within the container, in which case this implementation cannot be used.Constructor and Description |
---|
AsyncDispatcher(ErraiService service)
Constructs the AsyncDispatcher with the specified service.
|
Modifier and Type | Method and Description |
---|---|
void |
dispatch(Message message)
Dispatches a message to a single receiver on the bus
|
void |
dispatchGlobal(Message message)
Sends the message globally.
|
@Inject public AsyncDispatcher(ErraiService service)
service
- the service where the bus is locatedpublic void dispatchGlobal(Message message) throws InterruptedException
dispatchGlobal
in interface RequestDispatcher
message
- a message to dispatch globallyInterruptedException
public void dispatch(Message message) throws InterruptedException
RequestDispatcher
dispatch
in interface RequestDispatcher
message
- a message to dispatchInterruptedException
Copyright © 2013-2015 JBoss, a division of Red Hat. All Rights Reserved.