Package org.rribbit.processing
Class LocalRequestProcessor
java.lang.Object
org.rribbit.processing.LocalRequestProcessor
- All Implemented Interfaces:
RequestProcessor
- Direct Known Subclasses:
JmsRequestProcessor
This class processes requests on a local machine and exposes its functionality as a simple Java method call. This class is supposed to be used in conjunction with the
LocalRequestDispatcher
.- Author:
- G.J. Schouten
-
Field Summary
Modifier and TypeFieldDescriptionprotected ListenerObjectExecutor
protected ListenerObjectRetriever
-
Constructor Summary
ConstructorDescriptionWhenever you use this constructor, be sure to set theListenerObjectRetriever
AND theListenerObjectExecutor
with the setters provided by this class.LocalRequestProcessor
(ListenerObjectRetriever listenerObjectRetriever, ListenerObjectExecutor listenerObjectExecutor) This constructor is recommended, since it forces you to specify theListenerObjectRetriever
andListenerObjectExecutor
. -
Method Summary
Modifier and TypeMethodDescription<T> Response
<T> processRequest
(Request request) void
setListenerObjectExecutor
(ListenerObjectExecutor listenerObjectExecutor) void
setListenerObjectRetriever
(ListenerObjectRetriever listenerObjectRetriever)
-
Field Details
-
listenerObjectRetriever
-
listenerObjectExecutor
-
-
Constructor Details
-
LocalRequestProcessor
public LocalRequestProcessor()Whenever you use this constructor, be sure to set theListenerObjectRetriever
AND theListenerObjectExecutor
with the setters provided by this class. If you don't, runtimeNullPointerException
s will occur. -
LocalRequestProcessor
public LocalRequestProcessor(ListenerObjectRetriever listenerObjectRetriever, ListenerObjectExecutor listenerObjectExecutor) This constructor is recommended, since it forces you to specify theListenerObjectRetriever
andListenerObjectExecutor
. Passing a null value for either of these will result in a runtimeNullPointerException
whenever theLocalRequestProcessor
is used.- Parameters:
listenerObjectRetriever
-listenerObjectExecutor
-
-
-
Method Details
-
processRequest
Description copied from interface:RequestProcessor
- Specified by:
processRequest
in interfaceRequestProcessor
- Parameters:
request
- TheRequest
to process- Returns:
- The
Response
-
getListenerObjectRetriever
-
setListenerObjectRetriever
-
getListenerObjectExecutor
-
setListenerObjectExecutor
-