public abstract class AbstractDispatcher extends Object implements Dispatch
| Modifier and Type | Class and Description |
|---|---|
protected class |
AbstractDispatcher.DispatchRunnable
The runnable handling the dispatch.
|
| Constructor and Description |
|---|
AbstractDispatcher()
Create a (stateless) dispatcher.
|
| Modifier and Type | Method and Description |
|---|---|
void |
asyncDispatch(Request pRequest)
Generate a response and and dispatch it in a new (separate) thread.
|
void |
asyncDispatchInEDT(Request pRequest)
Generate a response in a new (separate) thread and dispatch the
response in the EDT (event dispatch thread).
|
protected abstract void |
doDispatch(Runnable pRunnable)
The callback method to switch to the "right" UI thread.
|
void |
syncDispatch(Request pRequest)
Generate a response and and dispatch it in the current thread.
|
Response |
syncExecute(Request pRequest)
Generate a response (includes delegate handling) but doesn't dispatch the response.
|
public void asyncDispatch(Request pRequest)
asyncDispatch in interface DispatchpRequest - the requestpublic void asyncDispatchInEDT(Request pRequest)
asyncDispatchInEDT in interface DispatchpRequest - the requestpublic Response syncExecute(Request pRequest)
syncExecute in interface DispatchpRequest - the requestpublic void syncDispatch(Request pRequest)
syncDispatch in interface DispatchpRequest - the requestprotected abstract void doDispatch(Runnable pRunnable)
pRunnable - the runnable containing the result, must not be nullCopyright © 2014 Jürgen Zeller (privat). All rights reserved.